aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/pass-as-file.sh
blob: 2c0bc5031ad767a8aa96480452b87d381b9c3d95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
  '';
}
")