about summary refs log blame commit diff
path: root/third_party/nix/tests/pass-as-file.sh
blob: 2c0bc5031ad767a8aa96480452b87d381b9c3d95 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                             
                                                                                               
                                     



               
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
  '';
}
")