qemu: Add support for the Hypervisor framework on Darwin

This provides macOS native hardware acceleration to Qemu.
This commit is contained in:
Marcus Geiger 2019-02-12 22:52:28 +01:00
parent b2f3738336
commit 355d9a6378
2 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@
, bison, lzo, snappy, libaio, gnutls, nettle, curl , bison, lzo, snappy, libaio, gnutls, nettle, curl
, makeWrapper , makeWrapper
, attr, libcap, libcap_ng , attr, libcap, libcap_ng
, CoreServices, Cocoa, rez, setfile , CoreServices, Cocoa, Hypervisor, rez, setfile
, numaSupport ? stdenv.isLinux && !stdenv.isAarch32, numactl , numaSupport ? stdenv.isLinux && !stdenv.isAarch32, numactl
, seccompSupport ? stdenv.isLinux, libseccomp , seccompSupport ? stdenv.isLinux, libseccomp
, pulseSupport ? !stdenv.isDarwin, libpulseaudio , pulseSupport ? !stdenv.isDarwin, libpulseaudio
@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
vde2 texinfo flex bison makeWrapper lzo snappy vde2 texinfo flex bison makeWrapper lzo snappy
gnutls nettle curl gnutls nettle curl
] ]
++ optionals stdenv.isDarwin [ CoreServices Cocoa rez setfile ] ++ optionals stdenv.isDarwin [ CoreServices Cocoa Hypervisor rez setfile ]
++ optionals seccompSupport [ libseccomp ] ++ optionals seccompSupport [ libseccomp ]
++ optionals numaSupport [ numactl ] ++ optionals numaSupport [ numactl ]
++ optionals pulseSupport [ libpulseaudio ] ++ optionals pulseSupport [ libpulseaudio ]
@ -116,6 +116,7 @@ stdenv.mkDerivation rec {
++ optional usbredirSupport "--enable-usb-redir" ++ optional usbredirSupport "--enable-usb-redir"
++ optional (hostCpuTargets != null) "--target-list=${stdenv.lib.concatStringsSep "," hostCpuTargets}" ++ optional (hostCpuTargets != null) "--target-list=${stdenv.lib.concatStringsSep "," hostCpuTargets}"
++ optional stdenv.isDarwin "--enable-cocoa" ++ optional stdenv.isDarwin "--enable-cocoa"
++ optional stdenv.isDarwin "--enable-hvf"
++ optional stdenv.isLinux "--enable-linux-aio" ++ optional stdenv.isLinux "--enable-linux-aio"
++ optional gtkSupport "--enable-gtk" ++ optional gtkSupport "--enable-gtk"
++ optional xenSupport "--enable-xen" ++ optional xenSupport "--enable-xen"

View File

@ -18991,7 +18991,7 @@ in
qdirstat = libsForQt5.callPackage ../applications/misc/qdirstat {}; qdirstat = libsForQt5.callPackage ../applications/misc/qdirstat {};
qemu = callPackage ../applications/virtualization/qemu { qemu = callPackage ../applications/virtualization/qemu {
inherit (darwin.apple_sdk.frameworks) CoreServices Cocoa; inherit (darwin.apple_sdk.frameworks) CoreServices Cocoa Hypervisor;
inherit (darwin.stubs) rez setfile; inherit (darwin.stubs) rez setfile;
}; };