mirror of
https://github.com/NixOS/nix
synced 2025-07-08 06:53:54 +02:00
allow fetchTarball to take a name
argument
This commit is contained in:
parent
83615fcf8f
commit
a487a652ed
2 changed files with 3 additions and 2 deletions
|
@ -30,6 +30,7 @@ test_tarball() {
|
|||
nix-build -o $TEST_ROOT/result -E "import (fetchTree file://$tarball)"
|
||||
nix-build -o $TEST_ROOT/result -E "import (fetchTree { type = \"tarball\"; url = file://$tarball; })"
|
||||
nix-build -o $TEST_ROOT/result -E "import (fetchTree { type = \"tarball\"; url = file://$tarball; narHash = \"$hash\"; })"
|
||||
nix-build -o $TEST_ROOT/result -E "import (fetchTree { type = \"tarball\"; url = file://$tarball; narHash = \"$hash\"; name = \"foo\"; })"
|
||||
nix-build -o $TEST_ROOT/result -E "import (fetchTree { type = \"tarball\"; url = file://$tarball; narHash = \"sha256-xdKv2pq/IiwLSnBBJXW8hNowI4MrdZfW+SYqDQs7Tzc=\"; })" 2>&1 | grep 'NAR hash mismatch in input'
|
||||
|
||||
nix-instantiate --strict --eval -E "!((import (fetchTree { type = \"tarball\"; url = file://$tarball; narHash = \"$hash\"; })) ? submodules)" >&2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue