Hi, I’m trying to pack some pre-built binary files into a derivation. However, foo.img and bar.imgalways copied to /nix/store/<hash>-{foo,bar}.img. Is there a way to eliminate this, only keeping the final result (/nix/store/<hash>-mypkg/data/foo.img)? Like what writeTextDirdoes.
Source of mypkg/default.nix:
pkgs: builtins.derivation {
name = "mypkg";
system = "x86_64-linux";
builder = "${pkgs.bash}/bin/bash";
file1 = ./foo.img;
file2 = ./bar.img;
args = [ "-c" "${pkgs.coreutils}/bin/mkdir -p $out/data; ${pkgs.coreutils}/bin/cp $file1 $out/data/foo.img; ${pkgs.coreutils}/bin/cp $file2 $out/data/bar.img" ];
}