Skip to content

Commit 3209a32

Browse files
committed
Fix #1600: add end-2-end test of hix project initialization and flakes development shell
1 parent 8da47f2 commit 3209a32

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/tests.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ if [ ! -z ${CI+x} ]; then
2828
export XDG_CONFIG_HOME=$HOME/.config
2929
mkdir -p $XDG_CONFIG_HOME/nix
3030
cp ./nix.conf $XDG_CONFIG_HOME/nix
31+
export NIX_CONFIG=$(cat ./nix.conf)
3132
echo >& 2
3233
fi
3334

@@ -149,4 +150,13 @@ nix build $NIX_BUILD_ARGS --no-link \
149150
extra-hackage.run.project.hsPkgs.external-package-user.components.exes.external-package-user
150151
echo >& 2
151152

153+
printf "*** End-2-end test of hix project initialization and flakes development shell ...\n" >& 2
154+
HASKELL_NIX=$(pwd)/..
155+
cd $(mktemp -d)
156+
nix-shell -p cabal-install --run "cabal update; cabal unpack hello"
157+
cd hello-*
158+
nix run $HASKELL_NIX#hix -- init
159+
nix develop --override-input haskellNix $HASKELL_NIX -c "cabal build"
160+
echo >& 2
161+
152162
printf "\n*** Finished successfully\n" >& 2

0 commit comments

Comments
 (0)