From 9a1da95d15e13a328fadd6de6f145e886c74e416 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 21 Sep 2025 16:33:07 +0200 Subject: [PATCH] haskellPackages: restrict darwin int ptr workaround to affected GHCs A fix was merged for GHC >= 9.10 which has been backported to GHC 9.8.2 and 9.6.5. - http://gitlab.haskell.org/ghc/ghc/-/commit/a5a7a0cead6de89648d3a7323c2dc64c59a830fc - https://gitlab.haskell.org/ghc/ghc/-/commit/92239edecc9b5c7462f9d261742ae7c19f67e757 --- pkgs/development/haskell-modules/generic-builder.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index f2ea85774d60..e4a846a28941 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -549,8 +549,10 @@ let } // env # Implicit pointer to integer conversions are errors by default since clang 15. - # Works around https://gitlab.haskell.org/ghc/ghc/-/issues/23456. - // optionalAttrs (stdenv.hasCC && stdenv.cc.isClang) { + # Works around https://gitlab.haskell.org/ghc/ghc/-/issues/23456. krank:ignore-line + # A fix was included in GHC 9.10.* and backported to 9.6.5 and 9.8.2 (but we no longer + # ship 9.8.1). + // optionalAttrs (lib.versionOlder ghc.version "9.6.5" && stdenv.hasCC && stdenv.cc.isClang) { NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion" + lib.optionalString (env ? NIX_CFLAGS_COMPILE) (" " + env.NIX_CFLAGS_COMPILE);