Skip to content

Commit

Permalink
Make the start script select the right stack snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Aug 17, 2023
1 parent d27f76f commit 6288a69
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,20 @@ case "${MODE}" in
;;
esac > "${ZLIB_BUILD_FILE}"

declare SNAPSHOT
case "$GHC_VERSION" in
9.2.*)
SNAPSHOT=lts-20.3
;;
9.4.*)
SNAPSHOT=lts-21.5
;;
*)
stderr "unsupported GHC version: ${GHC_VERSION}"
exit 1
esac


## Write WORKSPACE File ################################################

stderr "Creating WORKSPACE"
Expand Down Expand Up @@ -233,8 +247,8 @@ stack_snapshot(
extra_deps = {"zlib": ["@zlib.dev//:zlib"]},
packages = ["zlib"],
# LTS snapshot published for ghc-9.2.5 (default version used by rules_haskell)
snapshot = "lts-20.3",
# LTS snapshot published for ghc-${GHC_VERSION} (default version used by rules_haskell)
snapshot = "$SNAPSHOT",
# This uses an unpinned version of stack_snapshot, meaning that stack is invoked on every build.
# To switch to pinned stackage dependencies, run \`bazel run @stackage-unpinned//:pin\` and
Expand Down

0 comments on commit 6288a69

Please sign in to comment.