mirror of
https://github.com/NixOS/nix.git
synced 2025-12-15 21:41:04 +01:00
nix flake clone: Support all input types
For input types that have no concept of cloning, we now default to copying the entire source tree.
This commit is contained in:
parent
95da93c05b
commit
d07c24f4c8
6 changed files with 34 additions and 14 deletions
|
|
@ -369,6 +369,10 @@ tar cfz "$TEST_ROOT"/flake.tar.gz -C "$TEST_ROOT" flake5
|
|||
|
||||
nix build -o "$TEST_ROOT"/result file://"$TEST_ROOT"/flake.tar.gz
|
||||
|
||||
nix flake clone "file://$TEST_ROOT/flake.tar.gz" --dest "$TEST_ROOT/unpacked"
|
||||
[[ -e $TEST_ROOT/unpacked/flake.nix ]]
|
||||
expectStderr 1 nix flake clone "file://$TEST_ROOT/flake.tar.gz" --dest "$TEST_ROOT/unpacked" | grep 'existing path'
|
||||
|
||||
# Building with a tarball URL containing a SRI hash should also work.
|
||||
url=$(nix flake metadata --json file://"$TEST_ROOT"/flake.tar.gz | jq -r .url)
|
||||
[[ $url =~ sha256- ]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue