From eca13b37fd12f76a9f261427415fbc222423f4f5 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 19 Jan 2024 23:14:34 -0800 Subject: [PATCH] haskell-modules: cope with !(stdenv.cc.libcxx?cxxabi) --- pkgs/development/haskell-modules/generic-builder.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 1819b29da460c..ad03fd0353c0d 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -821,7 +821,7 @@ stdenv.mkDerivation ({ # 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.hasCC && stdenv.cc.isClang && stdenv.cc.libcxx != null) { +// lib.optionalAttrs (stdenv.hasCC && stdenv.cc.isClang && stdenv.cc.libcxx != null && stdenv.cc.libcxx?cxxabi.libName) { NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}"; } )