diff options
author | Robin Gloster <mail@glob.in> | 2016-03-15 01:44:24 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-03-15 01:44:24 +0000 |
commit | 3f45f0948d6fe158bed063adb66850ded0ba4861 (patch) | |
tree | ac717689d391d3f5333132fc34e4b2aed829414c /pkgs/applications/virtualization/qemu/default.nix | |
parent | a9b942c0617b1cd5f0732d05eadad0114a178f37 (diff) | |
parent | d227d9a70e41d65e4e6f4ac75a9d243c5a19fa85 (diff) | |
download | nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar.gz nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar.bz2 nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar.lz nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar.xz nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.tar.zst nixlib-3f45f0948d6fe158bed063adb66850ded0ba4861.zip |
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'pkgs/applications/virtualization/qemu/default.nix')
-rw-r--r-- | pkgs/applications/virtualization/qemu/default.nix | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index 9301f886472c..158231a6e646 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -1,11 +1,15 @@ { stdenv, fetchurl, python, zlib, pkgconfig, glib, ncurses, perl, pixman -, attr, libcap, vde2, alsaLib, texinfo, libuuid, flex, bison, lzo, snappy -, libseccomp, libaio, libcap_ng, gnutls, nettle, numactl +, vde2, alsaLib, texinfo, libuuid, flex, bison, lzo, snappy +, libaio, gnutls, nettle , makeWrapper -, pulseSupport ? true, libpulseaudio -, sdlSupport ? true, SDL +, attr, libcap, libcap_ng +, CoreServices, Cocoa, rez, setfile +, numaSupport ? stdenv.isLinux, numactl +, seccompSupport ? stdenv.isLinux, libseccomp +, pulseSupport ? !stdenv.isDarwin, libpulseaudio +, sdlSupport ? !stdenv.isDarwin, SDL , vncSupport ? true, libjpeg, libpng -, spiceSupport ? true, spice, spice_protocol, usbredir +, spiceSupport ? !stdenv.isDarwin, spice, spice_protocol, usbredir , x86Only ? false }: @@ -26,31 +30,35 @@ stdenv.mkDerivation rec { }; buildInputs = - [ python zlib pkgconfig glib ncurses perl pixman attr libcap - vde2 texinfo libuuid flex bison makeWrapper lzo snappy libseccomp - libcap_ng gnutls nettle numactl + [ python zlib pkgconfig glib ncurses perl pixman + vde2 texinfo libuuid flex bison makeWrapper lzo snappy + gnutls nettle ] + ++ optionals stdenv.isDarwin [ CoreServices Cocoa rez setfile ] + ++ optionals seccompSupport [ libseccomp ] + ++ optionals numaSupport [ numactl ] ++ optionals pulseSupport [ libpulseaudio ] ++ optionals sdlSupport [ SDL ] ++ optionals vncSupport [ libjpeg libpng ] ++ optionals spiceSupport [ spice_protocol spice usbredir ] - ++ optionals (hasSuffix "linux" stdenv.system) [ alsaLib libaio ]; + ++ optionals stdenv.isLinux [ alsaLib libaio libcap_ng libcap attr ]; enableParallelBuilding = true; patches = [ ./no-etc-install.patch ]; configureFlags = - [ "--enable-seccomp" - "--enable-numa" - "--smbd=smbd" # use `smbd' from $PATH + [ "--smbd=smbd" # use `smbd' from $PATH "--audio-drv-list=${audio}" "--sysconfdir=/etc" "--localstatedir=/var" ] + ++ optional numaSupport "--enable-numa" + ++ optional seccompSupport "--enable-seccomp" ++ optional spiceSupport "--enable-spice" ++ optional x86Only "--target-list=i386-softmmu,x86_64-softmmu" - ++ optional (hasSuffix "linux" stdenv.system) "--enable-linux-aio"; + ++ optional stdenv.isDarwin "--enable-cocoa" + ++ optional stdenv.isLinux "--enable-linux-aio"; postInstall = '' @@ -66,6 +74,6 @@ stdenv.mkDerivation rec { description = "A generic and open source machine emulator and virtualizer"; license = licenses.gpl2Plus; maintainers = with maintainers; [ viric eelco ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } |