From 45787812a2e066aa8d527ecc202f0ff07d39d11c Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Tue, 28 May 2024 10:38:44 +0200 Subject: [PATCH] Disable haddock for nightly stack snapshot on Windows This works around https://github.com/tweag/rules_haskell/issues/2200 --- start | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/start b/start index 16cc405a2..784801d65 100755 --- a/start +++ b/start @@ -201,6 +201,8 @@ case "${MODE}" in ;; esac > "${ZLIB_BUILD_FILE}" +WITH_HADDOCK=True + case "$GHC_VERSION" in 8.10.*) SNAPSHOT=lts-18.28 @@ -218,6 +220,12 @@ case "$GHC_VERSION" in SNAPSHOT=lts-22.22 ;; *) + # zlib >= 0.7.1.0 depends on zlib-clib on Windows (unless using pkg-config), since zlib-clib is + # a C only cabal library that does not produce any haddock this results in an error. + # See https://github.com/tweag/rules_haskell/issues/2200 + if [ "$( uname )" = "WindowsNT" ]; then + WITH_HADDOCK=False + fi SNAPSHOT=nightly-2024-05-24 stderr "warning: unsupported GHC version: ${GHC_VERSION}, using stack resolver ${SNAPSHOT}" esac @@ -273,6 +281,7 @@ stack_snapshot( # disable calling pkg-config flags = {"zlib": ["-pkg-config"]}, + haddock = $WITH_HADDOCK, # LTS snapshot published for ghc-${GHC_VERSION} (default version used by rules_haskell) snapshot = "$SNAPSHOT",