git.iko.soy/typeable/nixpkgs
on master help sign in
libpwquality: fixup static build

Close #96023 (original PR). Amended by vcunat (isMusl != isStatic).

commita72822c23fb1c55eef84fdb181f8e4292f06aa3c authorArthur Gautier <baloo@superbaloo.net> dateSun 19 Jul 2020, 17:13 (6 years ago) parentdb91969
1 file changed+16−3
pkgs/development/libraries/libpwquality/default.nix+16−3
pkgs/development/libraries/libpwquality/default.nix+16−3
@@ -1,4 +1,4 @@
1−{ stdenv, lib, fetchFromGitHub, autoreconfHook, perl, cracklib, python3 }:
1+{ stdenv, lib, fetchFromGitHub, autoreconfHook, perl, cracklib, python3, fetchpatch }:
22
33stdenv.mkDerivation rec {
44 pname = "libpwquality";
@@ -11,8 +11,21 @@ stdenv.mkDerivation rec {
1111 sha256 = "0n4pjhm7wfivk0wizggaxq4y4mcxic876wcarjabkp5z9k14y36h";
1212 };
1313
14− nativeBuildInputs = [ autoreconfHook perl ];
15− buildInputs = [ cracklib python3 ];
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+ ];
1629
1730 meta = with lib; {
1831 description = "Password quality checking and random password generation library";