File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,8 @@ case "${MODE}" in
201
201
;;
202
202
esac > " ${ZLIB_BUILD_FILE} "
203
203
204
+ WITH_HADDOCK=True
205
+
204
206
case " $GHC_VERSION " in
205
207
8.10.* )
206
208
SNAPSHOT=lts-18.28
@@ -218,6 +220,12 @@ case "$GHC_VERSION" in
218
220
SNAPSHOT=lts-22.22
219
221
;;
220
222
* )
223
+ # zlib >= 0.7.1.0 depends on zlib-clib on Windows (unless using pkg-config), since zlib-clib is
224
+ # a C only cabal library that does not produce any haddock this results in an error.
225
+ # See https://github.com/tweag/rules_haskell/issues/2200
226
+ case " $( uname ) " in
227
+ WindowsNT | MINGW* | MSYS* ) WITH_HADDOCK=False ;;
228
+ esac
221
229
SNAPSHOT=nightly-2024-05-24
222
230
stderr " warning: unsupported GHC version: ${GHC_VERSION} , using stack resolver ${SNAPSHOT} "
223
231
esac
@@ -273,6 +281,7 @@ stack_snapshot(
273
281
274
282
# disable calling pkg-config
275
283
flags = {"zlib": ["-pkg-config"]},
284
+ haddock = $WITH_HADDOCK ,
276
285
277
286
# LTS snapshot published for ghc-${GHC_VERSION} (default version used by rules_haskell)
278
287
snapshot = "$SNAPSHOT ",
You can’t perform that action at this time.
0 commit comments