@@ -7,6 +7,10 @@ NIX_BUILD_ARGS="${NIX_BUILD_ARGS:-}"
8cd $(dirname $0)
8cd $(dirname $0)
10+printf "*** Cleaning package build directories..." >& 2
11+rm -rvf */cabal.project.local */.ghc.environment* */dist */dist-newstyle */.stack-work
10printf "*** Running the nix-build tests...\n" >& 2
14printf "*** Running the nix-build tests...\n" >& 2
11nix-build $NIX_BUILD_ARGS --no-out-link --keep-going ./default.nix
15nix-build $NIX_BUILD_ARGS --no-out-link --keep-going ./default.nix
@@ -33,21 +37,21 @@ printf "*** Checking that a nix-shell works for cabal...\n" >& 2
33nix-shell $NIX_BUILD_ARGS \
37nix-shell $NIX_BUILD_ARGS \
34 --pure ./default.nix \
38 --pure ./default.nix \
35 -A with-packages.test-shell \
39 -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'
39printf "*** Checking that a nix-shell works for cabal (doExactConfig component)...\n" >& 2
43printf "*** Checking that a nix-shell works for cabal (doExactConfig component)...\n" >& 2
40nix-shell $NIX_BUILD_ARGS \
44nix-shell $NIX_BUILD_ARGS \
41 --pure ./default.nix \
45 --pure ./default.nix \
42 -A with-packages.test-shell-dec \
46 -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'
46printf "*** Checking that a nix-shell works for a multi-target project...\n" >& 2
50printf "*** Checking that a nix-shell works for a multi-target project...\n" >& 2
47nix-shell $NIX_BUILD_ARGS \
51nix-shell $NIX_BUILD_ARGS \
48 --pure ./default.nix \
52 --pure ./default.nix \
49 -A cabal-simple.test-shell \
53 -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'
53printf "\n*** Finished successfully\n" >& 2
57printf "\n*** Finished successfully\n" >& 2