2024-05-28 19:43:04 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2015-02-17 15:42:15 +02:00
|
|
|
source common.sh
|
|
|
|
|
2024-06-16 13:51:46 +03:00
|
|
|
TODO_NixOS
|
|
|
|
|
2015-02-17 15:42:15 +02:00
|
|
|
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\" ''
|
2020-01-03 01:41:48 +02:00
|
|
|
[ \"\$(basename \$fooPath)\" = .attr-1bp7cri8hplaz6hbz0v4f0nl44rl84q1sg25kgwqzipzd1mv89ic ]
|
2015-02-17 17:42:54 +02:00
|
|
|
[ \"\$(cat \$fooPath)\" = xyzzy ]
|
2015-02-17 15:42:15 +02:00
|
|
|
touch \$out
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
")
|