mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
10f864c5ae
This is good for shebang, and also good for future build system simplifications
18 lines
342 B
Bash
Executable file
18 lines
342 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
source common.sh
|
|
|
|
clearStore
|
|
|
|
outPath=$(nix-build --no-out-link readfile-context.nix)
|
|
|
|
# Set a GC root.
|
|
ln -s $outPath "$NIX_STATE_DIR"/gcroots/foo
|
|
|
|
# Check that file exists.
|
|
[ "$(cat $(cat $outPath))" = "Hello World!" ]
|
|
|
|
nix-collect-garbage
|
|
|
|
# Check that file still exists.
|
|
[ "$(cat $(cat $outPath))" = "Hello World!" ]
|