summaryrefslogtreecommitdiffstats
path: root/pkgs/development/haskell-modules
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2023-11-11 16:35:24 +0100
committerVladimír Čunát <v@cunat.cz>2023-11-11 16:35:24 +0100
commit4f431bd1de2580016fb98942877b6a521a2b89b4 (patch)
tree74c978f9704b2ac1af3f128a73a85aa3c0748813 /pkgs/development/haskell-modules
parent652204165dd39420b8662b82d311e511b3ec0d99 (diff)
parent8164b1909683807e43bc4d22ecdb8b396ca5fef9 (diff)
Merge #266172: haskell-modules/generic-builder.nix: work around libc++abi issue
...into staging-next We have lots of binaries in cache.nixos.org for this combination already.
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r--pkgs/development/haskell-modules/generic-builder.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix
index 7001e4220bae..6cfd92fb4307 100644
--- a/pkgs/development/haskell-modules/generic-builder.nix
+++ b/pkgs/development/haskell-modules/generic-builder.nix
@@ -811,5 +811,12 @@ stdenv.mkDerivation ({
// optionalAttrs (args ? dontStrip) { inherit dontStrip; }
// optionalAttrs (postPhases != []) { inherit postPhases; }
// optionalAttrs (stdenv.buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; }
+
+# Ensure libc++abi is linked even when clang is invoked as just `clang` or `cc`.
+# Works around https://github.com/NixOS/nixpkgs/issues/166205.
+# This can be dropped once a fix has been committed to cc-wrapper.
+// lib.optionalAttrs (stdenv.cc.isClang && stdenv.cc.libcxx != null) {
+ env.NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
+}
)
)