mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
10f864c5ae
This is good for shebang, and also good for future build system simplifications
20 lines
417 B
Bash
Executable file
20 lines
417 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
source common.sh
|
|
|
|
clearStore
|
|
|
|
outPath=$(nix-build --no-out-link -E "
|
|
with import ./config.nix;
|
|
|
|
mkDerivation {
|
|
name = \"pass-as-file\";
|
|
passAsFile = [ \"foo\" ];
|
|
foo = [ \"xyzzy\" ];
|
|
builder = builtins.toFile \"builder.sh\" ''
|
|
[ \"\$(basename \$fooPath)\" = .attr-1bp7cri8hplaz6hbz0v4f0nl44rl84q1sg25kgwqzipzd1mv89ic ]
|
|
[ \"\$(cat \$fooPath)\" = xyzzy ]
|
|
touch \$out
|
|
'';
|
|
}
|
|
")
|