haskellPackages: fix some pkgsCross.ucrt64 packages (#481185)

This commit is contained in:
Wolfgang Walther
2026-02-17 19:28:13 +00:00
committed by GitHub
3 changed files with 32 additions and 10 deletions
@@ -274,7 +274,7 @@ with haskellLib;
"vector-tests-O2"
];
# inspection-testing doesn't work on all archs & ABIs
doCheck = !self.inspection-testing.meta.broken;
doCheck = super.vector.doCheck && !self.inspection-testing.meta.broken;
}) super.vector;
# https://github.com/lspitzner/data-tree-print/issues/4
@@ -494,15 +494,20 @@ with haskellLib;
jpeg-turbo = dontCheck super.jpeg-turbo;
JuicyPixels-jpeg-turbo = dontCheck super.JuicyPixels-jpeg-turbo;
# Fixes compilation for basement on i686
# https://github.com/haskell-foundation/foundation/pull/573
basement = appendPatches [
# Fixes compilation for basement on i686
# https://github.com/haskell-foundation/foundation/pull/573
(fetchpatch {
name = "basement-i686-ghc-9.4.patch";
url = "https://github.com/haskell-foundation/foundation/pull/573/commits/38be2c93acb6f459d24ed6c626981c35ccf44095.patch";
sha256 = "17kz8glfim29vyhj8idw8bdh3id5sl9zaq18zzih3schfvyjppj7";
stripLen = 1;
})
# Fixes compilation on windows
# Repo is archived, package is abandoned: https://github.com/haskell-foundation/foundation
./patches/basement-add-cast.patch
] super.basement;
# Fixes compilation of memory with GHC >= 9.4 on 32bit platforms
@@ -2362,6 +2367,13 @@ with haskellLib;
pkgs.stdenv.hostPlatform.isPower64 && pkgs.stdenv.hostPlatform.isBigEndian
) super.crypton-x509-validation;
crypton-x509-system = overrideCabal (drv: {
# Case sensitive when doing cross-compilation to windows
postPatch = drv.postPatch or "" + ''
substituteInPlace crypton-x509-system.cabal --replace-fail "Crypt32" "crypt32"
'';
}) super.crypton-x509-system;
# Likely fallout from the crypton issues
# exception: HandshakeFailed (Error_Protocol "bad PubKeyALG_Ed448 signature for ecdhparams" DecryptError)
tls = dontCheckIf (
@@ -8,6 +8,10 @@ with haskellLib;
(self: super: {
# cabal2nix doesn't properly add dependencies conditional on os(windows)
http-client = addBuildDepends [ self.safe ] super.http-client;
unix-time = addBuildDepends [ pkgs.windows.pthreads ] super.unix-time;
network = lib.pipe super.network [
(addBuildDepends [ self.temporary ])
@@ -42,11 +46,4 @@ with haskellLib;
splitmix
temporary
;
# 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;
})
@@ -0,0 +1,13 @@
diff --git a/Basement/Terminal/Size.hsc b/Basement/Terminal/Size.hsc
index 62c315e..4bfe0ad 100644
--- a/Basement/Terminal/Size.hsc
+++ b/Basement/Terminal/Size.hsc
@@ -121,7 +121,7 @@ instance Storable ConsoleScreenBufferInfo where
#{poke CONSOLE_SCREEN_BUFFER_INFO, dwMaximumWindowSize} ptr m
invalidHandleValue :: IntPtr
-invalidHandleValue = #{const INVALID_HANDLE_VALUE}
+invalidHandleValue = IntPtr $ #{const (long long int)INVALID_HANDLE_VALUE}
stdOutputHandle :: CULong
stdOutputHandle = #{const STD_OUTPUT_HANDLE}