haskellPackages: more pkgsCross.ucrt64 fixes (#449004)

This commit is contained in:
Wolfgang Walther
2025-10-24 08:06:17 +00:00
committed by GitHub
11 changed files with 38 additions and 2 deletions
@@ -55,7 +55,8 @@
gmp,
# If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform,
enableRelocatedStaticLibs ?
stdenv.targetPlatform != stdenv.hostPlatform && !stdenv.targetPlatform.isWindows,
# Exceeds Hydra output limit (at the time of writing ~3GB) when cross compiled to riscv64.
# A riscv64 cross-compiler fits into the limit comfortably.
@@ -332,6 +333,8 @@ let
# documentation) makes the GHC RTS able to load static libraries, which may
# be needed for TemplateHaskell. This solution was described in
# https://www.tweag.io/blog/2020-09-30-bazel-static-haskell
#
# Note `-fexternal-dynamic-refs` causes `undefined reference` errors when building GHC cross compiler for windows
lib.optionals enableRelocatedStaticLibs [
"*.*.ghc.*.opts += -fPIC -fexternal-dynamic-refs"
]
@@ -1156,7 +1156,6 @@ with haskellLib;
Cabal-ide-backend = dontCheck super.Cabal-ide-backend;
# This package can't be built on non-Windows systems.
Win32 = overrideCabal (drv: { broken = !pkgs.stdenv.hostPlatform.isCygwin; }) super.Win32;
inline-c-win32 = dontDistribute super.inline-c-win32;
Southpaw = dontDistribute super.Southpaw;
@@ -36,4 +36,5 @@ self: super: {
transformers = null;
unix = null;
xhtml = null;
Win32 = null;
}
@@ -63,6 +63,7 @@ in
transformers = null;
unix = null;
xhtml = null;
Win32 = null;
# “Unfortunately we are unable to support GHC 9.10.”
apply-refact = dontDistribute (markBroken super.apply-refact);
@@ -66,6 +66,7 @@ with haskellLib;
transformers = null;
unix = null;
xhtml = null;
Win32 = null;
#
# Hand pick versions that are compatible with ghc 9.12 and base 4.21
@@ -51,4 +51,5 @@ self: super: {
transformers = null;
unix = null;
xhtml = null;
Win32 = null;
}
@@ -50,6 +50,7 @@ self: super: {
# GHC only bundles the xhtml library if haddock is enabled, check if this is
# still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
xhtml = if self.ghc.hasHaddock or true then null else doDistribute self.xhtml_3000_4_0_0;
Win32 = null;
# Becomes a core package in GHC >= 9.8
semaphore-compat = doDistribute self.semaphore-compat_1_0_0;
@@ -58,6 +58,7 @@ in
transformers = null;
unix = null;
xhtml = null;
Win32 = null;
# Becomes a core package in GHC >= 9.8
semaphore-compat = doDistribute self.semaphore-compat_1_0_0;
@@ -61,6 +61,7 @@ in
transformers = null;
unix = null;
xhtml = null;
Win32 = null;
# Becomes a core package in GHC >= 9.10
os-string = doDistribute self.os-string_2_0_8;
@@ -0,0 +1,23 @@
{ pkgs, haskellLib }:
let
inherit (pkgs) fetchpatch lib;
in
with haskellLib;
(self: super: {
# cabal2nix doesn't properly add dependencies conditional on os(windows)
network =
if pkgs.stdenv.hostPlatform.isWindows then
addBuildDepends [ self.temporary ] super.network
else
super.network;
# https://github.com/fpco/streaming-commons/pull/84
streaming-commons = appendPatch (fetchpatch {
name = "fix-headers-case.patch";
url = "https://github.com/fpco/streaming-commons/commit/6da611f63e9e862523ce6ee53262ddbc9681ae24.patch";
sha256 = "sha256-giEQqXZfoiAvtCFohdgOoYna2Tnu5aSYAOUH8YVldi0=";
}) super.streaming-commons;
})
@@ -15,6 +15,7 @@
configurationNix ? import ./configuration-nix.nix,
configurationArm ? import ./configuration-arm.nix,
configurationDarwin ? import ./configuration-darwin.nix,
configurationWindows ? import ./configuration-windows.nix,
configurationJS ? import ./configuration-ghcjs-9.x.nix,
}:
@@ -42,6 +43,9 @@ let
++ lib.optionals stdenv.hostPlatform.isDarwin [
(configurationDarwin { inherit pkgs haskellLib; })
]
++ lib.optionals stdenv.hostPlatform.isWindows [
(configurationWindows { inherit pkgs haskellLib; })
]
++ lib.optionals stdenv.hostPlatform.isGhcjs [
(configurationJS { inherit pkgs haskellLib; })
];