glibc: make crypt support optional

The libcrypt library is going to be replaced with libxcrypt in packages
that require it.
This commit is contained in:
Martin Weinelt
2022-10-09 18:07:53 +02:00
parent 3e675d06f5
commit ff30c899d8
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -36,6 +36,7 @@
, withLinuxHeaders ? false , withLinuxHeaders ? false
, profilingLibraries ? false , profilingLibraries ? false
, withGd ? false , withGd ? false
, withLibcrypt ? false
, meta , meta
, extraBuildInputs ? [] , extraBuildInputs ? []
, extraNativeBuildInputs ? [] , extraNativeBuildInputs ? []
@@ -183,7 +184,9 @@ stdenv.mkDerivation ({
# To avoid linking with -lgcc_s (dynamic link) # To avoid linking with -lgcc_s (dynamic link)
# so the glibc does not depend on its compiler store path # so the glibc does not depend on its compiler store path
"libc_cv_as_needed=no" "libc_cv_as_needed=no"
] ++ lib.optional withGd "--with-gd"; ]
++ lib.optional withGd "--with-gd"
++ lib.optional (!withLibcrypt) "--disable-crypt";
makeFlags = [ makeFlags = [
"OBJCOPY=${stdenv.cc.targetPrefix}objcopy" "OBJCOPY=${stdenv.cc.targetPrefix}objcopy"
+2 -1
View File
@@ -2,6 +2,7 @@
, withLinuxHeaders ? true , withLinuxHeaders ? true
, profilingLibraries ? false , profilingLibraries ? false
, withGd ? false , withGd ? false
, withLibcrypt? false
, buildPackages , buildPackages
}: }:
@@ -16,7 +17,7 @@ in
callPackage ./common.nix { inherit stdenv; } { callPackage ./common.nix { inherit stdenv; } {
pname = "glibc" + lib.optionalString withGd "-gd"; pname = "glibc" + lib.optionalString withGd "-gd";
inherit withLinuxHeaders profilingLibraries withGd; inherit withLinuxHeaders profilingLibraries withGd withLibcrypt;
# Note: # Note:
# Things you write here override, and do not add to, # Things you write here override, and do not add to,