2018-08-06 21:00:58 +03:00
|
|
|
#!/usr/bin/env bash
|
2018-05-14 00:25:41 +03:00
|
|
|
|
2018-08-06 21:00:58 +03:00
|
|
|
set -xe
|
2018-05-14 00:25:41 +03:00
|
|
|
set -euo pipefail
|
|
|
|
IFS=$'\n\t'
|
|
|
|
|
|
|
|
GHCVERSION=${GHCVERSION:-ghc822}
|
|
|
|
STRICT=${STRICT:-false}
|
|
|
|
TRACING=${TRACING:-false}
|
2018-08-06 21:00:58 +03:00
|
|
|
NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/6820e2f0dd16104961d6fc7e8e38846807159c4e.tar.gz
|
2018-05-14 00:25:41 +03:00
|
|
|
|
|
|
|
if [ "$GHCVERSION" = "ghcjs" ]; then
|
2018-05-14 20:34:41 +03:00
|
|
|
nix-build --substituters 'https://nixcache.reflex-frp.org?trusted=1' ghcjs
|
2018-05-14 00:25:41 +03:00
|
|
|
else
|
2018-05-14 09:26:28 +03:00
|
|
|
nix-build \
|
2018-05-14 00:25:41 +03:00
|
|
|
--argstr compiler $GHCVERSION \
|
|
|
|
--arg doTracing $TRACING \
|
2018-08-06 14:15:01 +03:00
|
|
|
--arg doStrict $STRICT \
|
|
|
|
$@
|
2018-05-14 00:25:41 +03:00
|
|
|
fi
|