From ff30c899d8bd92d1a1c9f4d4e81455b04cb0868e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 16 Jul 2022 22:42:23 +0200 Subject: [PATCH] glibc: make crypt support optional The libcrypt library is going to be replaced with libxcrypt in packages that require it. --- pkgs/development/libraries/glibc/common.nix | 5 ++++- pkgs/development/libraries/glibc/default.nix | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 6ed0a4d4da0fe..83cde07749496 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -36,6 +36,7 @@ , withLinuxHeaders ? false , profilingLibraries ? false , withGd ? false +, withLibcrypt ? false , meta , extraBuildInputs ? [] , extraNativeBuildInputs ? [] @@ -183,7 +184,9 @@ stdenv.mkDerivation ({ # To avoid linking with -lgcc_s (dynamic link) # so the glibc does not depend on its compiler store path "libc_cv_as_needed=no" - ] ++ lib.optional withGd "--with-gd"; + ] + ++ lib.optional withGd "--with-gd" + ++ lib.optional (!withLibcrypt) "--disable-crypt"; makeFlags = [ "OBJCOPY=${stdenv.cc.targetPrefix}objcopy" diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 728b97d2f5f4e..8602498f01b94 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -2,6 +2,7 @@ , withLinuxHeaders ? true , profilingLibraries ? false , withGd ? false +, withLibcrypt? false , buildPackages }: @@ -16,7 +17,7 @@ in callPackage ./common.nix { inherit stdenv; } { pname = "glibc" + lib.optionalString withGd "-gd"; - inherit withLinuxHeaders profilingLibraries withGd; + inherit withLinuxHeaders profilingLibraries withGd withLibcrypt; # Note: # Things you write here override, and do not add to,