2016-04-14 16:24:06 +03:00
|
|
|
source common.sh
|
|
|
|
|
|
|
|
clearStore
|
|
|
|
|
2017-11-20 18:50:49 +02:00
|
|
|
nix-instantiate --restrict-eval --eval -E '1 + 2'
|
|
|
|
(! nix-instantiate --restrict-eval ./simple.nix)
|
|
|
|
nix-instantiate --restrict-eval ./simple.nix -I src=.
|
|
|
|
nix-instantiate --restrict-eval ./simple.nix -I src1=simple.nix -I src2=config.nix -I src3=./simple.builder.sh
|
2016-04-14 16:24:06 +03:00
|
|
|
|
2017-11-20 18:50:49 +02:00
|
|
|
(! nix-instantiate --restrict-eval --eval -E 'builtins.readFile ./simple.nix')
|
|
|
|
nix-instantiate --restrict-eval --eval -E 'builtins.readFile ./simple.nix' -I src=..
|
2016-04-14 16:24:06 +03:00
|
|
|
|
2017-11-20 18:50:49 +02:00
|
|
|
(! nix-instantiate --restrict-eval --eval -E 'builtins.readDir ../src/boost')
|
|
|
|
nix-instantiate --restrict-eval --eval -E 'builtins.readDir ../src/boost' -I src=../src
|
2016-04-14 16:24:06 +03:00
|
|
|
|
2017-11-20 18:50:49 +02:00
|
|
|
(! nix-instantiate --restrict-eval --eval -E 'let __nixPath = [ { prefix = "foo"; path = ./.; } ]; in <foo>')
|
|
|
|
nix-instantiate --restrict-eval --eval -E 'let __nixPath = [ { prefix = "foo"; path = ./.; } ]; in <foo>' -I src=.
|
2016-04-14 16:24:06 +03:00
|
|
|
|
2017-10-30 13:39:59 +02:00
|
|
|
p=$(nix eval --raw "(builtins.fetchurl file://$(pwd)/restricted.sh)" --restrict-eval --allowed-uris "file://$(pwd)")
|
|
|
|
cmp $p restricted.sh
|
|
|
|
|
|
|
|
(! nix eval --raw "(builtins.fetchurl file://$(pwd)/restricted.sh)" --restrict-eval)
|
|
|
|
|
|
|
|
(! nix eval --raw "(builtins.fetchurl file://$(pwd)/restricted.sh)" --restrict-eval --allowed-uris "file://$(pwd)/restricted.sh/")
|
|
|
|
|
|
|
|
nix eval --raw "(builtins.fetchurl file://$(pwd)/restricted.sh)" --restrict-eval --allowed-uris "file://$(pwd)/restricted.sh"
|
|
|
|
|
|
|
|
(! nix eval --raw "(builtins.fetchurl https://github.com/NixOS/patchelf/archive/master.tar.gz)" --restrict-eval)
|
|
|
|
(! nix eval --raw "(builtins.fetchTarball https://github.com/NixOS/patchelf/archive/master.tar.gz)" --restrict-eval)
|
|
|
|
(! nix eval --raw "(fetchGit git://github.com/NixOS/patchelf.git)" --restrict-eval)
|