Merge pull request #161652 from 06kellyjac/libpwquality

libpwquality: 1.4.2 -> 1.4.4

authored by Kevin Cox and committed by GitHub 30d3d79b 511e56d7

+62 -19
+39 -18
pkgs/development/libraries/libpwquality/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, autoreconfHook, perl, cracklib, python3, fetchpatch }: 2 3 stdenv.mkDerivation rec { 4 pname = "libpwquality"; 5 - version = "1.4.2"; 6 7 src = fetchFromGitHub { 8 owner = "libpwquality"; 9 repo = "libpwquality"; 10 rev = "${pname}-${version}"; 11 - sha256 = "0n4pjhm7wfivk0wizggaxq4y4mcxic876wcarjabkp5z9k14y36h"; 12 }; 13 14 - nativeBuildInputs = [ autoreconfHook perl python3 ]; 15 - buildInputs = [ cracklib ]; 16 17 - patches = lib.optional stdenv.hostPlatform.isStatic [ 18 - (fetchpatch { 19 - name = "static-build.patch"; 20 - url = "https://github.com/libpwquality/libpwquality/pull/40.patch"; 21 - sha256 = "1ypccq437wxwgddd98cvd330jfm7jscdlzlyxgy05g6yzrr68xyk"; 22 - }) 23 - ]; 24 25 - configureFlags = lib.optional stdenv.hostPlatform.isStatic [ 26 - # Python binding generates a shared library which are unavailable with musl build 27 - "--disable-python-bindings" 28 - ]; 29 30 meta = with lib; { 31 - description = "Password quality checking and random password generation library"; 32 homepage = "https://github.com/libpwquality/libpwquality"; 33 - license = licenses.bsd3; 34 platforms = platforms.unix; 35 }; 36 }
··· 1 + { stdenv 2 + , lib 3 + , fetchFromGitHub 4 + , autoreconfHook 5 + , perl 6 + , cracklib 7 + , enablePAM ? stdenv.hostPlatform.isLinux 8 + , pam 9 + , enablePython ? false 10 + , python 11 + }: 12 + 13 + # python binding generates a shared library which are unavailable with musl build 14 + assert enablePython -> !stdenv.hostPlatform.isStatic; 15 16 stdenv.mkDerivation rec { 17 pname = "libpwquality"; 18 + version = "1.4.4"; 19 + 20 + outputs = [ "out" "dev" "lib" "man" ] ++ lib.optionals enablePython [ "py" ]; 21 22 src = fetchFromGitHub { 23 owner = "libpwquality"; 24 repo = "libpwquality"; 25 rev = "${pname}-${version}"; 26 + sha256 = "sha256-7gAzrx5VP1fEBwAt6E5zGM8GyuPRR+JxYifYfirY+U8="; 27 }; 28 29 + patches = [ 30 + # ensure python site-packages goes in $py output 31 + ./python-binding-prefix.patch 32 + ]; 33 34 + nativeBuildInputs = [ autoreconfHook perl ] ++ lib.optionals enablePython [ python ]; 35 + buildInputs = [ cracklib ] ++ lib.optionals enablePAM [ pam ]; 36 37 + configureFlags = lib.optionals (!enablePython) [ "--disable-python-bindings" ]; 38 39 meta = with lib; { 40 homepage = "https://github.com/libpwquality/libpwquality"; 41 + description = "Password quality checking and random password generation library"; 42 + longDescription = '' 43 + The libpwquality library purpose is to provide common functions for 44 + password quality checking and also scoring them based on their apparent 45 + randomness. The library also provides a function for generating random 46 + passwords with good pronounceability. The library supports reading and 47 + parsing of a configuration file. 48 + 49 + In the package there are also very simple utilities that use the library 50 + function and PAM module that can be used instead of pam_cracklib. The 51 + module supports all the options of pam_cracklib. 52 + ''; 53 + license = with licenses; [ bsd3 /* or */ gpl2Plus ]; 54 + maintainers = with maintainers; [ jk ]; 55 platforms = platforms.unix; 56 }; 57 }
+13
pkgs/development/libraries/libpwquality/python-binding-prefix.patch
···
··· 1 + diff --git a/python/Makefile.am b/python/Makefile.am 2 + index 1d00c0c..0987690 100644 3 + --- a/python/Makefile.am 4 + +++ b/python/Makefile.am 5 + @@ -14,7 +14,7 @@ all-local: 6 + CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) 7 + 8 + install-exec-local: 9 + - CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix} 10 + + CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${py} 11 + 12 + clean-local: 13 + rm -rf py$(PYTHONREV)
+3 -1
pkgs/top-level/all-packages.nix
··· 18729 18730 libpulsar = callPackage ../development/libraries/libpulsar { }; 18731 18732 - libpwquality = callPackage ../development/libraries/libpwquality { }; 18733 18734 libqalculate = callPackage ../development/libraries/libqalculate { 18735 readline = readline81;
··· 18729 18730 libpulsar = callPackage ../development/libraries/libpulsar { }; 18731 18732 + libpwquality = callPackage ../development/libraries/libpwquality { 18733 + python = python3; 18734 + }; 18735 18736 libqalculate = callPackage ../development/libraries/libqalculate { 18737 readline = readline81;
+7
pkgs/top-level/python-packages.nix
··· 4667 4668 libpyvivotek = callPackage ../development/python-modules/libpyvivotek { }; 4669 4670 libredwg = toPythonModule (pkgs.libredwg.override { 4671 enablePython = true; 4672 inherit (self) python libxml2;
··· 4667 4668 libpyvivotek = callPackage ../development/python-modules/libpyvivotek { }; 4669 4670 + libpwquality = pipe pkgs.libpwquality [ 4671 + toPythonModule 4672 + (p: p.overrideAttrs (super: { meta = super.meta // { outputsToInstall = [ "py" ]; }; })) 4673 + (p: p.override { enablePython = true; inherit python; }) 4674 + (p: p.py) 4675 + ]; 4676 + 4677 libredwg = toPythonModule (pkgs.libredwg.override { 4678 enablePython = true; 4679 inherit (self) python libxml2;