Skip to content

Commit f479cba

Browse files
stack: apply patches for semaphore-compat >= 2.0
Apply patches from commercialhaskell/stack#6935 allowing us to build stack with GHC 9.12.5-rc2 (but no other GHC version). Patch for the change log is not included (due to likely conflict problems), but other documentation included with stack is updated. We also apply an unrelated bug fix, so we don't need to rebase the patches.
1 parent f87fabd commit f479cba

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

pkgs/development/haskell-modules/configuration-common.nix

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,46 @@ with haskellLib;
161161
hackage-db-unstable
162162
;
163163

164+
stack =
165+
appendPatches
166+
[
167+
# Bug fix that is also necessary for the following patches to apply
168+
(pkgs.fetchpatch {
169+
name = "stack-dep-without-main-library.patch";
170+
url = "https://github.com/commercialhaskell/stack/commit/591b6eb225b4cd2cfa4d282089fdb33e86bb14ad.patch";
171+
hash = "sha256-GTUBGZ1KWQii60Yt9JpKcwMkzuIuSTdKLGd3aM0jXWw=";
172+
})
173+
# FIXME(@sternenseemann): these URLs are not stable (yet)
174+
# Pick patches to support semaphore-compat >= 2.0
175+
# from https://github.com/commercialhaskell/stack/pull/6935
176+
# c.f. https://github.com/commercialhaskell/stack/issues/693
177+
(pkgs.fetchpatch {
178+
name = "stack-semaphore-compat-2.0.patch";
179+
url = "https://github.com/commercialhaskell/stack/commit/c9e3cbc3f460de65d5abeffb583242255b41be23.patch";
180+
includes = [ "src/**" ];
181+
hash = "sha256-flf1f/QoBZAw9VRTzdNJQu+Zt1b+9q/pi7+1ukCad6c=";
182+
})
183+
(pkgs.fetchpatch {
184+
name = "stack-semaphore-compat-compiler-paths.patch";
185+
url = "https://github.com/commercialhaskell/stack/commit/02fa193245fc7210c6ce88646b2fa94ab39b9fc4.patch";
186+
hash = "sha256-oE0GfXADSYlPceurzeZbq1Ix14gOtZEBssA8ZINv2qs=";
187+
})
188+
(pkgs.fetchpatch {
189+
name = "stack-semaphore-ghc-compat-map.patch";
190+
url = "https://github.com/commercialhaskell/stack/commit/960e704b9cd61094b75fad4689f0034b4435a268.patch";
191+
hash = "sha256-zYIsttG3z4gbpfXgQsKz0PlkAEzODlLYiYdPpfBohvM=";
192+
})
193+
]
194+
(
195+
overrideCabal (drv: {
196+
# Stack's source files use CRLF
197+
prePatch = ''
198+
${drv.prePatch or ""}
199+
find doc src -type f -exec sed -i -e 's/\r$//' '{}' '+'
200+
'';
201+
}) super.stack
202+
);
203+
164204
# Extensions wants a specific version of Cabal for its list of Haskell
165205
# language extensions.
166206
extensions = doJailbreak (

0 commit comments

Comments
 (0)