Skip to content

Commit

Permalink
glibc: make crypt support optional
Browse files Browse the repository at this point in the history
The libcrypt library is going to be replaced with libxcrypt in packages
that require it.
  • Loading branch information
mweinelt committed Oct 9, 2022
1 parent 3e675d0 commit ff30c89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkgs/development/libraries/glibc/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
, withLinuxHeaders ? false
, profilingLibraries ? false
, withGd ? false
, withLibcrypt ? false
, meta
, extraBuildInputs ? []
, extraNativeBuildInputs ? []
Expand Down Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/libraries/glibc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, withLinuxHeaders ? true
, profilingLibraries ? false
, withGd ? false
, withLibcrypt? false
, buildPackages
}:

Expand All @@ -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,
Expand Down

0 comments on commit ff30c89

Please sign in to comment.