build-support/vm: fix fillDiskWithDebs

After __structuredAttrs was enabled in runInLinuxVM, the structure
of 'debs' matters.

The current implementation uses some IFS tricks so we just flatten into a string.
Future improvements could include treating debs as a list in a more
structured way.
This commit is contained in:
Stefan Frijters
2026-04-24 12:15:16 +02:00
parent ed95a6bec3
commit 96c5a1f757
+5 -3
View File
@@ -730,7 +730,9 @@ let
memSize
;
debs = (lib.intersperse "|" debs);
# Flatten this into string explicitly to allow IFS tricks below to work,
# and support structuredAttrs
debsInterspersed = toString (lib.intersperse "|" debs);
preVM = createEmptyImage { inherit size fullName; };
@@ -749,7 +751,7 @@ let
# (which have lots of circular dependencies) from barfing.
echo "unpacking Debs..."
for deb in $debs; do
for deb in $debsInterspersed; do
if test "$deb" != "|"; then
echo "$deb..."
dpkg-deb --extract "$deb" /mnt
@@ -778,7 +780,7 @@ let
oldIFS="$IFS"
IFS="|"
for component in $debs; do
for component in $debsInterspersed; do
IFS="$oldIFS"
echo
echo ">>> INSTALLING COMPONENT: $component"