lol

singularity-tools: enable __structuredAttrs and pass contents directly (#358723)

authored by philiptaron.tngl.sh and committed by

GitHub 62742e9d 9af37651

+3 -6
+3 -6
pkgs/build-support/singularity-tools/default.nix
··· 51 51 result = vmTools.runInLinuxVM ( 52 52 runCommand "${projectName}-image-${name}.sif" 53 53 { 54 + __structuredAttrs = true; 54 55 nativeBuildInputs = [ 55 56 singularity 56 57 e2fsprogs 57 58 util-linux 58 59 ]; 59 60 strictDeps = true; 61 + inherit contents; 60 62 layerClosure = writeClosure ([ bashInteractive ] ++ runScriptReferences ++ contents); 61 63 preVM = vmTools.createEmptyImage { 62 64 size = diskSize; ··· 89 91 cp -ar "$f" "./$f" 90 92 done < "$layerClosure" 91 93 92 - # 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 94 + for c in "''${contents[@]}"; do 98 95 for f in "$c"/bin/* ; do 99 96 if [ ! -e "bin/$(basename "$f")" ] ; then 100 97 ln -s "$f" bin/