diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:21 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:48 +0100 |
commit | 048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch) | |
tree | f8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/development/haskell-modules/generic-builder.nix | |
parent | 030c5028b07afcedce7c5956015c629486cc79d9 (diff) | |
parent | 4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff) | |
download | nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar.gz nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar.bz2 nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar.lz nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar.xz nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar.zst nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.zip |
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/development/haskell-modules/generic-builder.nix')
-rw-r--r-- | pkgs/development/haskell-modules/generic-builder.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 7001e4220ba..1819b29da46 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -811,5 +811,18 @@ stdenv.mkDerivation ({ // optionalAttrs (args ? dontStrip) { inherit dontStrip; } // 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.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.hasCC && stdenv.cc.isClang && stdenv.cc.libcxx != null) { + NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}"; +} ) ) |