about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/haskell-modules/generic-builder.nix')
-rw-r--r--nixpkgs/pkgs/development/haskell-modules/generic-builder.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix b/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix
index 0b8af6ba6de4..1819b29da460 100644
--- a/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix
+++ b/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix
@@ -814,14 +814,14 @@ stdenv.mkDerivation ({
 
 # Implicit pointer to integer conversions are errors by default since clang 15.
 # Works around https://gitlab.haskell.org/ghc/ghc/-/issues/23456.
-// lib.optionalAttrs stdenv.cc.isClang {
+// lib.optionalAttrs (stdenv.hasCC && stdenv.cc.isClang) {
   NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion";
 }
 
 # 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) {
+// lib.optionalAttrs (stdenv.hasCC && stdenv.cc.isClang && stdenv.cc.libcxx != null) {
   NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
 }
 )