aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-10-15 19:53:29 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-10-15 19:53:29 +0200
commit14a89aa8cdc4cf9d22187a34513a6f9709be0c5d (patch)
tree80c176adc10bca52e8034a89ee60e0ece31ceb4b /tests
parent7d38060a0da2698052e84a0cfee422d409a38187 (diff)
Fix 'nix flake init'
Diffstat (limited to 'tests')
-rw-r--r--tests/flakes.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/flakes.sh b/tests/flakes.sh
index 73f9d2685..6cae8029c 100644
--- a/tests/flakes.sh
+++ b/tests/flakes.sh
@@ -36,6 +36,9 @@ cat > $flake1Dir/flake.nix <<EOF
outputs = inputs: rec {
packages.$system.foo = import ./simple.nix;
defaultPackage.$system = packages.$system.foo;
+
+ # To test "nix flake init".
+ packages.x86_64-linux.hello = import ./simple.nix;
};
}
EOF
@@ -339,8 +342,10 @@ nix flake pin --flake-registry $registry flake1
nix flake remove --flake-registry $registry flake1
(( $(nix flake list --flake-registry $registry | wc -l) == 5 ))
+# Test 'nix flake init'.
(cd $flake7Dir && nix flake init)
-nix flake --flake-registry $registry check $flake3Dir
+git -C $flake7Dir add flake.nix
+nix flake --flake-registry $registry check $flake7Dir
rm -rf $TEST_ROOT/flake1-v2
nix flake clone --flake-registry $registry flake1 $TEST_ROOT/flake1-v2