summary refs log tree commit diff
diff options
context:
space:
mode:
authorRandy Eckenrode <randy@largeandhighquality.com>2023-11-13 18:41:44 -0500
committerRandy Eckenrode <randy@largeandhighquality.com>2023-11-13 19:12:07 -0500
commit251c69af0e45936c39e363f9d7ae1eefd8095b3b (patch)
tree29c3af123630fbcee88be943ca3b5edaceace711
parent884449105ea418fb8d205c0e1cd37a32b49c18db (diff)
downloadnixpkgs-251c69af0e45936c39e363f9d7ae1eefd8095b3b.tar
nixpkgs-251c69af0e45936c39e363f9d7ae1eefd8095b3b.tar.gz
nixpkgs-251c69af0e45936c39e363f9d7ae1eefd8095b3b.tar.bz2
nixpkgs-251c69af0e45936c39e363f9d7ae1eefd8095b3b.tar.lz
nixpkgs-251c69af0e45936c39e363f9d7ae1eefd8095b3b.tar.xz
nixpkgs-251c69af0e45936c39e363f9d7ae1eefd8095b3b.tar.zst
nixpkgs-251c69af0e45936c39e363f9d7ae1eefd8095b3b.zip
haskell-modules/generic-builder.nix: work around int conversion errors
Work around https://gitlab.haskell.org/ghc/ghc/-/issues/23456. Implicit
pointer to integer conversions have been an error since clang 15.
-rw-r--r--pkgs/development/haskell-modules/generic-builder.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix
index 6cfd92fb430..c840215f917 100644
--- a/pkgs/development/haskell-modules/generic-builder.nix
+++ b/pkgs/development/haskell-modules/generic-builder.nix
@@ -812,6 +812,12 @@ stdenv.mkDerivation ({
 // optionalAttrs (postPhases != [])              { inherit postPhases; }
 // optionalAttrs (stdenv.buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; }
 
+# 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 {
+  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.