diff options
author | Arthur Gautier <baloo@superbaloo.net> | 2020-07-19 17:13:23 -0700 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2020-09-01 11:53:59 +0200 |
commit | a72822c23fb1c55eef84fdb181f8e4292f06aa3c (patch) | |
tree | 6ded2a77a76931fd2b3ca7f0e4b9aceb6646f0e4 /pkgs/development | |
parent | db919693e451031a91c92276e175b8e794de2d64 (diff) |
libpwquality: fixup static build
Close #96023 (original PR). Amended by vcunat (isMusl != isStatic).
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/libpwquality/default.nix | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/pkgs/development/libraries/libpwquality/default.nix b/pkgs/development/libraries/libpwquality/default.nix index bd45cb529f1ab..5d83b137b8e6c 100644 --- a/pkgs/development/libraries/libpwquality/default.nix +++ b/pkgs/development/libraries/libpwquality/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, autoreconfHook, perl, cracklib, python3 }: +{ stdenv, lib, fetchFromGitHub, autoreconfHook, perl, cracklib, python3, fetchpatch }: stdenv.mkDerivation rec { pname = "libpwquality"; @@ -11,8 +11,21 @@ stdenv.mkDerivation rec { sha256 = "0n4pjhm7wfivk0wizggaxq4y4mcxic876wcarjabkp5z9k14y36h"; }; - nativeBuildInputs = [ autoreconfHook perl ]; - buildInputs = [ cracklib python3 ]; + 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" + ]; meta = with lib; { description = "Password quality checking and random password generation library"; |