diff options
author | rnhmjoj <rnhmjoj@inventati.org> | 2021-06-23 17:46:46 +0200 |
---|---|---|
committer | rnhmjoj <rnhmjoj@inventati.org> | 2021-09-18 16:58:16 +0200 |
commit | b29c2f97c37f7cb4a1b3411ff9888a49873597d2 (patch) | |
tree | 7352ff4d0310afcb03cb1be6ad15745c28d3cd5f /pkgs/build-support | |
parent | b8bfc81d5b2d88b734a311f712fc0ba2b267f9e0 (diff) |
nixos/lib/qemu-flags: rename to qemu-common
The current name is misleading: it doesn't contain cli arguments, but several constants and utility functions related to qemu. This commit also removes the use of `with import ...` for clarity.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/vm/default.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 3a52d756571c8..350f8780b5271 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -9,9 +9,9 @@ }: with pkgs; -with import ../../../nixos/lib/qemu-flags.nix { inherit pkgs; }; rec { + qemu-common = import ../../../nixos/lib/qemu-common.nix { inherit lib pkgs; }; qemu = pkgs.qemu_kvm; @@ -192,13 +192,13 @@ rec { export PATH=/bin:/usr/bin:${coreutils}/bin echo "Starting interactive shell..." echo "(To run the original builder: \$origBuilder \$origArgs)" - exec ${busybox}/bin/setsid ${bashInteractive}/bin/bash < /dev/${qemuSerialDevice} &> /dev/${qemuSerialDevice} + exec ${busybox}/bin/setsid ${bashInteractive}/bin/bash < /dev/${qemu-common.qemuSerialDevice} &> /dev/${qemu-common.qemuSerialDevice} fi ''; qemuCommandLinux = '' - ${qemuBinary qemu} \ + ${qemu-common.qemuBinary qemu} \ -nographic -no-reboot \ -device virtio-rng-pci \ -virtfs local,path=${storeDir},security_model=none,mount_tag=store \ @@ -206,7 +206,7 @@ rec { ''${diskImage:+-drive file=$diskImage,if=virtio,cache=unsafe,werror=report} \ -kernel ${kernel}/${img} \ -initrd ${initrd}/initrd \ - -append "console=${qemuSerialDevice} panic=1 command=${stage2Init} out=$out mountDisk=$mountDisk loglevel=4" \ + -append "console=${qemu-common.qemuSerialDevice} panic=1 command=${stage2Init} out=$out mountDisk=$mountDisk loglevel=4" \ $QEMU_OPTS ''; |