Skip to content

Commit

Permalink
Merge pull request #223034 from vcunat/p/libxcrypt-legacy
Browse files Browse the repository at this point in the history
libxcrypt: add -legacy variant
  • Loading branch information
mweinelt authored Mar 25, 2023
2 parents 049dc17 + 34ec699 commit 40aed56
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
, perl
, unzip
, zlib
, libxcrypt-legacy
# extra params
, product
, javaVersion
Expand Down Expand Up @@ -46,6 +47,7 @@ stdenv.mkDerivation ({
buildInputs = [
stdenv.cc.cc.lib # libstdc++.so.6
zlib
libxcrypt-legacy # libcrypt.so.1 (default is .2 now)
] ++ extraBuildInputs;

unpackPhase = ''
Expand Down
9 changes: 6 additions & 3 deletions pkgs/development/libraries/libxcrypt/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{ lib, stdenv, fetchurl, perl, nixosTests }:
{ lib, stdenv, fetchurl, perl
# Update the enabled crypt scheme ids in passthru when the enabled hashes change
, enableHashes ? "strong"
, nixosTests
}:

stdenv.mkDerivation rec {
pname = "libxcrypt";
Expand All @@ -15,8 +19,7 @@ stdenv.mkDerivation rec {
];

configureFlags = [
# Update the enabled crypt scheme ids in passthru when the enabled hashes change
"--enable-hashes=strong"
"--enable-hashes=${enableHashes}"
"--enable-obsolete-api=glibc"
"--disable-failure-tokens"
] ++ lib.optionals (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.libc == "bionic") [
Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22242,6 +22242,7 @@ with pkgs;
fetchurl = stdenv.fetchurlBoot;
};
};
libxcrypt-legacy = libxcrypt.override { enableHashes = "all"; };

libxdg_basedir = callPackage ../development/libraries/libxdg-basedir { };

Expand Down

0 comments on commit 40aed56

Please sign in to comment.