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}