mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
Add a more interesting test
In this one, we don't just output an existing derivation as is, but modify it first.
This commit is contained in:
parent
f3a31b14db
commit
e26662709e
4 changed files with 62 additions and 3 deletions
25
tests/dyn-drv/recursive-mod-json.sh
Normal file
25
tests/dyn-drv/recursive-mod-json.sh
Normal file
|
@ -0,0 +1,25 @@
|
|||
source common.sh
|
||||
|
||||
# FIXME
|
||||
if [[ $(uname) != Linux ]]; then skipTest "Not running Linux"; fi
|
||||
|
||||
enableFeatures 'recursive-nix'
|
||||
restartDaemon
|
||||
|
||||
clearStore
|
||||
|
||||
rm -f $TEST_ROOT/result
|
||||
|
||||
EXTRA_PATH=$(dirname $(type -p nix)):$(dirname $(type -p jq))
|
||||
export EXTRA_PATH
|
||||
|
||||
# Will produce a drv
|
||||
metaDrv=$(nix-instantiate ./recursive-mod-json.nix)
|
||||
|
||||
# computed "dynamic" derivation
|
||||
drv=$(nix-store -r $metaDrv)
|
||||
|
||||
# build that dyn drv
|
||||
res=$(nix-store -r $drv)
|
||||
|
||||
grep 'I am alive!' $res/hello
|
Loading…
Add table
Add a link
Reference in a new issue