diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-01-21 16:27:53 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-01-21 22:56:04 +0100 |
commit | 9f4d8c6170517c9452e25dc29c56a6fbb43d40a1 (patch) | |
tree | 25295dae9cd204f603b41ae59bc32cd9cb0ce88e /tests/fetchGit.sh | |
parent | 1bf9eb21b75f0d93d9c1633ea2e6fdf840047e79 (diff) |
Pluggable fetchers
Flakes are now fetched using an extensible mechanism. Also lots of
other flake cleanups.
Diffstat (limited to 'tests/fetchGit.sh')
-rw-r--r-- | tests/fetchGit.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/fetchGit.sh b/tests/fetchGit.sh index 25333e477..ac0d78f12 100644 --- a/tests/fetchGit.sh +++ b/tests/fetchGit.sh @@ -71,6 +71,7 @@ echo bar > $repo/dir2/bar git -C $repo add dir1/foo git -C $repo rm hello +unset _NIX_FORCE_HTTP path2=$(nix eval --impure --raw --expr "(builtins.fetchGit $repo).outPath") [ ! -e $path2/hello ] [ ! -e $path2/bar ] @@ -107,9 +108,9 @@ path=$(nix eval --impure --raw --expr "(builtins.fetchGit file://$repo).outPath" git -C $repo checkout $rev2 -b dev echo dev > $repo/hello -# File URI uses 'master' unless specified otherwise +# File URI uses dirty tree unless specified otherwise path2=$(nix eval --impure --raw --expr "(builtins.fetchGit file://$repo).outPath") -[[ $path = $path2 ]] +[ $(cat $path2/hello) = dev ] # Using local path with branch other than 'master' should work when clean or dirty path3=$(nix eval --impure --raw --expr "(builtins.fetchGit $repo).outPath") |