mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-27 07:14:52 +00:00
runInLinuxVM: clean up
Those were left-over after 97ed6b4565
.
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.
This commit is contained in:
parent
de7867c226
commit
3952f870fc
@ -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 <<EOF
|
||||
#! ${bash}/bin/sh
|
||||
''${diskImage:+diskImage=$diskImage}
|
||||
TMPDIR=$TMPDIR
|
||||
cd $TMPDIR
|
||||
${qemuCommand}
|
||||
EOF
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user