···5151 result = vmTools.runInLinuxVM (
5252 runCommand "${projectName}-image-${name}.sif"
5353 {
5454+ __structuredAttrs = true;
5455 nativeBuildInputs = [
5556 singularity
5657 e2fsprogs
5758 util-linux
5859 ];
5960 strictDeps = true;
6161+ inherit contents;
6062 layerClosure = writeClosure ([ bashInteractive ] ++ runScriptReferences ++ contents);
6163 preVM = vmTools.createEmptyImage {
6264 size = diskSize;
···8991 cp -ar "$f" "./$f"
9092 done < "$layerClosure"
91939292- # TODO(@ShamrockLee):
9393- # Once vmTools.runInLinuxVMm works with `__structuredAttrs = true` (#334705),
9494- # set __structuredAttrs = true and pass contents as an attribute
9595- # so that we could loop with `for c in ''${contents[@]}`
9696- # instead of expanding all the paths in contents into the Bash string.
9797- for c in ${lib.escapeShellArgs contents} ; do
9494+ for c in "''${contents[@]}"; do
9895 for f in "$c"/bin/* ; do
9996 if [ ! -e "bin/$(basename "$f")" ] ; then
10097 ln -s "$f" bin/