From b67242ab87d45f6de925d6b098eeabc4f1a23b4c Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Sat, 17 Jan 2026 23:46:38 +0000 Subject: [PATCH 1/6] haskellPackages.streaming-commons: remove upstreamed patch --- pkgs/development/haskell-modules/configuration-windows.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-windows.nix b/pkgs/development/haskell-modules/configuration-windows.nix index 2072fb9fe1bb..41018680c21d 100644 --- a/pkgs/development/haskell-modules/configuration-windows.nix +++ b/pkgs/development/haskell-modules/configuration-windows.nix @@ -42,11 +42,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; }) From 47f400c51b343fe1355e8e874be873040cca6e38 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Sat, 17 Jan 2026 20:13:24 +0000 Subject: [PATCH 2/6] haskellPackages.vector: gate rather than set `doCheck` attribute --- pkgs/development/haskell-modules/configuration-common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 0c8239346a81..db12a16ec412 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -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 From ba8adba7434bc4605f60254f362adb52a4b5bf0e Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Sat, 17 Jan 2026 20:34:39 +0000 Subject: [PATCH 3/6] haskellPackages.unix-time: add dependency on `pthreads` for windows --- pkgs/development/haskell-modules/configuration-windows.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-windows.nix b/pkgs/development/haskell-modules/configuration-windows.nix index 41018680c21d..bec791e0e199 100644 --- a/pkgs/development/haskell-modules/configuration-windows.nix +++ b/pkgs/development/haskell-modules/configuration-windows.nix @@ -8,6 +8,8 @@ with haskellLib; (self: super: { # cabal2nix doesn't properly add dependencies conditional on os(windows) + unix-time = addBuildDepends [ pkgs.windows.pthreads ] super.unix-time; + network = lib.pipe super.network [ (addBuildDepends [ self.temporary ]) From b2b6246ed8ede6b4e5601554dcf28b2fc9854ed8 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Sat, 17 Jan 2026 20:37:18 +0000 Subject: [PATCH 4/6] haskellPackages.basement: apply patch for integer cast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes error: Size.hsc:126:30: error: initialization of ‘long long int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] --- .../haskell-modules/configuration-common.nix | 9 +++++++-- .../haskell-modules/patches/basement-add-cast.patch | 13 +++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/haskell-modules/patches/basement-add-cast.patch diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index db12a16ec412..ac1c26e53817 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -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 diff --git a/pkgs/development/haskell-modules/patches/basement-add-cast.patch b/pkgs/development/haskell-modules/patches/basement-add-cast.patch new file mode 100644 index 000000000000..1dd4fb559989 --- /dev/null +++ b/pkgs/development/haskell-modules/patches/basement-add-cast.patch @@ -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} From 35dd3a3a2a294d5a51a7920c3db39b74224792d6 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Sat, 17 Jan 2026 21:10:47 +0000 Subject: [PATCH 5/6] haskellPackages.http-client: add dependency on `safe` for windows --- pkgs/development/haskell-modules/configuration-windows.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-windows.nix b/pkgs/development/haskell-modules/configuration-windows.nix index bec791e0e199..7d5952bc6dee 100644 --- a/pkgs/development/haskell-modules/configuration-windows.nix +++ b/pkgs/development/haskell-modules/configuration-windows.nix @@ -8,6 +8,8 @@ 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 [ From 531aa6ec70acbfaba4e911a6e750b7c518ad6027 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Sat, 17 Jan 2026 21:11:20 +0000 Subject: [PATCH 6/6] haskellPackages.crypton-x509-system: fix case on library dependency --- pkgs/development/haskell-modules/configuration-common.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index ac1c26e53817..7ada9adae63d 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2367,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 (