about summary refs log tree commit diff
path: root/pkgs/development/interpreters/python
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2021-10-07 12:29:59 +0200
committerGitHub <noreply@github.com>2021-10-07 12:29:59 +0200
commit5d0972c63b95954e8f834efa1ffc38c739d8f089 (patch)
tree3dcf70382ca48db594a180fca683acb8898dba31 /pkgs/development/interpreters/python
parentf609e8290d7538f27c30dc05136ff207603eefcc (diff)
parent11fe2fc3cfccb95f7b99f2a2d1096c851868e582 (diff)
Merge pull request #138289 from sternenseemann/fix-non-gnu-strip
 stdenv: move --enable-deterministic-archives flag into GNU wrapper 
Diffstat (limited to 'pkgs/development/interpreters/python')
-rw-r--r--pkgs/development/interpreters/python/cpython/default.nix5
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 7bb2bb288931f..e4a974a255b89 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;