diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index e72f24e069441..8a15d96089b4b 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -342,7 +342,7 @@ let "*.*.ghc.c.opts += -optc-std=gnu99" ] # Inform GHC that we can't load dynamic libraries which forces iserv-proxy to load static libraries. - ++ lib.optionals targetPlatform.isStatic [ + ++ lib.optionals (targetPlatform.isAndroid || targetPlatform.isStatic) [ "*.ghc.cabal.configure.opts += --flags=-dynamic-system-linker" ]; @@ -636,7 +636,7 @@ stdenv.mkDerivation ( "--with-ffi-includes=${targetLibs.libffi.dev}/include" "--with-ffi-libraries=${targetLibs.libffi.out}/lib" ] - ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [ + ++ lib.optionals (!enableNativeBignum) [ "--with-gmp-includes=${targetLibs.gmp.dev}/include" "--with-gmp-libraries=${targetLibs.gmp.out}/lib" ] diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix index 41b81b6ba15f0..87ae4253eb29c 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix @@ -38,7 +38,6 @@ in haskeline = null; hpc = null; integer-gmp = null; - libiserv = null; mtl = null; parsec = null; pretty = null; @@ -60,6 +59,11 @@ in xhtml = null; Win32 = null; + # Was only ever released for a few exact versions of ghc + libiserv = unmarkBroken (doJailbreak super.libiserv); + + iserv-proxy = addBuildDepends [ self.libiserv ] super.iserv-proxy; + # Becomes a core package in GHC >= 9.8 semaphore-compat = doDistribute self.semaphore-compat_1_0_0; diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index f434334909ef6..c9ea344574a0c 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1279,9 +1279,6 @@ builtins.intersectAttrs super { ''; }) (addBuildTool pkgs.buildPackages.makeWrapper super.cut-the-crap); - # Compiling the readme throws errors and has no purpose in nixpkgs - aeson-gadt-th = disableCabalFlag "build-readme" super.aeson-gadt-th; - # Fix compilation of Setup.hs by removing the module declaration. # See: https://github.com/tippenein/guid/issues/1 guid = overrideCabal (drv: { @@ -2151,9 +2148,10 @@ builtins.intersectAttrs super { enableExternalInterpreter = false; }; in - lib.mapAttrs (_: noExternalInterpreter) { inherit (super) iserv-proxy network; } + lib.mapAttrs (_: noExternalInterpreter) { inherit (super) iserv-proxy libiserv network; } ) iserv-proxy + libiserv network ; } diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 0d488ed48ef21..515d961756930 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -22,10 +22,15 @@ let crossSupport = rec { emulator = stdenv.hostPlatform.emulator buildPackages; + hasBuiltinTH = stdenv.hostPlatform.isGhcjs; + canProxyTH = # iserv-proxy currently does not build on GHC 9.6 lib.versionAtLeast ghc.version "9.8" && stdenv.hostPlatform.emulatorAvailable buildPackages; + # Many suites use Template Haskell for test discovery, including QuickCheck + canCheck = hasBuiltinTH || canProxyTH; + iservWrapper = let wrapperScript = @@ -602,7 +607,7 @@ let export GHC_PACKAGE_PATH="''${NIX_GHC_PACKAGE_PATH_FOR_TEST}" fi - exec "$@" + exec ${if (isCross && crossSupport.canCheck) then "node" else crossSupport.emulator} "$@" ''; testTargetsString =