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
201201 ;;
202202esac > " ${ZLIB_BUILD_FILE} "
203203
204+ WITH_HADDOCK=True
205+
204206case " $GHC_VERSION " in
205207 8.10.* )
206208 SNAPSHOT=lts-18.28
@@ -218,6 +220,12 @@ case "$GHC_VERSION" in
218220 SNAPSHOT=lts-22.22
219221 ;;
220222 * )
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
221229 SNAPSHOT=nightly-2024-05-24
222230 stderr " warning: unsupported GHC version: ${GHC_VERSION} , using stack resolver ${SNAPSHOT} "
223231esac
@@ -273,6 +281,7 @@ stack_snapshot(
273281
274282 # disable calling pkg-config
275283 flags = {"zlib": ["-pkg-config"]},
284+ haddock = $WITH_HADDOCK ,
276285
277286 # LTS snapshot published for ghc-${GHC_VERSION} (default version used by rules_haskell)
278287 snapshot = "$SNAPSHOT ",
You can’t perform that action at this time.
0 commit comments