diff options
Diffstat (limited to 'scripts/ci/install-stack.sh')
-rwxr-xr-x | scripts/ci/install-stack.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/ci/install-stack.sh b/scripts/ci/install-stack.sh new file mode 100755 index 0000000..7be2700 --- /dev/null +++ b/scripts/ci/install-stack.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +BINDIR="$1"; shift + +cabal v2-install \ + --symlink-bindir="$BINDIR" \ + --constraint "network < 3" \ + --package-env=/dev/null \ + hpack || exit 1 + +stack_dir="$(mktemp --tmpdir -d "install-stack.XXXXXXXXX")" +trap 'rm -rf '"$stack_dir" 0 2 15 + +git clone \ + --depth=1 \ + --branch=stable \ + https://github.com/commercialhaskell/stack "$stack_dir" || exit 1 + +( + cd "$stack_dir" + "$BINDIR/hpack" + cabal v2-install \ + --symlink-bindir="$BINDIR" \ + --constraint "Cabal == 2.4.0.1" \ + --constraint "network < 3" . \ + --package-env=/dev/null || exit 1 +) || exit 1 |