summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/audio/fldigi/default.nix4
-rw-r--r--pkgs/applications/audio/ncmpcpp/default.nix6
-rw-r--r--pkgs/applications/gis/qgis/default.nix4
-rw-r--r--pkgs/applications/misc/blender/default.nix16
-rw-r--r--pkgs/applications/networking/browsers/chromium/common.nix4
-rw-r--r--pkgs/applications/networking/feedreaders/rawdog/default.nix21
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-annex/default.nix21
-rw-r--r--pkgs/applications/video/devede/default.nix30
-rw-r--r--pkgs/applications/video/kodi/default.nix120
-rw-r--r--pkgs/applications/video/xbmc/0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch32
-rw-r--r--pkgs/applications/video/xbmc/default.nix2
-rw-r--r--pkgs/applications/virtualization/qemu/cve-2014-0150.patch14
-rw-r--r--pkgs/applications/virtualization/qemu/default.nix39
-rw-r--r--pkgs/applications/virtualization/qemu/no-etc-install.patch14
-rw-r--r--pkgs/applications/window-managers/weston/default.nix10
15 files changed, 287 insertions, 50 deletions
diff --git a/pkgs/applications/audio/fldigi/default.nix b/pkgs/applications/audio/fldigi/default.nix
index e0250055ccda..5a4793a09c19 100644
--- a/pkgs/applications/audio/fldigi/default.nix
+++ b/pkgs/applications/audio/fldigi/default.nix
@@ -2,13 +2,13 @@
   libsamplerate, pulseaudio, libXinerama, gettext, pkgconfig, alsaLib }:
 
 stdenv.mkDerivation rec {
-  version = "3.21.83";
+  version = "3.22.02";
   pname = "fldigi";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "http://www.w1hkj.com/downloads/${pname}/${name}.tar.gz";
-    sha256 = "1fyg6dc6xnxb620rrhws60wj10lsgbwsmnhz8vc6ncspx8mx7019";
+    sha256 = "1gry3r133j2x99h0ji56v6yjxzvbi0hb18p1lbkr9djzjvf591j3";
   };
 
   buildInputs = [ libXinerama gettext hamlib fltk13 libjpeg libpng portaudio
diff --git a/pkgs/applications/audio/ncmpcpp/default.nix b/pkgs/applications/audio/ncmpcpp/default.nix
index 6e4ddcb1e9cb..e83e5a8ca74e 100644
--- a/pkgs/applications/audio/ncmpcpp/default.nix
+++ b/pkgs/applications/audio/ncmpcpp/default.nix
@@ -2,12 +2,12 @@
 , libiconvOrEmpty, boost, readline }:
 
 stdenv.mkDerivation rec {
-  version = "0.6.1";
+  version = "0.6.2";
   name = "ncmpcpp-${version}";
 
   src = fetchurl {
     url = "http://ncmpcpp.rybczak.net/stable/ncmpcpp-${version}.tar.bz2";
-    sha256 = "033a18hj0q0smm5n0ykld9az7w95myr7jm2b1bjm0h2q5927x8qm";
+    sha256 = "1mrd6m6ph0fscxp9x96ipxh6ai7w0n1miapcfqrqfy058qx5zbck";
   };
 
   configureFlags = "BOOST_LIB_SUFFIX=";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
     description = "Curses-based interface for MPD (music player daemon)";
     homepage    = http://unkart.ovh.org/ncmpcpp/;
     license     = licenses.gpl2Plus;
-    maintainers = with maintainers; [ lovek323 mornfall ];
+    maintainers = with maintainers; [ lovek323 mornfall koral ];
     platforms   = platforms.all;
   };
 }
