diff options
Diffstat (limited to 'pkgs/development/interpreters/python/cpython/default.nix')
-rw-r--r-- | pkgs/development/interpreters/python/cpython/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 7bb2bb28893..e4a974a255b 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -284,7 +284,10 @@ in with passthru; stdenv.mkDerivation { CPPFLAGS = concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs); LDFLAGS = concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs); LIBS = "${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"; - NIX_LDFLAGS = optionalString (stdenv.isLinux && !stdenv.hostPlatform.isMusl) "-lgcc_s" + optionalString stdenv.hostPlatform.isMusl "-lgcc_eh"; + NIX_LDFLAGS = lib.optionalString stdenv.cc.isGNU ({ + "glibc" = "-lgcc_s"; + "musl" = "-lgcc_eh"; + }."${stdenv.hostPlatform.libc}" or ""); # Determinism: We fix the hashes of str, bytes and datetime objects. PYTHONHASHSEED=0; |