qemu: Rename x86Only option to hostCpuOnly
And also make it work on ARM and Aarch64.
This commit is contained in:
parent
eb3925ff62
commit
3b2056536c
|
@ -12,7 +12,7 @@
|
|||
, spiceSupport ? !stdenv.isDarwin, spice, spice_protocol
|
||||
, usbredirSupport ? spiceSupport, usbredir
|
||||
, xenSupport ? false, xen
|
||||
, x86Only ? false
|
||||
, hostCpuOnly ? false
|
||||
, nixosTestRunner ? false
|
||||
}:
|
||||
|
||||
|
@ -23,12 +23,17 @@ let
|
|||
audio = optionalString (hasSuffix "linux" stdenv.system) "alsa,"
|
||||
+ optionalString pulseSupport "pa,"
|
||||
+ optionalString sdlSupport "sdl,";
|
||||
|
||||
hostCpuTargets = if stdenv.isi686 || stdenv.isx86_64 then "i386-softmmu,x86_64-softmmu"
|
||||
else if stdenv.isArm then "arm-softmmu"
|
||||
else if stdenv.isAarch64 then "aarch64-softmmu"
|
||||
else throw "Don't know how to build a 'hostCpuOnly = true' QEMU";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "qemu-"
|
||||
+ stdenv.lib.optionalString xenSupport "xen-"
|
||||
+ stdenv.lib.optionalString x86Only "x86-only-"
|
||||
+ stdenv.lib.optionalString hostCpuOnly "host-cpu-only-"
|
||||
+ stdenv.lib.optionalString nixosTestRunner "for-vm-tests-"
|
||||
+ version;
|
||||
|
||||
|
@ -75,7 +80,7 @@ stdenv.mkDerivation rec {
|
|||
++ optional seccompSupport "--enable-seccomp"
|
||||
++ optional spiceSupport "--enable-spice"
|
||||
++ optional usbredirSupport "--enable-usb-redir"
|
||||
++ optional x86Only "--target-list=i386-softmmu,x86_64-softmmu"
|
||||
++ optional hostCpuOnly "--target-list=${hostCpuTargets}"
|
||||
++ optional stdenv.isDarwin "--enable-cocoa"
|
||||
++ optional stdenv.isLinux "--enable-linux-aio"
|
||||
++ optional xenSupport "--enable-xen";
|
||||
|
|
|
@ -13001,16 +13001,16 @@ with pkgs;
|
|||
|
||||
watch = callPackage ../os-specific/linux/procps/watch.nix { };
|
||||
|
||||
qemu_kvm = lowPrio (qemu.override { x86Only = true; });
|
||||
qemu_kvm = lowPrio (qemu.override { hostCpuOnly = true; });
|
||||
|
||||
# See `xenPackages` source for explanations.
|
||||
# Building with `xen` instead of `xen-slim` is possible, but makes no sense.
|
||||
qemu_xen = lowPrio (qemu.override { x86Only = true; xenSupport = true; xen = xen-slim; });
|
||||
qemu_xen-light = lowPrio (qemu.override { x86Only = true; xenSupport = true; xen = xen-light; });
|
||||
qemu_xen_4_8 = lowPrio (qemu.override { x86Only = true; xenSupport = true; xen = xen_4_8-slim; });
|
||||
qemu_xen_4_8-light = lowPrio (qemu.override { x86Only = true; xenSupport = true; xen = xen_4_8-light; });
|
||||
qemu_xen = lowPrio (qemu.override { hostCpuOnly = true; xenSupport = true; xen = xen-slim; });
|
||||
qemu_xen-light = lowPrio (qemu.override { hostCpuOnly = true; xenSupport = true; xen = xen-light; });
|
||||
qemu_xen_4_8 = lowPrio (qemu.override { hostCpuOnly = true; xenSupport = true; xen = xen_4_8-slim; });
|
||||
qemu_xen_4_8-light = lowPrio (qemu.override { hostCpuOnly = true; xenSupport = true; xen = xen_4_8-light; });
|
||||
|
||||
qemu_test = lowPrio (qemu.override { x86Only = true; nixosTestRunner = true; });
|
||||
qemu_test = lowPrio (qemu.override { hostCpuOnly = true; nixosTestRunner = true; });
|
||||
|
||||
firmwareLinuxNonfree = callPackage ../os-specific/linux/firmware/firmware-linux-nonfree { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue