Created
January 4, 2018 09:22
-
-
Save infinisil/70b376ef310a3b6371a6fd445d2b00a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
let | |
# an arbitrary derivation with some files in $out | |
foo = runCommand "foo" {} '' | |
mkdir $out | |
echo a > $out/a | |
echo b > $out/b | |
echo c > $out/c | |
''; | |
bar = runCommand "bar" {} '' | |
mkdir $out | |
# link everything from foo to bar | |
ln -vs ${foo}/* $out | |
# but change one file | |
rm $out/b | |
echo newb > $out/b | |
''; | |
in bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment