mirror of
https://github.com/NixOS/nix
synced 2025-07-08 02:43:54 +02:00
* `nix-install-package --url': install from a URL (NIX-12).
* `nix-install-package --help' (NIX-9). * `nix-install-package --non-interactive': don't prompt or pause. * Tests for nix-install-package. * Security fixes: filter the values obtained from the nixpkg.
This commit is contained in:
parent
4e91d8621f
commit
0bd5eb71a0
10 changed files with 152 additions and 37 deletions
21
tests/install-package.sh
Normal file
21
tests/install-package.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
source common.sh
|
||||
|
||||
# Note: this test expects to be run *after* nix-push.sh.
|
||||
|
||||
drvPath=$($nixinstantiate ./dependencies.nix)
|
||||
outPath=$($nixstore -q $drvPath)
|
||||
|
||||
clearStore
|
||||
clearProfiles
|
||||
|
||||
cat > $TEST_ROOT/foo.nixpkg <<EOF
|
||||
NIXPKG1 file://$TEST_ROOT/manifest simple $system $drvPath $outPath
|
||||
EOF
|
||||
|
||||
$NIX_BIN_DIR/nix-install-package --non-interactive -p $profiles/test $TEST_ROOT/foo.nixpkg
|
||||
test "$($nixenv -p $profiles/test -q '*' | wc -l)" -eq 1
|
||||
|
||||
clearProfiles
|
||||
|
||||
$NIX_BIN_DIR/nix-install-package --non-interactive -p $profiles/test --url file://$TEST_ROOT/foo.nixpkg
|
||||
test "$($nixenv -p $profiles/test -q '*' | wc -l)" -eq 1
|
Loading…
Add table
Add a link
Reference in a new issue