@@ -20,16 +20,15 @@ printf "*** Cleaning package build directories..." >& 2
20
20
rm -rvf * /cabal.project.local * /.ghc.environment* * /dist * /dist-newstyle * /.stack-work
21
21
echo >& 2
22
22
23
- alias nix=" nix --accept-flake-config"
24
-
25
23
printf " *** Running the nix-build tests...\n" >& 2
26
24
nix build $NIX_BUILD_ARGS \
27
- -I . -I .. \
28
- --option restrict-eval true \
29
- --option allowed-uris " https://github.com/NixOS https://github.com/input-output-hk" \
30
- --no-link --keep-going -f default.nix \
31
- --argstr compiler-nix-name $GHC \
32
- --arg CADerivationsEnabled $NIX_CA_DERIVATIONS
25
+ --accept-flake-config \
26
+ -I . -I .. \
27
+ --option restrict-eval true \
28
+ --option allowed-uris " https://github.com/NixOS https://github.com/input-output-hk" \
29
+ --no-link --keep-going -f default.nix \
30
+ --argstr compiler-nix-name $GHC \
31
+ --arg CADerivationsEnabled $NIX_CA_DERIVATIONS
33
32
echo >& 2
34
33
35
34
printf " *** Running the unit tests... " >& 2
@@ -125,19 +124,43 @@ else
125
124
fi
126
125
127
126
printf " *** Checking the maintainer scripts...\n" >& 2
128
- nix build $NIX_BUILD_ARGS --no-link --keep-going -f ../build.nix --argstr compiler-nix-name $GHC maintainer-scripts
127
+ nix build $NIX_BUILD_ARGS \
128
+ --accept-flake-config \
129
+ --no-link \
130
+ --keep-going \
131
+ -f ../build.nix \
132
+ --argstr compiler-nix-name $GHC \
133
+ maintainer-scripts
129
134
echo >& 2
130
135
131
136
printf " *** Checking that plan construction works with extra Hackages...\n" >& 2
132
- nix build $NIX_BUILD_ARGS --no-link \
133
- -f ./default.nix --argstr compiler-nix-name $GHC \
137
+ nix build $NIX_BUILD_ARGS \
138
+ --accept-flake-config \
139
+ --no-link \
140
+ -f ./default.nix \
141
+ --argstr compiler-nix-name $GHC \
134
142
extra-hackage.run.project.plan-nix
135
143
echo >& 2
136
144
137
145
printf " *** Checking that package with extra Hackages can be build...\n" >& 2
138
- nix build $NIX_BUILD_ARGS --no-link \
139
- -f ./default.nix --argstr compiler-nix-name $GHC \
146
+ nix build $NIX_BUILD_ARGS \
147
+ --accept-flake-config \
148
+ --no-link \
149
+ -f ./default.nix \
150
+ --argstr compiler-nix-name $GHC \
140
151
extra-hackage.run.project.hsPkgs.external-package-user.components.exes.external-package-user
141
152
echo >& 2
142
153
154
+ printf " *** End-2-end test of hix project initialization and flakes development shell ...\n" >& 2
155
+ HASKELL_NIX=$( pwd) /..
156
+ cd $( mktemp -d)
157
+ nix-shell -p cabal-install --run " cabal update; cabal unpack hello"
158
+ cd hello-*
159
+ nix run $HASKELL_NIX #hix -- init
160
+ nix develop \
161
+ --override-input haskellNix $HASKELL_NIX \
162
+ --accept-flake-config \
163
+ -c cabal build
164
+ echo >& 2
165
+
143
166
printf " \n*** Finished successfully\n" >& 2
0 commit comments