libpwquality: 1.4.2 -> 1.4.4
- corrected the license: https://github.com/libpwquality/libpwquality/blob/libpwquality-1.4.4/COPYING - added long description - added myself as a maintainer - removed unnecessary patch - split outputs - added pam for building the pam module
This commit is contained in:
parent
19d4f7dc48
commit
4a2da4208a
|
@ -1,36 +1,57 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, autoreconfHook, perl, cracklib, python3, fetchpatch }:
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, autoreconfHook
|
||||||
|
, perl
|
||||||
|
, cracklib
|
||||||
|
, enablePAM ? stdenv.hostPlatform.isLinux
|
||||||
|
, pam
|
||||||
|
, enablePython ? false
|
||||||
|
, python
|
||||||
|
}:
|
||||||
|
|
||||||
|
# python binding generates a shared library which are unavailable with musl build
|
||||||
|
assert enablePython -> !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libpwquality";
|
pname = "libpwquality";
|
||||||
version = "1.4.2";
|
version = "1.4.4";
|
||||||
|
|
||||||
|
outputs = [ "out" "dev" "lib" "man" ] ++ lib.optionals enablePython [ "py" ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "libpwquality";
|
owner = "libpwquality";
|
||||||
repo = "libpwquality";
|
repo = "libpwquality";
|
||||||
rev = "${pname}-${version}";
|
rev = "${pname}-${version}";
|
||||||
sha256 = "0n4pjhm7wfivk0wizggaxq4y4mcxic876wcarjabkp5z9k14y36h";
|
sha256 = "sha256-7gAzrx5VP1fEBwAt6E5zGM8GyuPRR+JxYifYfirY+U8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook perl python3 ];
|
patches = [
|
||||||
buildInputs = [ cracklib ];
|
# ensure python site-packages goes in $py output
|
||||||
|
./python-binding-prefix.patch
|
||||||
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 [
|
nativeBuildInputs = [ autoreconfHook perl ] ++ lib.optionals enablePython [ python ];
|
||||||
# Python binding generates a shared library which are unavailable with musl build
|
buildInputs = [ cracklib ] ++ lib.optionals enablePAM [ pam ];
|
||||||
"--disable-python-bindings"
|
|
||||||
];
|
configureFlags = lib.optionals (!enablePython) [ "--disable-python-bindings" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Password quality checking and random password generation library";
|
|
||||||
homepage = "https://github.com/libpwquality/libpwquality";
|
homepage = "https://github.com/libpwquality/libpwquality";
|
||||||
license = licenses.bsd3;
|
description = "Password quality checking and random password generation library";
|
||||||
|
longDescription = ''
|
||||||
|
The libpwquality library purpose is to provide common functions for
|
||||||
|
password quality checking and also scoring them based on their apparent
|
||||||
|
randomness. The library also provides a function for generating random
|
||||||
|
passwords with good pronounceability. The library supports reading and
|
||||||
|
parsing of a configuration file.
|
||||||
|
|
||||||
|
In the package there are also very simple utilities that use the library
|
||||||
|
function and PAM module that can be used instead of pam_cracklib. The
|
||||||
|
module supports all the options of pam_cracklib.
|
||||||
|
'';
|
||||||
|
license = with licenses; [ bsd3 /* or */ gpl2Plus ];
|
||||||
|
maintainers = with maintainers; [ jk ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/python/Makefile.am b/python/Makefile.am
|
||||||
|
index 1d00c0c..0987690 100644
|
||||||
|
--- a/python/Makefile.am
|
||||||
|
+++ b/python/Makefile.am
|
||||||
|
@@ -14,7 +14,7 @@ all-local:
|
||||||
|
CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV)
|
||||||
|
|
||||||
|
install-exec-local:
|
||||||
|
- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix}
|
||||||
|
+ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${py}
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
rm -rf py$(PYTHONREV)
|
|
@ -18714,7 +18714,9 @@ with pkgs;
|
||||||
|
|
||||||
libpulsar = callPackage ../development/libraries/libpulsar { };
|
libpulsar = callPackage ../development/libraries/libpulsar { };
|
||||||
|
|
||||||
libpwquality = callPackage ../development/libraries/libpwquality { };
|
libpwquality = callPackage ../development/libraries/libpwquality {
|
||||||
|
python = python3;
|
||||||
|
};
|
||||||
|
|
||||||
libqalculate = callPackage ../development/libraries/libqalculate {
|
libqalculate = callPackage ../development/libraries/libqalculate {
|
||||||
readline = readline81;
|
readline = readline81;
|
||||||
|
|
|
@ -4665,6 +4665,13 @@ in {
|
||||||
|
|
||||||
libpyvivotek = callPackage ../development/python-modules/libpyvivotek { };
|
libpyvivotek = callPackage ../development/python-modules/libpyvivotek { };
|
||||||
|
|
||||||
|
libpwquality = pipe pkgs.libpwquality [
|
||||||
|
toPythonModule
|
||||||
|
(p: p.overrideAttrs (super: { meta = super.meta // { outputsToInstall = [ "py" ]; }; }))
|
||||||
|
(p: p.override { enablePython = true; inherit python; })
|
||||||
|
(p: p.py)
|
||||||
|
];
|
||||||
|
|
||||||
libredwg = toPythonModule (pkgs.libredwg.override {
|
libredwg = toPythonModule (pkgs.libredwg.override {
|
||||||
enablePython = true;
|
enablePython = true;
|
||||||
inherit (self) python libxml2;
|
inherit (self) python libxml2;
|
||||||
|
|
Loading…
Reference in a new issue