From 3952f870fc7b7401aa06732b754c84cb94bacb61 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 30 Nov 2024 12:16:17 +0100 Subject: [PATCH] runInLinuxVM: clean up Those were left-over after 97ed6b4565e76286062e6942517a71ae4c9cac72. This also cleans up some confusion around TMPDIR. We had the following lines: mkdir xchg ... cd $TMPDIR ... path=$TMPDIR/xchg Those only worked because the **current directory** is the same as $TMPDIR. Both are /build by default. To refer to the same directory in two different ways is very confusing at best. --- pkgs/build-support/vm/default.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 29ae21e50c4d..df014ae80c06 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -88,10 +88,6 @@ rec { set -- $(IFS==; echo $o) command=$2 ;; - out=*) - set -- $(IFS==; echo $o) - export out=$2 - ;; esac done @@ -153,7 +149,7 @@ rec { fi echo "starting stage 2 ($command)" - exec switch_root /fs $command $out + exec switch_root /fs $command ''; @@ -225,7 +221,6 @@ rec { -device virtio-rng-pci \ -virtfs local,path=${storeDir},security_model=none,mount_tag=store \ -virtfs local,path=/build,security_model=none,mount_tag=sa \ - -virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \ ''${diskImage:+-drive file=$diskImage,if=virtio,cache=unsafe,werror=report} \ -kernel ${kernel}/${img} \ -initrd ${initrd}/initrd \ @@ -261,8 +256,6 @@ rec { cat > ./run-vm <