···51 result = vmTools.runInLinuxVM (
52 runCommand "${projectName}-image-${name}.sif"
53 {
054 nativeBuildInputs = [
55 singularity
56 e2fsprogs
57 util-linux
58 ];
59 strictDeps = true;
060 layerClosure = writeClosure ([ bashInteractive ] ++ runScriptReferences ++ contents);
61 preVM = vmTools.createEmptyImage {
62 size = diskSize;
···89 cp -ar "$f" "./$f"
90 done < "$layerClosure"
9192- # TODO(@ShamrockLee):
93- # Once vmTools.runInLinuxVMm works with `__structuredAttrs = true` (#334705),
94- # set __structuredAttrs = true and pass contents as an attribute
95- # so that we could loop with `for c in ''${contents[@]}`
96- # instead of expanding all the paths in contents into the Bash string.
97- for c in ${lib.escapeShellArgs contents} ; do
98 for f in "$c"/bin/* ; do
99 if [ ! -e "bin/$(basename "$f")" ] ; then
100 ln -s "$f" bin/
···51 result = vmTools.runInLinuxVM (
52 runCommand "${projectName}-image-${name}.sif"
53 {
54+ __structuredAttrs = true;
55 nativeBuildInputs = [
56 singularity
57 e2fsprogs
58 util-linux
59 ];
60 strictDeps = true;
61+ inherit contents;
62 layerClosure = writeClosure ([ bashInteractive ] ++ runScriptReferences ++ contents);
63 preVM = vmTools.createEmptyImage {
64 size = diskSize;
···91 cp -ar "$f" "./$f"
92 done < "$layerClosure"
9394+ for c in "''${contents[@]}"; do
0000095 for f in "$c"/bin/* ; do
96 if [ ! -e "bin/$(basename "$f")" ] ; then
97 ln -s "$f" bin/