mirror of
https://github.com/haskell-nix/hnix.git
synced 2024-09-11 06:55:38 +03:00
44 lines
1.6 KiB
Bash
Executable File
44 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# NOTE: Script for the CI builds. CI comes here from `.travis.yml`
|
|
|
|
set -xe
|
|
set -euo pipefail
|
|
IFS=$'\n\t'
|
|
|
|
if [ "$GHCVERSION" = "ghcjs" ]; then
|
|
nix-build --substituters 'https://nixcache.reflex-frp.org?trusted=1' ghcjs
|
|
else
|
|
nix-build \
|
|
--argstr compiler $GHCVERSION \
|
|
--arg doTracing $TRACING \
|
|
--arg doStrict $STRICT \
|
|
$@
|
|
fi
|
|
# NOTE: If var not imported - set to the default value
|
|
GHCVERSION=${GHCVERSION:-ghc865}
|
|
rev=${rev:-nixpkgs-unstable}
|
|
NIX_PATH=${NIX_PATH:-"nixpkgs=https://github.com/nixos/nixpkgs/archive/$rev.tar.gz"}
|
|
export NIX_PATH
|
|
name=${name:-defaultBinaryName}
|
|
pkgName=${pkgName:-defaultPkgName}
|
|
failOnAllWarnings=${failOnAllWarnings:-'false'}
|
|
checkUnusedPackages=${checkUnusedPackages:-'false'}
|
|
doCoverage=${doCoverage:-'false'}
|
|
doHaddock=${doHaddock:-'false'}
|
|
doJailbreak=${doJailbreak:-'false'}
|
|
doCheck=${doCheck:-'true'}
|
|
doBenchmark=${doBenchmark:-'false'}
|
|
enableExecutableProfiling=${enableExecutableProfiling:-'false'}
|
|
enableLibraryProfiling=${enableLibraryProfiling:-'false'}
|
|
buildFromSdist=${buildFromSdist:-'false'}
|
|
buildStrictly=${buildStrictly:-'false'}
|
|
disableOptimization=${disableOptimization:-'true'}
|
|
buildStackProject=${buildStackProject:-'false'}
|
|
# NOTE: *Oprparse* key is redifined in the code further
|
|
generateOptparseApplicativeCompletion=${generateOptparseApplicativeCompletion:-'false'}
|
|
allowInconsistentDependencies=${allowInconsistentDependencies:-'false'}
|
|
ghcjsTmpLogFile=${ghcjsTmpLogFile:-'/tmp/ghcjsTmpLogFile.jog'}
|
|
ghcjsLogTailLength=${ghcjsLogTailLength:-'10000'}
|
|
|