mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 22:46:16 +02:00
e26662709e
In this one, we don't just output an existing derivation as is, but modify it first.
25 lines
470 B
Bash
25 lines
470 B
Bash
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
|