@@ -161,25 +161,42 @@ with haskellLib;
161161 hackage-db-unstable
162162 ;
163163
164- # Stack uses pure nix-shells for certain operations including HTTPS requests
165- # This patch makes stack add pkgs.cacert, so the certificate DB is available.
166- # https://github.com/commercialhaskell/stack/pull/6854 krank:ignore-line
167164 stack =
168165 appendPatches
169166 [
167+ # Bug fix that is also necessary for the following patches to apply
170168 ( pkgs . fetchpatch {
171- name = "stack-add-cacert-to-pure-shells.patch" ;
172- url = "https://github.com/commercialhaskell/stack/commit/e869263cbd84a9e59ce1fa467e82993c8e7fb1dd.patch" ;
173- hash = "sha256-O7GaNgcGBY6m6GHqVtejqOu2HCWWKWXARPnr/upT1RQ=" ;
174- includes = [ "src/Stack/Nix.hs" ] ;
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=" ;
175192 } )
176193 ]
177194 (
178195 overrideCabal ( drv : {
179196 # Stack's source files use CRLF
180197 prePatch = ''
181198 ${ drv . prePatch or "" }
182- sed -i -e 's/\r$//' src/Stack/Nix.hs
199+ find doc src -type f -exec sed -i -e 's/\r$//' '{}' '+'
183200 '' ;
184201 } ) super . stack
185202 ) ;
0 commit comments