@@ -7,6 +7,10 @@ NIX_BUILD_ARGS="${NIX_BUILD_ARGS:-}"
77
88cd $(dirname $0)
99
10+printf "*** Cleaning package build directories..." >& 2
11+rm -rvf */cabal.project.local */.ghc.environment* */dist */dist-newstyle */.stack-work
12+echo >& 2
13+
1014printf "*** Running the nix-build tests...\n" >& 2
1115nix-build $NIX_BUILD_ARGS --no-out-link --keep-going ./default.nix
1216echo >& 2
@@ -33,21 +37,21 @@ printf "*** Checking that a nix-shell works for cabal...\n" >& 2
3337nix-shell $NIX_BUILD_ARGS \
3438 --pure ./default.nix \
3539 -A with-packages.test-shell \
36− --run 'echo CABAL_CONFIG=$CABAL_CONFIG && type -p ghc && cd with-packages && rm -rf dist-newstyle .ghc-environment* && cabal new-build'
40+ --run 'echo CABAL_CONFIG=$CABAL_CONFIG && type -p ghc && cd with-packages && cabal new-build'
3741echo >& 2
3842
3943printf "*** Checking that a nix-shell works for cabal (doExactConfig component)...\n" >& 2
4044nix-shell $NIX_BUILD_ARGS \
4145 --pure ./default.nix \
4246 -A with-packages.test-shell-dec \
43− --run 'echo CABAL_CONFIG=$CABAL_CONFIG && echo GHC_ENVIRONMENT=$GHC_ENVIRONMENT && cd with-packages && rm -rf dist-newstyle .ghc-environment* && cabal new-build'
47+ --run 'echo CABAL_CONFIG=$CABAL_CONFIG && echo GHC_ENVIRONMENT=$GHC_ENVIRONMENT && cd with-packages && cabal new-build'
4448echo >& 2
4549
4650printf "*** Checking that a nix-shell works for a multi-target project...\n" >& 2
4751nix-shell $NIX_BUILD_ARGS \
4852 --pure ./default.nix \
4953 -A cabal-simple.test-shell \
50− --run 'cd cabal-simple && rm -rf dist-newstyle .ghc-environment* && cabal new-build'
54+ --run 'cd cabal-simple && cabal new-build'
5155echo >& 2
5256
5357printf "\n*** Finished successfully\n" >& 2