mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
singularity-tools: string-interpolate and and quote members in contents
String-interpolation converts path objects inside `contents` into store paths to ensure they are properly included in the result image. See tests.trivial-builders.references for the necessity of string-interpolation. Quote each string-interpolated content member to accomodates spaces inside.
This commit is contained in:
parent
7487a6207d
commit
5396a84b1d
@ -120,7 +120,12 @@ lib.makeExtensible (final: {
|
||||
cp -ar "$f" "./$f"
|
||||
done
|
||||
|
||||
for c in ${toString contents} ; do
|
||||
# TODO(@ShamrockLee):
|
||||
# Once vmTools.runInLinuxVMm works with `__structuredAttrs = true` (#334705),
|
||||
# set __structuredAttrs = true and pass contents as an attribute
|
||||
# so that we could loop with `for c in ''${contents[@]}`
|
||||
# instead of expanding all the paths in contents into the Bash string.
|
||||
for c in ${lib.escapeShellArgs contents} ; do
|
||||
for f in "$c"/bin/* ; do
|
||||
if [ ! -e "bin/$(basename "$f")" ] ; then
|
||||
ln -s "$f" bin/
|
||||
|
Loading…
Reference in New Issue
Block a user