2020-07-20 00:13:23 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, autoreconfHook, perl, cracklib, python3, fetchpatch }:
|
2014-04-04 14:14:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libpwquality";
|
2019-11-02 10:14:30 +00:00
|
|
|
version = "1.4.2";
|
2014-04-04 14:14:38 +00:00
|
|
|
|
2017-06-20 03:52:57 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libpwquality";
|
|
|
|
repo = "libpwquality";
|
2019-08-15 12:41:18 +00:00
|
|
|
rev = "${pname}-${version}";
|
2019-11-02 10:14:30 +00:00
|
|
|
sha256 = "0n4pjhm7wfivk0wizggaxq4y4mcxic876wcarjabkp5z9k14y36h";
|
2014-04-04 14:14:38 +00:00
|
|
|
};
|
|
|
|
|
2020-07-20 00:13:23 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook perl python3 ];
|
|
|
|
buildInputs = [ cracklib ];
|
|
|
|
|
|
|
|
patches = lib.optional stdenv.hostPlatform.isStatic [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "static-build.patch";
|
|
|
|
url = "https://github.com/libpwquality/libpwquality/pull/40.patch";
|
|
|
|
sha256 = "1ypccq437wxwgddd98cvd330jfm7jscdlzlyxgy05g6yzrr68xyk";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = lib.optional stdenv.hostPlatform.isStatic [
|
|
|
|
# Python binding generates a shared library which are unavailable with musl build
|
|
|
|
"--disable-python-bindings"
|
|
|
|
];
|
2016-08-02 16:06:29 +00:00
|
|
|
|
2017-06-20 03:52:57 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Password quality checking and random password generation library";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/libpwquality/libpwquality";
|
2017-06-20 03:52:57 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.unix;
|
2016-08-02 16:06:29 +00:00
|
|
|
};
|
2014-04-04 14:14:38 +00:00
|
|
|
}
|