diff --git a/pkgs/applications/gis/qgis/default.nix b/pkgs/applications/gis/qgis/default.nix
index 82f1bc382d71..231533e580ea 100644
--- a/pkgs/applications/gis/qgis/default.nix
+++ b/pkgs/applications/gis/qgis/default.nix
@@ -1,10 +1,10 @@
 { stdenv, fetchurl, gdal, cmake, qt4, flex, bison, proj, geos, x11, sqlite, gsl,
-  pyqt4, qwt, fcgi, python, libspatialindex, libspatialite, sip }:
+  pyqt4, qwt, fcgi, python, libspatialindex, libspatialite }:
 
 stdenv.mkDerivation rec {
   name = "qgis-2.4.0";
 
-  buildInputs = [ gdal qt4 flex bison proj geos x11 sqlite gsl pyqt4 sip qwt
+  buildInputs = [ gdal qt4 flex bison proj geos x11 sqlite gsl pyqt4 qwt
     fcgi libspatialindex libspatialite ];
 
   nativeBuildInputs = [ cmake python ];
diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix
index 01f9b861bf27..52583c535891 100644
--- a/pkgs/applications/misc/blender/default.nix
+++ b/pkgs/applications/misc/blender/default.nix
@@ -4,6 +4,7 @@
 , zlib, fftw
 , jackaudioSupport ? false, jack2
 , cudaSupport ? false, cudatoolkit6
+, colladaSupport ? true, opencollada
 }:
 
 with lib;
@@ -16,13 +17,20 @@ stdenv.mkDerivation rec {
     sha256 = "0ixz8h3c08p4f84x8r85nzddwvc0h5lw1ci8gdg2x3m2mw2cfdj4";
   };
 
+  patches = [(fetchpatch {
+    url = "https://raw.githubusercontent.com/Exherbo/media-unofficial/b5b09fa35ed/"
+      + "packages/media-gfx/blender/files/blender-2.71-Fix-build-with-freetype-2.5.4.patch";
+    sha256 = "19kx9h030zy2f0ah5v69ank2ak8gfp1zv26pm4ixngfdbsiy5lvk";
+  })];
+
   buildInputs =
     [ SDL boost cmake ffmpeg gettext glew ilmbase libXi
       libjpeg libpng libsamplerate libsndfile libtiff mesa openal
       opencolorio openexr openimageio /* openjpeg */ python zlib fftw
     ]
     ++ optional jackaudioSupport jack2
-    ++ optional cudaSupport cudatoolkit6;
+    ++ optional cudaSupport cudatoolkit6
+    ++ optional colladaSupport opencollada;
 
   postUnpack =
     ''
@@ -30,8 +38,7 @@ stdenv.mkDerivation rec {
     '';
 
   cmakeFlags =
-    [ "-DWITH_OPENCOLLADA=OFF"
-      "-DWITH_MOD_OCEANSIM=ON"
+    [ "-DWITH_MOD_OCEANSIM=ON"
       "-DWITH_CODEC_FFMPEG=ON"
       "-DWITH_CODEC_SNDFILE=ON"
       "-DWITH_INSTALL_PORTABLE=OFF"
@@ -41,7 +48,8 @@ stdenv.mkDerivation rec {
       "-DPYTHON_VERSION=${python.majorVersion}"
     ]
     ++ optional jackaudioSupport "-DWITH_JACK=ON"
-    ++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON";
+    ++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON"
+    ++ optional colladaSupport "-DWITH_OPENCOLLADA=ON";
 
   NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR -I${python}/include/${python.libPrefix}m";
 
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index be227fe05793..ee46bb970725 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -186,11 +186,13 @@ let
     } // (extraAttrs.gypFlags or {}));
 
     configurePhase = ''
+      # Precompile .pyc files to prevent race conditions during build
+      python -m compileall -q -f . || : # ignore errors
+
       # This is to ensure expansion of $out.
       libExecPath="${libExecPath}"
       python build/linux/unbundle/replace_gyp_files.py ${gypFlags}
       python build/gyp_chromium -f ninja --depth "$(pwd)" ${gypFlags}
-      find . -iname '*.py[co]' -delete
     '';
 
     buildPhase = let
diff --git a/pkgs/applications/networking/feedreaders/rawdog/default.nix b/pkgs/applications/networking/feedreaders/rawdog/default.nix
new file mode 100644
index 000000000000..fc494c6aebc0
--- /dev/null
+++ b/pkgs/applications/networking/feedreaders/rawdog/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, pythonPackages }:
+
+pythonPackages.buildPythonPackage rec {
+  name = "rawdog-2.20";
+
+  src = fetchurl {
+    url = "http://offog.org/files/${name}.tar.gz";
+    sha256 = "0a63b26cc111b0deca441f498177b49be0330760c5c0e24584cdb9ba1e7fd5a6";
+  };
+
+  propagatedBuildInputs = with pythonPackages; [ feedparser ];
+
+  namePrefix = "";
+  
+  meta = {
+    homepage = "http://offog.org/code/rawdog/";
+    description = "an RSS Aggregator Without Delusions Of Grandeur.";
+    license = stdenv.lib.licenses.gpl2;
+    platform = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/pkgs/applications/version-management/git-and-tools/git-annex/default.nix b/pkgs/applications/version-management/git-and-tools/git-annex/default.nix
index 9259cabc28e7..3982eff71b55 100644
--- a/pkgs/applications/version-management/git-and-tools/git-annex/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-annex/default.nix
@@ -10,15 +10,16 @@
 , networkProtocolXmpp, networkUri, openssh, optparseApplicative
 , pathPieces, perl, QuickCheck, random, regexTdfa, resourcet, rsync
 , SafeSemaphore, securemem, SHA, shakespeare, stm, tasty
-, tastyHunit, tastyQuickcheck, tastyRerun, text, time, transformers
-, unixCompat, utf8String, uuid, wai, waiExtra, warp, warpTls, which
-, xmlTypes, yesod, yesodCore, yesodDefault, yesodForm, yesodStatic
+, tastyHunit, tastyQuickcheck, tastyRerun, text, time, torrent
+, transformers, unixCompat, utf8String, uuid, wai, waiExtra, warp
+, warpTls, wget, which, xmlTypes, yesod, yesodCore, yesodDefault
+, yesodForm, yesodStatic
 }:
 
 cabal.mkDerivation (self: {
   pname = "git-annex";
-  version = "5.20141203";
-  sha256 = "01gifds86925vg7mh363i7qsii2wrgf3vpk3wgjff9rbb7z0fvfk";
+  version = "5.20141219";
+  sha256 = "1qxvsvys5hrpc5sm6s2ygr7hyrgfjc4qaycp1b0kkwjj4bl4cbvz";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
@@ -30,11 +31,13 @@ cabal.mkDerivation (self: {
     networkMulticast networkProtocolXmpp networkUri optparseApplicative
     pathPieces QuickCheck random regexTdfa resourcet SafeSemaphore
     securemem SHA shakespeare stm tasty tastyHunit tastyQuickcheck
-    tastyRerun text time transformers unixCompat utf8String uuid wai
-    waiExtra warp warpTls xmlTypes yesod yesodCore yesodDefault
-    yesodForm yesodStatic
+    tastyRerun text time torrent transformers unixCompat utf8String
+    uuid wai waiExtra warp warpTls xmlTypes yesod yesodCore
+    yesodDefault yesodForm yesodStatic
+  ];
+  buildTools = [
+    bup curl git gnupg1 lsof openssh perl rsync wget which
   ];
-  buildTools = [ bup curl git gnupg1 lsof openssh perl rsync which ];
   configureFlags = "-fAssistant -fProduction";
   preConfigure = "export HOME=$TEMPDIR";
   installPhase = "./Setup install";
diff --git a/pkgs/applications/video/devede/default.nix b/pkgs/applications/video/devede/default.nix
new file mode 100644
index 000000000000..b48f0f42936d
--- /dev/null
+++ b/pkgs/applications/video/devede/default.nix
@@ -0,0 +1,30 @@
+{ pkgs, stdenv, fetchurl, pythonPackages, buildPythonPackage, pygtk, ffmpeg, mplayer, vcdimager, cdrkit, dvdauthor }:
+
+let
+  inherit (pythonPackages) dbus;
+
+in buildPythonPackage rec {
+  name = "devede-3.23.0";
+  namePrefix = "";
+
+  src = fetchurl {
+    url = "http://www.rastersoft.com/descargas/${name}.tar.bz2";
+    sha256 = "9e217ca46f5f275cb0c3cadbe8c830fa1fde774c004bd95a343d1255be6f25e1";
+  };
+
+  buildInputs = [ ffmpeg ];
+
+  pythonPath = [ pygtk dbus ffmpeg mplayer dvdauthor vcdimager cdrkit ];
+
+  postPatch = ''
+    substituteInPlace devede --replace "/usr/share/devede" "$out/share/devede"
+
+  '';
+
+  meta = with stdenv.lib; {
+    description = "DVD Creator for Linux";
+    homepage = http://www.rastersoft.com/programas/devede.html;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.bdimcheff ];
+  };
+}
diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix
new file mode 100644
index 000000000000..8735b8a78a1a
--- /dev/null
+++ b/pkgs/applications/video/kodi/default.nix
@@ -0,0 +1,120 @@
+{ stdenv, lib, fetchurl, makeWrapper
+, pkgconfig, cmake, gnumake, yasm, pythonFull
+, boost, avahi, libdvdcss, lame, autoreconfHook
+, gettext, pcre, yajl, fribidi, which
+, openssl, gperf, tinyxml2, taglib, libssh, swig, jre
+, libX11, xproto, inputproto, libxml2
+, libXt, libXmu, libXext, xextproto
+, libXinerama, libXrandr, randrproto
+, libXtst, libXfixes, fixesproto, systemd
+, SDL, SDL_image, SDL_mixer, alsaLib
+, mesa, glew, fontconfig, freetype, ftgl
+, libjpeg, jasper, libpng, libtiff
+, libmpeg2, libsamplerate, libmad
+, libogg, libvorbis, flac, libxslt
+, lzo, libcdio, libmodplug, libass, libbluray
+, sqlite, mysql, nasm, gnutls, libva, wayland
+, curl, bzip2, zip, unzip, glxinfo, xdpyinfo
+, dbus_libs ? null, dbusSupport ? true
+, udev, udevSupport ? true
+, libusb ? null, usbSupport ? false
+, samba ? null, sambaSupport ? true
+, libmicrohttpd, bash
+# TODO: would be nice to have nfsSupport (needs libnfs library)
+# TODO: librtmp
+, libvdpau ? null, vdpauSupport ? true
+, pulseaudio ? null, pulseSupport ? true
+, libcec ? null, cecSupport ? true
+}:
+
+assert dbusSupport  -> dbus_libs != null;
+assert udevSupport  -> udev != null;
+assert usbSupport   -> libusb != null && ! udevSupport; # libusb won't be used if udev is avaliable
+assert sambaSupport -> samba != null;
+assert vdpauSupport -> libvdpau != null;
+assert pulseSupport -> pulseaudio != null;
+assert cecSupport   -> libcec != null;
+
+let
+  ffmpeg_2_4_4 = fetchurl {
+    url = "https://github.com/xbmc/FFmpeg/archive/2.4.4-Helix.tar.gz";
+    sha256 = "1pkkmnq0kbwb13ps1wk01709lp3l2dzbfay6l29zj1204lbc3anb";
+  };
+in stdenv.mkDerivation rec {
+    name = "kodi-14.0";
+
+    src = fetchurl {
+      url = "https://github.com/xbmc/xbmc/archive/14.0-Helix.tar.gz";
+      sha256 = "14hip50gg3qgfb0mw7wrdqvw77mxdg9x1abfrqv1ydjrrjansx0i";
+    };
+
+    buildInputs = [
+      makeWrapper libxml2 gnutls
+      pkgconfig cmake gnumake yasm pythonFull
+      boost libmicrohttpd autoreconfHook
+      gettext pcre yajl fribidi libva
+      openssl gperf tinyxml2 taglib libssh swig jre
+      libX11 xproto inputproto which
+      libXt libXmu libXext xextproto
+      libXinerama libXrandr randrproto
+      libXtst libXfixes fixesproto
+      SDL SDL_image SDL_mixer alsaLib
+      mesa glew fontconfig freetype ftgl
+      libjpeg jasper libpng libtiff wayland
+      libmpeg2 libsamplerate libmad
+      libogg libvorbis flac libxslt systemd
+      lzo libcdio libmodplug libass libbluray
+      sqlite mysql nasm avahi libdvdcss lame
+      curl bzip2 zip unzip glxinfo xdpyinfo
+    ]
+    ++ lib.optional dbusSupport dbus_libs
+    ++ lib.optional udevSupport udev
+    ++ lib.optional usbSupport libusb
+    ++ lib.optional sambaSupport samba
+    ++ lib.optional vdpauSupport libvdpau
+    ++ lib.optional pulseSupport pulseaudio
+    ++ lib.optional cecSupport libcec;
+
+    dontUseCmakeConfigure = true;
+
+    postPatch = ''
+      substituteInPlace xbmc/linux/LinuxTimezone.cpp \
+        --replace 'usr/share/zoneinfo' 'etc/zoneinfo'
+      substituteInPlace tools/depends/target/ffmpeg/autobuild.sh \
+        --replace "/bin/bash" "${bash}/bin/bash -ex"
+      cp ${ffmpeg_2_4_4} tools/depends/target/ffmpeg/ffmpeg-2.4.4-Helix.tar.gz
+    '';
+
+    preConfigure = ''
+      ./bootstrap
+    '';
+
+    configureFlags = [
+      "--enable-external-libraries"
+    ]
+    ++ lib.optional (!sambaSupport) "--disable-samba"
+    ++ lib.optional vdpauSupport "--enable-vdpau"
+    ++ lib.optional pulseSupport "--enable-pulse";
+
+    postInstall = ''
+      for p in $(ls $out/bin/) ; do
+        wrapProgram $out/bin/$p \
+          --prefix PATH ":" "${pythonFull}/bin" \
+          --prefix PATH ":" "${glxinfo}/bin" \
+          --prefix PATH ":" "${xdpyinfo}/bin" \
+          --prefix LD_LIBRARY_PATH ":" "${curl}/lib" \
+          --prefix LD_LIBRARY_PATH ":" "${systemd}/lib" \
+          --prefix LD_LIBRARY_PATH ":" "${libmad}/lib" \
+          --prefix LD_LIBRARY_PATH ":" "${libvdpau}/lib" \
+          --prefix LD_LIBRARY_PATH ":" "${libcec}/lib"
+      done
+    '';
+
+    meta = with stdenv.lib; {
+      homepage = http://kodi.tv/;
+      description = "Media center";
+      license = stdenv.lib.licenses.gpl2;
+      platforms = platforms.linux;
+      maintainers = [ maintainers.iElectric maintainers.titanous ];
+    };
+}
diff --git a/pkgs/applications/video/xbmc/0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch b/pkgs/applications/video/xbmc/0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
new file mode 100644
index 000000000000..91811194c9b7
--- /dev/null
+++ b/pkgs/applications/video/xbmc/0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
@@ -0,0 +1,32 @@
+From 9f1e45a10860dd23239de35673643e9e0e4a74f8 Mon Sep 17 00:00:00 2001
+From: Lars Op den Kamp <lars@opdenkamp.eu>
+Date: Tue, 28 Oct 2014 14:52:16 +0100
+Subject: [PATCH 5/8] [CEC] renamed the iDoubleTapTimeoutMs in the new libCEC
+ for clarity. does not change binary compatibility
+
+---
+ xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+index 1d068dc..ad123d9 100644
+--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+@@ -1347,8 +1347,13 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
+   m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
+   m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
+ 
++#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
+   // double tap prevention timeout in ms
+-  m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
++  m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50;
++#else
++  // backwards compatibility. will be removed once the next major release of libCEC is out
++  m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
++#endif
+ }
+ 
+ void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)
+-- 
+2.1.2
+
diff --git a/pkgs/applications/video/xbmc/default.nix b/pkgs/applications/video/xbmc/default.nix
index f7bddc50ef82..cb6f4346e168 100644
--- a/pkgs/applications/video/xbmc/default.nix
+++ b/pkgs/applications/video/xbmc/default.nix
@@ -72,6 +72,8 @@ stdenv.mkDerivation rec {
 
     dontUseCmakeConfigure = true;
 
+    patches = [ ./0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch ];
+
     preConfigure = ''
       substituteInPlace xbmc/linux/LinuxTimezone.cpp \
         --replace 'usr/share/zoneinfo' 'etc/zoneinfo'
diff --git a/pkgs/applications/virtualization/qemu/cve-2014-0150.patch b/pkgs/applications/virtualization/qemu/cve-2014-0150.patch
deleted file mode 100644
index a086b3693215..000000000000
--- a/pkgs/applications/virtualization/qemu/cve-2014-0150.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-
-diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
-index 439477b..33bd233 100644
---- a/hw/net/virtio-net.c
-+++ b/hw/net/virtio-net.c
- <at>  <at>  -677,7 +677,7  <at>  <at>  static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd,
-         goto error;
-     }
-
--    if (in_use + mac_data.entries <= MAC_TABLE_ENTRIES) {
-+    if (mac_data.entries <= MAC_TABLE_ENTRIES - in_use) {
-         s = iov_to_buf(iov, iov_cnt, 0, &macs[in_use * ETH_ALEN],
-                        mac_data.entries * ETH_ALEN);
-         if (s != mac_data.entries * ETH_ALEN) {
diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix
index 1d668c4a28cf..7b329750ea5e 100644
--- a/pkgs/applications/virtualization/qemu/default.nix
+++ b/pkgs/applications/virtualization/qemu/default.nix
@@ -1,40 +1,55 @@
 { stdenv, fetchurl, python, zlib, pkgconfig, glib, ncurses, perl, pixman
-, attr, libcap, vde2, alsaLib, texinfo, libuuid, flex, bison
+, attr, libcap, vde2, alsaLib, texinfo, libuuid, flex, bison, lzo, snappy
+, libseccomp, libaio, libcap_ng, gnutls
 , makeWrapper
+, pulseSupport ? true, pulseaudio
 , sdlSupport ? true, SDL
 , vncSupport ? true, libjpeg, libpng
 , spiceSupport ? true, spice, spice_protocol, usbredir
 , x86Only ? false
 }:
 
-let n = "qemu-2.0.0"; in
+with stdenv.lib;
+let
+  n = "qemu-2.2.0";
+  audio = optionalString (hasSuffix "linux" stdenv.system) "alsa,"
+    + optionalString pulseSupport "pa,"
+    + optionalString sdlSupport "sdl,";
+in
 
 stdenv.mkDerivation rec {
   name = n + (if x86Only then "-x86-only" else "");
 
   src = fetchurl {
     url = "http://wiki.qemu.org/download/${n}.tar.bz2";
-    sha256 = "0frsahiw56jr4cqr9m6s383lyj4ar9hfs2wp3y4yr76krah1mk30";
+    sha256 = "1703c3scl5n07gmpilg7g2xzyxnr7jczxgx6nn4m8kv9gin9p35n";
   };
 
-  patches = [ ./cve-2014-0150.patch ];
-
   buildInputs =
     [ python zlib pkgconfig glib ncurses perl pixman attr libcap
-      vde2 alsaLib texinfo libuuid flex bison makeWrapper
+      vde2 texinfo libuuid flex bison makeWrapper lzo snappy libseccomp
+      libcap_ng gnutls
     ]
-    ++ stdenv.lib.optionals sdlSupport [ SDL ]
-    ++ stdenv.lib.optionals vncSupport [ libjpeg libpng ]
-    ++ stdenv.lib.optionals spiceSupport [ spice_protocol spice usbredir ];
+    ++ optionals pulseSupport [ pulseaudio ]
+    ++ optionals sdlSupport [ SDL ]
+    ++ optionals vncSupport [ libjpeg libpng ]
+    ++ optionals spiceSupport [ spice_protocol spice usbredir ]
+    ++ optionals (hasSuffix "linux" stdenv.system) [ alsaLib libaio ];
 
   enableParallelBuilding = true;
 
+  patches = [ ./no-etc-install.patch ];
+
   configureFlags =
-    [ "--audio-drv-list=alsa"
+    [ "--enable-seccomp"
       "--smbd=smbd" # use `smbd' from $PATH
+      "--audio-drv-list=${audio}"
+      "--sysconfdir=/etc"
+      "--localstatedir=/var"
     ]
-    ++ stdenv.lib.optional spiceSupport "--enable-spice"
-    ++ stdenv.lib.optional x86Only "--target-list=i386-softmmu,x86_64-softmmu";
+    ++ optional spiceSupport "--enable-spice"
+    ++ optional x86Only "--target-list=i386-softmmu,x86_64-softmmu"
+    ++ optional (hasSuffix "linux" stdenv.system) "--enable-linux-aio";
 
   postInstall =
     ''
diff --git a/pkgs/applications/virtualization/qemu/no-etc-install.patch b/pkgs/applications/virtualization/qemu/no-etc-install.patch
new file mode 100644
index 000000000000..81d29feea3de
--- /dev/null
+++ b/pkgs/applications/virtualization/qemu/no-etc-install.patch
@@ -0,0 +1,14 @@
+diff --git a/Makefile b/Makefile
+index d6b9dc1..ce7c493 100644
+--- a/Makefile
++++ b/Makefile
+@@ -384,8 +384,7 @@ install-confdir:
+ install-sysconfig: install-datadir install-confdir
+ 	$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
+ 
+-install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \
+-install-datadir install-localstatedir
++install: all $(if $(BUILD_DOCS),install-doc) install-datadir
+ ifneq ($(TOOLS),)
+ 	$(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
+ endif
diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix
index 9a6708f1b140..c78f7d2d2415 100644
--- a/pkgs/applications/window-managers/weston/default.nix
+++ b/pkgs/applications/window-managers/weston/default.nix
@@ -1,7 +1,8 @@
 { stdenv, fetchurl, pkgconfig, wayland, mesa, libxkbcommon, cairo, libxcb
 , libXcursor, x11, udev, libdrm, mtdev, libjpeg, pam, dbus, libinput
 , pango ? null, libunwind ? null, freerdp ? null, vaapi ? null, libva ? null
-, libwebp ? null
+, libwebp ? null, xwayland ? null
+# beware of null defaults, as the parameters *are* supplied by callPackage by default
 }:
 
 let version = "1.6.0"; in
@@ -21,7 +22,6 @@ stdenv.mkDerivation rec {
   ];
 
   configureFlags = [
-    "--enable-xwayland"
     "--enable-x11-compositor"
     "--enable-drm-compositor"
     "--enable-wayland-compositor"
@@ -32,7 +32,11 @@ stdenv.mkDerivation rec {
     "--enable-weston-launch"
     "--disable-setuid-install" # prevent install target to chown root weston-launch, which fails
   ] ++ stdenv.lib.optional (freerdp != null) "--enable-rdp-compositor"
-    ++ stdenv.lib.optional (vaapi != null) "--enabe-vaapi-recorder";
+    ++ stdenv.lib.optional (vaapi != null) "--enabe-vaapi-recorder"
+    ++ stdenv.lib.optionals (xwayland != null) [
+        "--enable-xwayland"
+        "--with-xserver-path=${xwayland}/bin/Xwayland"
+      ];
 
   meta = with stdenv.lib; {
     description = "Reference implementation of a Wayland compositor";