From b3b775d96a28680c2717f8e430fc2330275da2d5 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..cff69ca9c 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 + case "$( uname )" in + WindowsNT | MINGW* | MSYS* ) WITH_HADDOCK=False ;; + case 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",