48f08e8cc0
Having a colon in the path may cause issues, and having the hash function indicated isn't actually necessary. We now verify the path format in the tests to prevent regressions. (cherry picked from commit c65a6fa86aef7bdf51fb4fba7bd31d265619ba3f)
18 lines
396 B
Bash
18 lines
396 B
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
|
|
'';
|
|
}
|
|
")
|