git.iko.soy/typeable/nixpkgs
on master help sign in
qemu: compile with cocoa for darwin support

This uses the --enable-cocoa flag in qemu to build in Darwin.

commit864ec69c84f89b0f0e073a9a0fec218d521f5ce9 authorMatthew Bauer <mjbauer95@gmail.com> dateSun 28 Feb 2016, 18:22 (11 years ago) parentb0f70e2
2 files changed+26−15
pkgs/applications/virtualization/qemu/default.nix+22−14 pkgs/top-level/all-packages.nix+4−1
pkgs/applications/virtualization/qemu/default.nix+22−14
@@ -1,11 +1,15 @@
11{ stdenv, fetchurl, python, zlib, pkgconfig, glib, ncurses, perl, pixman
2−, attr, libcap, vde2, alsaLib, texinfo, libuuid, flex, bison, lzo, snappy
3−, libseccomp, libaio, libcap_ng, gnutls, nettle, numactl
2+, vde2, alsaLib, texinfo, libuuid, flex, bison, lzo, snappy
3+, libaio, gnutls, nettle
44, makeWrapper
5−, pulseSupport ? true, libpulseaudio
6−, sdlSupport ? true, SDL
5+, attr, libcap, libcap_ng
6+, CoreServices, Cocoa, rez, setfile
7+, numaSupport ? stdenv.isLinux, numactl
8+, seccompSupport ? stdenv.isLinux, libseccomp
9+, pulseSupport ? !stdenv.isDarwin, libpulseaudio
10+, sdlSupport ? !stdenv.isDarwin, SDL
711, vncSupport ? true, libjpeg, libpng
8−, spiceSupport ? true, spice, spice_protocol, usbredir
12+, spiceSupport ? !stdenv.isDarwin, spice, spice_protocol, usbredir
913, x86Only ? false
1014}:
1115
@@ -26,31 +30,35 @@ stdenv.mkDerivation rec {
2630 };
2731
2832 buildInputs =
29− [ python zlib pkgconfig glib ncurses perl pixman attr libcap
30− vde2 texinfo libuuid flex bison makeWrapper lzo snappy libseccomp
31− libcap_ng gnutls nettle numactl
33+ [ python zlib pkgconfig glib ncurses perl pixman
34+ vde2 texinfo libuuid flex bison makeWrapper lzo snappy
35+ gnutls nettle
3236 ]
37+ ++ optionals stdenv.isDarwin [ CoreServices Cocoa rez setfile ]
38+ ++ optionals seccompSupport [ libseccomp ]
39+ ++ optionals numaSupport [ numactl ]
3340 ++ optionals pulseSupport [ libpulseaudio ]
3441 ++ optionals sdlSupport [ SDL ]
3542 ++ optionals vncSupport [ libjpeg libpng ]
3643 ++ optionals spiceSupport [ spice_protocol spice usbredir ]
37− ++ optionals (hasSuffix "linux" stdenv.system) [ alsaLib libaio ];
44+ ++ optionals stdenv.isLinux [ alsaLib libaio libcap_ng libcap attr ];
3845
3946 enableParallelBuilding = true;
4047
4148 patches = [ ./no-etc-install.patch ];
4249
4350 configureFlags =
44− [ "--enable-seccomp"
45− "--enable-numa"
46− "--smbd=smbd" # use `smbd' from $PATH
51+ [ "--smbd=smbd" # use `smbd' from $PATH
4752 "--audio-drv-list=${audio}"
4853 "--sysconfdir=/etc"
4954 "--localstatedir=/var"
5055 ]
56+ ++ optional numaSupport "--enable-numa"
57+ ++ optional seccompSupport "--enable-seccomp"
5158 ++ optional spiceSupport "--enable-spice"
5259 ++ optional x86Only "--target-list=i386-softmmu,x86_64-softmmu"
53− ++ optional (hasSuffix "linux" stdenv.system) "--enable-linux-aio";
60+ ++ optional stdenv.isDarwin "--enable-cocoa"
61+ ++ optional stdenv.isLinux "--enable-linux-aio";
5462
5563 postInstall =
5664 ''
@@ -66,6 +74,6 @@ stdenv.mkDerivation rec {
6674 description = "A generic and open source machine emulator and virtualizer";
6775 license = licenses.gpl2Plus;
6876 maintainers = with maintainers; [ viric eelco ];
69− platforms = platforms.linux;
77+ platforms = platforms.linux ++ platforms.darwin;
7078 };
7179}
pkgs/top-level/all-packages.nix+4−1
@@ -13329,7 +13329,10 @@ let
1332913329
1333013330 eiskaltdcpp = callPackage ../applications/networking/p2p/eiskaltdcpp { lua5 = lua5_1; };
1333113331
13332− qemu = callPackage ../applications/virtualization/qemu { };
13332+ qemu = callPackage ../applications/virtualization/qemu {
13333+ inherit (darwin.apple_sdk.frameworks) CoreServices Cocoa;
13334+ inherit (darwin.stubs) rez setfile;
13335+ };
1333313336
1333413337 qjackctl = callPackage ../applications/audio/qjackctl { };
1333513338