summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2016-03-07 22:08:27 +0100
committerFranz Pletz <fpletz@fnordicwalking.de>2016-03-07 22:08:27 +0100
commite9fc4e7db63e91f3e787d9d3bfd91c798e8bd8bd (patch)
tree4f1e1a834fbbc0e201e0fb453801d005ed22d332 /pkgs/applications
parentbaee91ec60ca724b00027033a8e0d7f97cf376a7 (diff)
parentbcfb3dd9c605bf68730757cc60d01dec91f009f2 (diff)
downloadnixlib-e9fc4e7db63e91f3e787d9d3bfd91c798e8bd8bd.tar
nixlib-e9fc4e7db63e91f3e787d9d3bfd91c798e8bd8bd.tar.gz
nixlib-e9fc4e7db63e91f3e787d9d3bfd91c798e8bd8bd.tar.bz2
nixlib-e9fc4e7db63e91f3e787d9d3bfd91c798e8bd8bd.tar.lz
nixlib-e9fc4e7db63e91f3e787d9d3bfd91c798e8bd8bd.tar.xz
nixlib-e9fc4e7db63e91f3e787d9d3bfd91c798e8bd8bd.tar.zst
nixlib-e9fc4e7db63e91f3e787d9d3bfd91c798e8bd8bd.zip
Merge remote-tracking branch 'origin/master' into hardened-stdenv
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/audio/fluidsynth/default.nix7
-rw-r--r--pkgs/applications/audio/non/default.nix20
-rw-r--r--pkgs/applications/audio/pithos/default.nix5
-rw-r--r--pkgs/applications/audio/rubyripper/default.nix3
-rw-r--r--pkgs/applications/editors/atom/default.nix4
-rw-r--r--pkgs/applications/editors/eclipse/plugins.nix6
-rw-r--r--pkgs/applications/editors/emacs-modes/elpa-generated.nix118
-rw-r--r--pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix52
-rw-r--r--pkgs/applications/graphics/ahoviewer/default.nix36
-rw-r--r--pkgs/applications/graphics/sane/backends/git.nix6
-rw-r--r--pkgs/applications/misc/electrum/default.nix27
-rw-r--r--pkgs/applications/misc/octoprint/plugins.nix4
-rw-r--r--pkgs/applications/misc/pgadmin/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/chromium/source/default.nix11
-rw-r--r--pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_50.patch75
-rw-r--r--pkgs/applications/networking/browsers/chromium/source/sources.nix19
-rw-r--r--pkgs/applications/networking/cluster/marathon/default.nix6
-rw-r--r--pkgs/applications/networking/cluster/mesos/default.nix21
-rw-r--r--pkgs/applications/networking/instant-messengers/pidgin/default.nix13
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix10
-rw-r--r--pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix6
-rw-r--r--pkgs/applications/video/mkvtoolnix/default.nix94
22 files changed, 387 insertions, 160 deletions
diff --git a/pkgs/applications/audio/fluidsynth/default.nix b/pkgs/applications/audio/fluidsynth/default.nix
index bd35b78fbc0e..bb37cac5500e 100644
--- a/pkgs/applications/audio/fluidsynth/default.nix
+++ b/pkgs/applications/audio/fluidsynth/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, alsaLib, glib, libjack2, libsndfile, pkgconfig
-, libpulseaudio }:
+, libpulseaudio, CoreServices, CoreAudio, AudioUnit }:
 
 stdenv.mkDerivation  rec {
   name = "fluidsynth-${version}";
@@ -18,10 +18,11 @@ stdenv.mkDerivation  rec {
   '';
 
   NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin
-    "-framework CoreAudio";
+    "-framework CoreAudio -framework CoreServices";
 
   buildInputs = [ glib libsndfile pkgconfig ]
-    ++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib libpulseaudio libjack2 ];
+    ++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib libpulseaudio libjack2 ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices CoreAudio AudioUnit ];
 
   meta = with stdenv.lib; {
     description = "Real-time software synthesizer based on the SoundFont 2 specifications";
diff --git a/pkgs/applications/audio/non/default.nix b/pkgs/applications/audio/non/default.nix
index 5a54c94f1f97..ead53721950b 100644
--- a/pkgs/applications/audio/non/default.nix
+++ b/pkgs/applications/audio/non/default.nix
@@ -1,23 +1,23 @@
-{ stdenv, fetchFromGitHub, pkgconfig, python2, cairo, libjpeg, ntk, libjack2, libsndfile,
-ladspaH, liblrdf, liblo, libsigcxx
+{ stdenv, fetchFromGitHub, pkgconfig, python2, cairo, libjpeg, ntk, libjack2
+, libsndfile, ladspaH, liblrdf, liblo, libsigcxx
 }:
 
 stdenv.mkDerivation rec {
   name = "non-${version}";
-  version = "2016-02-07";
+  version = "2016-03-06";
   src = fetchFromGitHub {
     owner = "original-male";
     repo = "non";
-    rev = "1ef382fbbea598fdb56b25244a703c64ecaf8446";
-    sha256 = "1mi3nm0nrrqlk36920irvqf5080lbnj1qc8vnxspgwkjjqgdc22g";
+    rev = "3946d392216ee999b560d8b7cdee7c4347110e29";
+    sha256 = "02vnq2mfimgdrmv3lmz80yif4h9a1lympv0wqc5dr2l0f8amj2fp";
   };
 
-    buildInputs = [ pkgconfig python2 cairo libjpeg ntk libjack2 libsndfile
+  buildInputs = [ pkgconfig python2 cairo libjpeg ntk libjack2 libsndfile
     ladspaH liblrdf liblo libsigcxx
-    ];
-    configurePhase = ''python waf configure --prefix=$out'';
-    buildPhase = ''python waf build'';
-    installPhase = ''python waf install'';
+  ];
+  configurePhase = "python waf configure --prefix=$out";
+  buildPhase = "python waf build";
+  installPhase = "python waf install";
 
   meta = {
     description = "Lightweight and lightning fast modular Digital Audio Workstation";
diff --git a/pkgs/applications/audio/pithos/default.nix b/pkgs/applications/audio/pithos/default.nix
index 1083f9434a94..ac42fc716424 100644
--- a/pkgs/applications/audio/pithos/default.nix
+++ b/pkgs/applications/audio/pithos/default.nix
@@ -19,6 +19,11 @@ pythonPackages.buildPythonApplication rec {
     substituteInPlace setup.py --replace "/usr/share" "$out/share"
   '';
 
+  postInstall = ''
+    mkdir -p $out/share/applications
+    cp -v data/pithos.desktop $out/share/applications
+  '';
+
   buildInputs = [ wrapGAppsHook ];
 
   propagatedBuildInputs =
diff --git a/pkgs/applications/audio/rubyripper/default.nix b/pkgs/applications/audio/rubyripper/default.nix
index 36f1fc8312fb..035bb8764829 100644
--- a/pkgs/applications/audio/rubyripper/default.nix
+++ b/pkgs/applications/audio/rubyripper/default.nix
@@ -6,6 +6,9 @@ stdenv.mkDerivation rec {
     url = "https://rubyripper.googlecode.com/files/rubyripper-${version}.tar.bz2";
     sha256 = "1fwyk3y0f45l2vi3a481qd7drsy82ccqdb8g2flakv58m45q0yl1";
   };
+
+  preConfigure = "patchShebangs .";
+
   configureFlags = [ "--enable-cli" ];
   buildInputs = [ ruby cdparanoia makeWrapper ];
   postInstall = ''
diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix
index d7b91de80d80..8dc1e2d0c013 100644
--- a/pkgs/applications/editors/atom/default.nix
+++ b/pkgs/applications/editors/atom/default.nix
@@ -16,11 +16,11 @@ let
   };
 in stdenv.mkDerivation rec {
   name = "atom-${version}";
-  version = "1.5.3";
+  version = "1.5.4";
 
   src = fetchurl {
     url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
-    sha256 = "101fz4c5pj7yp7fg7kg7vcpqjzpwfrbxdyb6va5liip1llg1i2z3";
+    sha256 = "0jnszf1v7xqhm2sy5wzm3f8aw7j1dnapnbw4d46bvshv9hbbzrn8";
     name = "${name}.deb";
   };
 
diff --git a/pkgs/applications/editors/eclipse/plugins.nix b/pkgs/applications/editors/eclipse/plugins.nix
index 50975d061eb8..3bde9b1434c6 100644
--- a/pkgs/applications/editors/eclipse/plugins.nix
+++ b/pkgs/applications/editors/eclipse/plugins.nix
@@ -171,12 +171,12 @@ rec {
 
   checkstyle = buildEclipseUpdateSite rec {
     name = "checkstyle-${version}";
-    version = "6.14.0.201601142217";
+    version = "6.16.0.201603042325";
 
     src = fetchzip {
       stripRoot = false;
-      url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/6.14.0/net.sf.eclipsecs-updatesite_${version}-bin.zip";
-      sha256 = "0ysxir1fv0mb9xnidc9hv6llnk48lkav0sryjbx7pw7vy1f8nd4c";
+      url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/6.16.0/net.sf.eclipsecs-updatesite_${version}.zip";
+      sha256 = "0bm1linyw82bryblyabcx89zqw1ingh8mx62bwp3qj05yc9ksnly";
     };
 
     meta = with stdenv.lib; {
diff --git a/pkgs/applications/editors/emacs-modes/elpa-generated.nix b/pkgs/applications/editors/emacs-modes/elpa-generated.nix
index fbb7955a1d67..f10b1fbe61f8 100644
--- a/pkgs/applications/editors/emacs-modes/elpa-generated.nix
+++ b/pkgs/applications/editors/emacs-modes/elpa-generated.nix
@@ -132,6 +132,19 @@
           license = lib.licenses.free;
         };
       }) {};
+    arbitools = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
+        pname = "arbitools";
+        version = "0.51";
+        src = fetchurl {
+          url = "http://elpa.gnu.org/packages/arbitools-0.51.el";
+          sha256 = "1pwps73s885i1777wlmqhkmfgj564bkb6rkpc964v0vcqia6fpag";
+        };
+        packageRequires = [];
+        meta = {
+          homepage = "http://elpa.gnu.org/packages/arbitools.html";
+          license = lib.licenses.free;
+        };
+      }) {};
     ascii-art-to-unicode = callPackage ({ elpaBuild, fetchurl, lib }:
     elpaBuild {
         pname = "ascii-art-to-unicode";
@@ -322,10 +335,10 @@
     company-math = callPackage ({ company, elpaBuild, fetchurl, lib, math-symbol-lists }:
     elpaBuild {
         pname = "company-math";
-        version = "1.0.1";
+        version = "1.1";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/company-math-1.0.1.el";
-          sha256 = "1lkj9cqhmdf3h5zvr94hszkz1251i2rq2mycnhscsnzrk5ll3gck";
+          url = "http://elpa.gnu.org/packages/company-math-1.1.tar";
+          sha256 = "10yi5jmv7njcaansgy2aw7wm1j3acch1j9x6lfg9mxk0j21zvgwp";
         };
         packageRequires = [ company math-symbol-lists ];
         meta = {
@@ -350,10 +363,10 @@
     context-coloring = callPackage ({ elpaBuild, emacs, fetchurl, js2-mode, lib }:
     elpaBuild {
         pname = "context-coloring";
-        version = "7.2.0";
+        version = "7.2.1";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/context-coloring-7.2.0.el";
-          sha256 = "0l7mzmnhqh6sri1fhhv51khi0fnpfp51drzy725s6zfmpbrcn7vn";
+          url = "http://elpa.gnu.org/packages/context-coloring-7.2.1.el";
+          sha256 = "1lh2p3fsym73h0dcj1gqg1xsw3lcikmcskbx8y3j0ds30l4xs13d";
         };
         packageRequires = [ emacs js2-mode ];
         meta = {
@@ -628,12 +641,26 @@
           license = lib.licenses.free;
         };
       }) {};
+    excorporate = callPackage ({ elpaBuild, emacs, fetchurl, fsm, lib, soap-client, url-http-ntlm }:
+    elpaBuild {
+        pname = "excorporate";
+        version = "0.7.1";
+        src = fetchurl {
+          url = "http://elpa.gnu.org/packages/excorporate-0.7.1.tar";
+          sha256 = "1flvhk39yymskzazpwh95j2nj8kg4b02hsg7b8msnqi3q5lpqs54";
+        };
+        packageRequires = [ emacs fsm soap-client url-http-ntlm ];
+        meta = {
+          homepage = "http://elpa.gnu.org/packages/excorporate.html";
+          license = lib.licenses.free;
+        };
+      }) {};
     exwm = callPackage ({ elpaBuild, fetchurl, lib, xelb }: elpaBuild {
         pname = "exwm";
-        version = "0.2";
+        version = "0.4";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/exwm-0.2.tar";
-          sha256 = "0z96zz6h5r880nbhclbxs2r0zfkg771lg0fjghigqxz8ai0hh1ll";
+          url = "http://elpa.gnu.org/packages/exwm-0.4.tar";
+          sha256 = "1qlplx88mk8c5sahlymxxh46bzf6bxnsqk92wliv5ji4ai5373fb";
         };
         packageRequires = [ xelb ];
         meta = {
@@ -767,10 +794,10 @@
     hydra = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }:
     elpaBuild {
         pname = "hydra";
-        version = "0.13.4";
+        version = "0.13.5";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/hydra-0.13.4.tar";
-          sha256 = "11msy6n075iv00c2r9f85bzx3srnj403rhlga1rgsl6vsryf21fj";
+          url = "http://elpa.gnu.org/packages/hydra-0.13.5.tar";
+          sha256 = "0vq1pjyq6ddbikbh0vzdigbs0zlldgwad0192s7v9npg8qlwi668";
         };
         packageRequires = [ cl-lib ];
         meta = {
@@ -978,10 +1005,10 @@
       }) {};
     math-symbol-lists = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
         pname = "math-symbol-lists";
-        version = "1.0";
+        version = "1.1";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/math-symbol-lists-1.0.el";
-          sha256 = "1rry9x4pl7i0sij051i76zp1ypvnj1qbwm40a7bs462c74q4jlwn";
+          url = "http://elpa.gnu.org/packages/math-symbol-lists-1.1.tar";
+          sha256 = "06klvnqipz0n9slw72fxmhrydrw6bi9fs9vnn8hrja8gsqf8inlz";
         };
         packageRequires = [];
         meta = {
@@ -1005,10 +1032,10 @@
     metar = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }:
     elpaBuild {
         pname = "metar";
-        version = "0.1";
+        version = "0.2";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/metar-0.1.el";
-          sha256 = "0s9zyzps022h5xax574bwsvsyp893x5w74kznnhfm63sxrifbi18";
+          url = "http://elpa.gnu.org/packages/metar-0.2.el";
+          sha256 = "0rfzq79llh6ixw02kjpn8s2shxrabvfvsq48pagwak1jl2s0askf";
         };
         packageRequires = [ cl-lib ];
         meta = {
@@ -1215,10 +1242,10 @@
       }) {};
     org = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
         pname = "org";
-        version = "20160215";
+        version = "20160229";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/org-20160215.tar";
-          sha256 = "0w2686rza4xdknq3sy87s04zvlmjxyr6wrj9y9ydcv8hbzws3bhd";
+          url = "http://elpa.gnu.org/packages/org-20160229.tar";
+          sha256 = "15zrkw33ma8q079sb518rmcj97n35rnjv16p6zfw52m9xfdwxgi9";
         };
         packageRequires = [];
         meta = {
@@ -1411,6 +1438,19 @@
           license = lib.licenses.free;
         };
       }) {};
+    sed-mode = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
+        pname = "sed-mode";
+        version = "1.0";
+        src = fetchurl {
+          url = "http://elpa.gnu.org/packages/sed-mode-1.0.el";
+          sha256 = "1zpdai5k9zhy5hw0a5zx7qv3rcf8cn29hncfjnhk9k6sjq0302lg";
+        };
+        packageRequires = [];
+        meta = {
+          homepage = "http://elpa.gnu.org/packages/sed-mode.html";
+          license = lib.licenses.free;
+        };
+      }) {};
     seq = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
         pname = "seq";
         version = "1.11";
@@ -1439,10 +1479,10 @@
       }) {};
     sisu-mode = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
         pname = "sisu-mode";
-        version = "3.0.3";
+        version = "7.1.8";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/sisu-mode-3.0.3.el";
-          sha256 = "0ay9hfix3x53f39my02071dzxrw69d4zx5zirxwmmmyxmkaays3r";
+          url = "http://elpa.gnu.org/packages/sisu-mode-7.1.8.el";
+          sha256 = "12zs6y4rzng1d7djl9wh3wc0f9fj0bqb7h754rvixvndlr5c10nj";
         };
         packageRequires = [];
         meta = {
@@ -1492,10 +1532,10 @@
       }) {};
     sotlisp = callPackage ({ elpaBuild, emacs, fetchurl, lib }: elpaBuild {
         pname = "sotlisp";
-        version = "1.4.1";
+        version = "1.5.1";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/sotlisp-1.4.1.el";
-          sha256 = "1v99pcj5lp1xxavghwv03apwpc589y7wb8vv6w3kai7483p13z5j";
+          url = "http://elpa.gnu.org/packages/sotlisp-1.5.1.el";
+          sha256 = "1dm2pl4i091gi5lljl68s6v3l3904jj38v56qjblm160wjiahgkm";
         };
         packageRequires = [ emacs ];
         meta = {
@@ -1518,10 +1558,10 @@
       }) {};
     stream = callPackage ({ elpaBuild, emacs, fetchurl, lib }: elpaBuild {
         pname = "stream";
-        version = "2.1.0";
+        version = "2.2.0";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/stream-2.1.0.el";
-          sha256 = "05fihjd8gm5w4xbdcvah1g9srcgmk87ymk3i7wwa6961w5s01d5y";
+          url = "http://elpa.gnu.org/packages/stream-2.2.0.el";
+          sha256 = "0i6vwih61a0z0q05v9wyp9nj5h68snlb9n52nmrv1k0hhzsjmlrs";
         };
         packageRequires = [ emacs ];
         meta = {
@@ -1598,10 +1638,10 @@
     test-simple = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }:
     elpaBuild {
         pname = "test-simple";
-        version = "1.1";
+        version = "1.2.0";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/test-simple-1.1.el";
-          sha256 = "0s8r6kr0a6n1c20fraif2ngis436a7d3gsj351s6icx6bbcjdalw";
+          url = "http://elpa.gnu.org/packages/test-simple-1.2.0.el";
+          sha256 = "1j97qrwi3i2kihszsxf3y2cby2bzp8g0zf6jlpdix3dinav8xa3b";
         };
         packageRequires = [ cl-lib ];
         meta = {
@@ -1704,10 +1744,10 @@
     url-http-ntlm = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib, ntlm ? null }:
     elpaBuild {
         pname = "url-http-ntlm";
-        version = "2.0.1";
+        version = "2.0.2";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/url-http-ntlm-2.0.1.tar";
-          sha256 = "0h6xsm1x7v69kb4shyvv1p4f6sxgcqs5ap6ylqydz10mbcx7aq0w";
+          url = "http://elpa.gnu.org/packages/url-http-ntlm-2.0.2.el";
+          sha256 = "0jci5cl31hw4dj0j9ljq0iplg530wnwbw7b63crrwn3mza5cb2wf";
         };
         packageRequires = [ cl-lib ntlm ];
         meta = {
@@ -1849,10 +1889,10 @@
     xelb = callPackage ({ cl-generic, elpaBuild, emacs, fetchurl, lib }:
     elpaBuild {
         pname = "xelb";
-        version = "0.5";
+        version = "0.6";
         src = fetchurl {
-          url = "http://elpa.gnu.org/packages/xelb-0.5.tar";
-          sha256 = "1wypffg492r2a3h136c6mphsbgimxcipsarm971z56kpy3lwi4sb";
+          url = "http://elpa.gnu.org/packages/xelb-0.6.tar";
+          sha256 = "1m91af5srxq8zs9w4gb44kl4bgka8fq7k33h7f2yn213h23kvvvh";
         };
         packageRequires = [ cl-generic emacs ];
         meta = {
diff --git a/pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix b/pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix
new file mode 100644
index 000000000000..a8760afc58b0
--- /dev/null
+++ b/pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix
@@ -0,0 +1,52 @@
+{ stdenv, fetchgit, emacs, texinfo, texLive, perl, which, automake, enableDoc ? false }:
+
+stdenv.mkDerivation (rec {
+  name = "ProofGeneral-HEAD";
+
+  src = fetchgit {
+    url = "https://github.com/ProofGeneral/PG.git";
+    rev = "16991280fb09743ae7320aef77f6a166afb907d7";
+    sha256 = "08zhfl6xbl4q7lrl7wdp72xr155k06778by0d60g28mfx59b7sqc";
+  };
+
+  buildInputs = [ emacs texinfo perl which ] ++ stdenv.lib.optional enableDoc texLive;
+
+  prePatch =
+    '' sed -i "Makefile" \
+           -e "s|^\(\(DEST_\)\?PREFIX\)=.*$|\1=$out|g ; \
+               s|/sbin/install-info|install-info|g"
+
+
+       sed -i "bin/proofgeneral" -e's/which/type -p/g'
+
+       # @image{ProofGeneral} fails, so remove it.
+       sed -i '94d' doc/PG-adapting.texi
+       sed -i '96d' doc/ProofGeneral.texi
+    '';
+
+  patches = [ ./pg.patch ];
+
+  preBuild = ''
+    make clean;
+  '';
+
+  installPhase =
+    if enableDoc
+    then
+    # Copy `texinfo.tex' in the right place so that `texi2pdf' works.
+    '' cp -v "${automake}/share/"automake-*/texinfo.tex doc
+       make install install-doc
+    ''
+    else "make install";
+
+  meta = {
+    description = "Proof General, an Emacs front-end for proof assistants";
+    longDescription = ''
+      Proof General is a generic front-end for proof assistants (also known as
+      interactive theorem provers), based on the customizable text editor Emacs.
+    '';
+    homepage = http://proofgeneral.inf.ed.ac.uk;
+    license = stdenv.lib.licenses.gpl2Plus;
+    platforms = stdenv.lib.platforms.unix;  # arbitrary choice
+  };
+})
diff --git a/pkgs/applications/graphics/ahoviewer/default.nix b/pkgs/applications/graphics/ahoviewer/default.nix
new file mode 100644
index 000000000000..79d6ff06578c
--- /dev/null
+++ b/pkgs/applications/graphics/ahoviewer/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, pkgs, fetchurl, fetchFromGitHub, pkgconfig, libconfig, 
+  gtkmm, glibmm, libxml2, libsecret, curl, unrar, libzip, 
+  librsvg, gst_all_1, autoreconfHook, makeWrapper }:
+stdenv.mkDerivation {
+  name = "ahoviewer-1.4.6";
+  src = fetchFromGitHub {
+    owner = "ahodesuka";
+    repo = "ahoviewer";
+    rev = "414cb91d66d96fab4b48593a7ef4d9ad461306aa";
+    sha256 = "081jgfmbwf2av0cn229cf4qyv6ha80ridymsgwq45124b78y2bmb";
+  };
+  enableParallelBuilding = true; 
+  nativeBuildInputs = [ autoreconfHook pkgconfig makeWrapper ];
+  buildInputs = [ glibmm libconfig gtkmm glibmm libxml2 
+                  libsecret curl unrar libzip librsvg 
+                  gst_all_1.gstreamer
+                  gst_all_1.gst-plugins-good 
+                  gst_all_1.gst-plugins-bad 
+                  gst_all_1.gst-libav
+                  gst_all_1.gst-plugins-base ];
+  postPatch = ''patchShebangs version.sh'';
+  postInstall = ''
+    wrapProgram $out/bin/ahoviewer \
+    --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" \
+    --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
+  '';
+  meta = {
+    homepage = "https://github.com/ahodesuka/ahoviewer";
+    description = "A GTK2 image viewer, manga reader, and booru browser";
+    maintainers = [ stdenv.lib.maintainers.skrzyp ];
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.lib.platforms.allBut [ "darwin" "cygwin" ];
+  };
+}
+
+
diff --git a/pkgs/applications/graphics/sane/backends/git.nix b/pkgs/applications/graphics/sane/backends/git.nix
index 0e4d7ae1b83f..84e1f783e2a3 100644
--- a/pkgs/applications/graphics/sane/backends/git.nix
+++ b/pkgs/applications/graphics/sane/backends/git.nix
@@ -1,10 +1,10 @@
 { callPackage, fetchgit, ... } @ args:
 
 callPackage ./generic.nix (args // {
-  version = "2016-02-25";
+  version = "2016-03-05";
   src = fetchgit {
-    sha256 = "842b1186d38de14221be514a58f77c23d9f83979ea45f846440cf9cbb1f26c1f";
-    rev = "c5117ed0f1b522eab10fd2248f140b2acad2a708";
+    sha256 = "dc84530d5e0233427acfd132aa08a4cf9973c936ff72a66ee08ecf836200d367";
+    rev = "23eb95582da718791103b83ea002e947caa0f5fc";
     url = "git://alioth.debian.org/git/sane/sane-backends.git";
   };
 })
diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix
index 6025fce776c7..c9b6de715d2a 100644
--- a/pkgs/applications/misc/electrum/default.nix
+++ b/pkgs/applications/misc/electrum/default.nix
@@ -1,17 +1,34 @@
-{ stdenv, fetchurl, buildPythonApplication, pythonPackages, slowaes }:
+{ stdenv, fetchurl, pythonPackages }:
 
-buildPythonApplication rec {
+let
+  jsonrpclib = pythonPackages.buildPythonPackage rec {
+    version = "0.1.7";
+    name = "jsonrpclib-${version}";
+    src = fetchurl {
+      url = "https://pypi.python.org/packages/source/j/jsonrpclib/${name}.tar.gz";
+      sha256 = "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z";
+    };
+    propagatedBuildInputs = [ pythonPackages.cjson ];
+    meta = {
+      homepage = https://pypi.python.org/pypi/jsonrpclib;
+      license = stdenv.lib.licenses.asl20;
+    };
+  };
+in
+
+pythonPackages.buildPythonApplication rec {
   name = "electrum-${version}";
-  version = "2.5.4";
+  version = "2.6.1";
 
   src = fetchurl {
     url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz";
-    sha256 = "18saa2rg07vfp9scp3i8s0wi2pqw9s8l8b44gq43zzl41120zc60";
+    sha256 = "14q6y1hwzki56nfhd3nfbxid07d5fv0pgmklvcf7yxjmpdxrg0iq";
   };
 
   propagatedBuildInputs = with pythonPackages; [
     dns
     ecdsa
+    jsonrpclib
     pbkdf2
     protobuf
     pyasn1
@@ -47,7 +64,7 @@ buildPythonApplication rec {
       of the blockchain.
     '';
     homepage = https://electrum.org;
-    license = licenses.gpl3;
+    license = licenses.mit;
     maintainers = with maintainers; [ ehmry joachifm np ];
   };
 }
diff --git a/pkgs/applications/misc/octoprint/plugins.nix b/pkgs/applications/misc/octoprint/plugins.nix
index ba31d3fb3428..1ae11be3cdd3 100644
--- a/pkgs/applications/misc/octoprint/plugins.nix
+++ b/pkgs/applications/misc/octoprint/plugins.nix
@@ -8,13 +8,13 @@ in {
 
   m3d-fio = buildPlugin rec {
     name = "M3D-Fio-${version}";
-    version = "0.29";
+    version = "0.28.2";
 
     src = fetchFromGitHub {
       owner = "donovan6000";
       repo = "M3D-Fio";
       rev = "V${version}";
-      sha256 = "1ifbq7yibq42jjvqvklnx3qzr6vk2ngsxh3xhlbdrhqrg54gky4r";
+      sha256 = "1fwy6xmbid89rn7w7v779wb34gmfzc1fkggv3im1r7a7jrzph6nx";
     };
 
     patches = [
diff --git a/pkgs/applications/misc/pgadmin/default.nix b/pkgs/applications/misc/pgadmin/default.nix
index bace31b1b1a6..55db70c1d249 100644
--- a/pkgs/applications/misc/pgadmin/default.nix
+++ b/pkgs/applications/misc/pgadmin/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "pgadmin3-${version}";
-  version = "1.20.0";
+  version = "1.22.1";
 
   src = fetchurl {
     url = "http://ftp.postgresql.org/pub/pgadmin3/release/v${version}/src/pgadmin3-${version}.tar.gz";
-    sha256 = "133bcbx9a322adldd1498h8bn2wfk45v1sbj9269jylwda1dfwq7";
+    sha256 = "0gkqpj8cg6jd6yhssrij1cbh960rg9fkjbdzcpryi6axwv0ag7ki";
   };
 
   buildInputs = [ postgresql wxGTK libxml2 libxslt openssl ];
diff --git a/pkgs/applications/networking/browsers/chromium/source/default.nix b/pkgs/applications/networking/browsers/chromium/source/default.nix
index 4e568aed5949..a566c4bb1c87 100644
--- a/pkgs/applications/networking/browsers/chromium/source/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/source/default.nix
@@ -41,10 +41,13 @@ in stdenv.mkDerivation {
     done
   '';
 
-  patches =
-    singleton ./nix_plugin_paths_46.patch ++
-    singleton ./build_fixes_46.patch ++
-    singleton ./widevine.patch;
+  patches = [
+    ./build_fixes_46.patch
+    ./widevine.patch
+    (if versionOlder version "50.0.0.0"
+     then ./nix_plugin_paths_46.patch
+     else ./nix_plugin_paths_50.patch)
+  ];
 
   patchPhase = let
     diffmod = sym: "/^${sym} /{s/^${sym} //;${transform ""};s/^/${sym} /}";
diff --git a/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_50.patch b/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_50.patch
new file mode 100644
index 000000000000..062098a85225
--- /dev/null
+++ b/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_50.patch
@@ -0,0 +1,75 @@
+diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
+index 74bf041..5f34198 100644
+--- a/chrome/common/chrome_paths.cc
++++ b/chrome/common/chrome_paths.cc
+@@ -66,21 +66,14 @@ static base::LazyInstance<base::FilePath>
+     g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER;
+ 
+ // Gets the path for internal plugins.
+-bool GetInternalPluginsDirectory(base::FilePath* result) {
+-#if defined(OS_MACOSX)
+-  // If called from Chrome, get internal plugins from a subdirectory of the
+-  // framework.
+-  if (base::mac::AmIBundled()) {
+-    *result = chrome::GetFrameworkBundlePath();
+-    DCHECK(!result->empty());
+-    *result = result->Append("Internet Plug-Ins");
+-    return true;
+-  }
+-  // In tests, just look in the module directory (below).
+-#endif
+-
+-  // The rest of the world expects plugins in the module directory.
+-  return PathService::Get(base::DIR_MODULE, result);
++bool GetInternalPluginsDirectory(base::FilePath* result,
++                                 const std::string& ident) {
++  std::string full_env = std::string("NIX_CHROMIUM_PLUGIN_PATH_") + ident;
++  const char* value = getenv(full_env.c_str());
++  if (value == NULL)
++      return PathService::Get(base::DIR_MODULE, result);
++  else
++      *result = base::FilePath(value);
+ }
+ 
+ #if defined(OS_WIN)
+@@ -253,11 +246,11 @@ bool PathProvider(int key, base::FilePath* result) {
+       create_dir = true;
+       break;
+     case chrome::DIR_INTERNAL_PLUGINS:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "ALL"))
+         return false;
+       break;
+     case chrome::DIR_PEPPER_FLASH_PLUGIN:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "PEPPERFLASH"))
+         return false;
+       cur = cur.Append(kPepperFlashBaseDirectory);
+       break;
+@@ -314,7 +307,7 @@ bool PathProvider(int key, base::FilePath* result) {
+     // We currently need a path here to look up whether the plugin is disabled
+     // and what its permissions are.
+     case chrome::FILE_NACL_PLUGIN:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "NACL"))
+         return false;
+       cur = cur.Append(kInternalNaClPluginFileName);
+       break;
+@@ -349,7 +342,7 @@ bool PathProvider(int key, base::FilePath* result) {
+         cur = cur.DirName();
+       }
+ #else
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "PNACL"))
+         return false;
+ #endif
+       cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
+@@ -366,7 +359,7 @@ bool PathProvider(int key, base::FilePath* result) {
+     // In the component case, this is the source adapter. Otherwise, it is the
+     // actual Pepper module that gets loaded.
+     case chrome::FILE_WIDEVINE_CDM_ADAPTER:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "WIDEVINE"))
+         return false;
+       cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
+       break;
diff --git a/pkgs/applications/networking/browsers/chromium/source/sources.nix b/pkgs/applications/networking/browsers/chromium/source/sources.nix
index ffb9ff110686..ffec5c8b8073 100644
--- a/pkgs/applications/networking/browsers/chromium/source/sources.nix
+++ b/pkgs/applications/networking/browsers/chromium/source/sources.nix
@@ -1,19 +1,18 @@
 # This file is autogenerated from update.sh in the parent directory.
 {
   beta = {
-    sha256 = "07i4vqswkijnl7wi6r1a0n1jq54ackm01yf8h3hwcik8q10i1aq5";
-    sha256bin64 = "16pwimg672qaqb89zdvsr8dr7bz50mz7zf6cl0cf45kz7sn8wwlh";
-    version = "49.0.2623.63";
+    sha256 = "1xc2npbc829nxria1j37kxyy95jkalkkphxgv24if0ibn62lrzd4";
+    sha256bin64 = "1arm15g3vmm3zlvcql3qylw1fhrn5ddzl2v8mkpb3a251m425dsi";
+    version = "49.0.2623.75";
   };
   dev = {
-    sha256 = "1xc66zsjd5snydf60di2k2vzwwcqs1p16yn4jbpj2khm9cmxmkmf";
-    sha256bin64 = "06v7r76pbc979f7ahmln0hmxzd8ipirh4128i0ygidj71xmg51mm";
-    version = "50.0.2657.0";
+    sha256 = "04j0nyz20gi7vf1javbw06wrqpkfw6vg024i3wkgx42hzd6hjgw4";
+    sha256bin64 = "12ff4q615rwakgpr9v84p55maasqb4vg61s89vgxrlsgqrmkahg4";
+    version = "50.0.2661.11";
   };
   stable = {
-    sha256 = "03sdm09cnwq8a056rfljql7mz0s17fngfnm5q3p5xwakr2sbj7ka";
-    sha256bin32 = "157m88nafb8svpkv11rzpcfvak6486wx43rmbssg52x2k0vas0bl";
-    sha256bin64 = "036pcma8qczja803h9r1nlm0ypm4zblmy6q7pkwlgmn3r4r3n7i0";
-    version = "48.0.2564.116";
+    sha256 = "1xc2npbc829nxria1j37kxyy95jkalkkphxgv24if0ibn62lrzd4";
+    sha256bin64 = "01qi5jmlmdpy6icc4y51bn5a063mxrnkncg3pbmbl4r02vqca5jh";
+    version = "49.0.2623.75";
   };
 }
diff --git a/pkgs/applications/networking/cluster/marathon/default.nix b/pkgs/applications/networking/cluster/marathon/default.nix
index ac666030897b..11c275c9f490 100644
--- a/pkgs/applications/networking/cluster/marathon/default.nix
+++ b/pkgs/applications/networking/cluster/marathon/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "marathon-${version}";
-  version = "0.15.1";
+  version = "0.15.3";
 
   src = fetchurl {
     url = "https://downloads.mesosphere.io/marathon/v${version}/marathon-${version}.tgz";
-    sha256 = "1ch3nvcwj7pzjjqw4k07gdf7nmdbfkks5j07wl3518bagjqrajj2";
+    sha256 = "1br4k596sjp4cf5l2nyaqhlsfdr443n08fvdyf4kilhr803x2rjq";
   };
 
   buildInputs = [ makeWrapper jdk mesos ];
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
     homepage = https://mesosphere.github.io/marathon;
     description = "Cluster-wide init and control system for services in cgroups or Docker containers";
     license = licenses.asl20;
-    maintainers = with maintainers; [ rushmorem kamilchm ];
+    maintainers = with maintainers; [ rushmorem kamilchm kevincox ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/networking/cluster/mesos/default.nix b/pkgs/applications/networking/cluster/mesos/default.nix
index 25bd659d63af..86b82db60e14 100644
--- a/pkgs/applications/networking/cluster/mesos/default.nix
+++ b/pkgs/applications/networking/cluster/mesos/default.nix
@@ -1,7 +1,8 @@
 { stdenv, lib, makeWrapper, fetchurl, curl, sasl, openssh, autoconf
 , automake115x, libtool, unzip, gnutar, jdk, maven, python, wrapPython
-, setuptools, boto, pythonProtobuf, apr, subversion, gzip
+, setuptools, boto, pythonProtobuf, apr, subversion, gzip, systemd
 , leveldb, glog, perf, utillinux, libnl, iproute, openssl, libevent
+, bash
 }:
 
 let
@@ -9,14 +10,15 @@ let
   soext = if stdenv.system == "x86_64-darwin" then "dylib" else "so";
 
 in stdenv.mkDerivation rec {
-  version = "0.26.0";
+  version = "0.27.1";
   name = "mesos-${version}";
 
+  enableParallelBuilding = true;
   dontDisableStatic = true;
 
   src = fetchurl {
     url = "mirror://apache/mesos/${version}/${name}.tar.gz";
-    sha256 = "0csvaql9gky15w23gmiw6cvlfnrlhfxvdqd2pv3j3grr44ph0ab5";
+    sha256 = "147iq7vwi09kqblx1h8r6lkrg9g50i257qk1cph1zr5j3rncz7l8";
   };
 
   patches = [
@@ -70,6 +72,15 @@ in stdenv.mkDerivation rec {
       --replace '"ip ' '"${iproute}/bin/ip '   \
       --replace '"mount ' '"${utillinux}/bin/mount ' \
       --replace '/bin/sh' "${stdenv.shell}"
+    
+    substituteInPlace src/launcher/executor.cpp \
+      --replace '"sh"' '"${bash}/bin/bash"'
+    
+    substituteInPlace src/slave/containerizer/mesos/launch.cpp \
+      --replace '"sh"' '"${bash}/bin/bash"'
+    
+    substituteInPlace src/linux/systemd.cpp \
+      --replace 'os::realpath("/sbin/init")' '"${systemd}/lib/systemd/systemd"'
   '';
 
   configureFlags = [
@@ -114,7 +125,7 @@ in stdenv.mkDerivation rec {
     rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*
     popd
 
-    # optional python dependency for mesos cli 
+    # optional python dependency for mesos cli
     pushd src/python/cli
     ${python}/bin/${python.executable} setup.py install \
       --install-lib=$out/lib/${python.libPrefix}/site-packages \
@@ -150,7 +161,7 @@ in stdenv.mkDerivation rec {
     homepage    = "http://mesos.apache.org";
     license     = licenses.asl20;
     description = "A cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks";
-    maintainers = with maintainers; [ cstrahan offline rushmorem ];
+    maintainers = with maintainers; [ cstrahan kevincox offline rushmorem ];
     platforms   = platforms.linux;
   };
 }
diff --git a/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix
index 5e8f266930ff..7e9e41ea0bfc 100644
--- a/pkgs/applications/networking/instant-messengers/pidgin/default.nix
+++ b/pkgs/applications/networking/instant-messengers/pidgin/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, pkgconfig, gtk, gtkspell, aspell
-, gstreamer, gst_plugins_base, startupnotification, gettext
+{ stdenv, fetchurl, makeWrapper, pkgconfig, gtk, gtkspell, aspell
+, gstreamer, gst_plugins_base, gst_plugins_good, startupnotification, gettext
 , perl, perlXMLParser, libxml2, nss, nspr, farsight2
 , libXScrnSaver, ncurses, avahi, dbus, dbus_glib, intltool, libidn
 , lib, python, libICE, libXext, libSM
@@ -22,9 +22,11 @@ stdenv.mkDerivation rec {
 
   inherit nss ncurses;
 
+  nativeBuildInputs = [ makeWrapper ];
+
   buildInputs = [
     gtkspell aspell
-    gstreamer gst_plugins_base startupnotification
+    gstreamer gst_plugins_base gst_plugins_good startupnotification
     libxml2 nss nspr farsight2
     libXScrnSaver ncurses python
     avahi dbus dbus_glib intltool libidn
@@ -54,6 +56,11 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  postInstall = ''
+    wrapProgram $out/bin/pidgin \
+      --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
+  '';
+
   meta = with stdenv.lib; {
     description = "Multi-protocol instant messaging client";
     homepage = http://pidgin.im;
diff --git a/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix
index fa03b8d21adc..ec188e982843 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchgit
-, qtbase, qtmultimedia, qtquick1, qtquickcontrols, qtgraphicaleffects
+, qtbase, qtmultimedia, qtquick1, qtquickcontrols
+, qtimageformats, qtgraphicaleffects
 , telegram-qml, libqtelegram-aseman-edition
 , gst_plugins_base, gst_plugins_good, gst_plugins_bad, gst_plugins_ugly
 , makeQtWrapper }:
@@ -14,8 +15,9 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs =
-  [ qtbase qtmultimedia qtquick1 qtquickcontrols qtgraphicaleffects
-    telegram-qml libqtelegram-aseman-edition
+  [ qtbase qtmultimedia qtquick1 qtquickcontrols
+    qtimageformats qtgraphicaleffects
+    telegram-qml libqtelegram-aseman-edition 
     gst_plugins_base gst_plugins_good gst_plugins_bad gst_plugins_ugly ];
   nativeBuildInputs = [ makeQtWrapper ];
   enableParallelBuild = true;
@@ -33,5 +35,3 @@ stdenv.mkDerivation rec {
   };
 }
 #TODO: appindicator, for system tray plugin (by @profpatsch)
-
-
diff --git a/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix b/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix
index 115424ac69c8..1b2ad45b56a9 100644
--- a/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   name = "darcs-to-git-${version}";
-  version = "0.2git";
+  version = "2015-06-04";
 
   src = fetchgit {
     url = "git://github.com/purcell/darcs-to-git.git";
-    rev = "58a55936899c7e391df5ae1326c307fbd4617a25";
-    sha256 = "366aa691920991e21cfeebd4cbd53a6c42d80e2bc46ff398af482d1d15bac4c3";
+    rev = "e5fee32495908fe0f7d700644c7b37347b7a0a5b";
+    sha256 = "0ycp7pzv9g9pgj25asiby3p3m5vg5czqf4rpy2mavjqhiblxlcv5";
   };
 
   patchPhase = let
diff --git a/pkgs/applications/video/mkvtoolnix/default.nix b/pkgs/applications/video/mkvtoolnix/default.nix
index cda861497e12..54bd2b5f9797 100644
--- a/pkgs/applications/video/mkvtoolnix/default.nix
+++ b/pkgs/applications/video/mkvtoolnix/default.nix
@@ -1,76 +1,54 @@
-{ stdenv, fetchurl, gettext, pkgconfig, ruby
-, boost, expat, file, flac, libebml, libmatroska, libogg, libvorbis, xdg_utils, zlib
-# pugixml (not packaged)
-, buildConfig ? "all"
-, withGUI ? false, qt5 ? null # Disabled for now until upstream issues are resolved
-, legacyGUI ? true, wxGTK ? null
-# For now both qt5 and wxwidgets gui's are enabled, if wxwidgets is disabled the
-# build system doesn't install desktop entries, icons, etc...
-, libiconv
+{ stdenv, fetchgit, pkgconfig, autoconf, automake
+, ruby, file, xdg_utils, gettext, expat, qt5, boost
+, libebml, zlib, libmatroska, libogg, libvorbis, flac
+, withGUI ? true
 }:
 
-let
-  inherit (stdenv.lib) enableFeature optional;
-in
-
 assert withGUI -> qt5 != null;
-assert legacyGUI -> wxGTK != null;
+
+with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "mkvtoolnix-${version}";
-  version = "8.4.0";
+  version = "8.9.0";
 
-  src = fetchurl {
-    url = "http://www.bunkus.org/videotools/mkvtoolnix/sources/${name}.tar.xz";
-    sha256 = "0y7qm8q9vpvjiw7b69k9140pw9nhvs6ggmk56yxnmcd02inm19gn";
+  src = fetchgit {
+    url = "https://github.com/mbunkus/mkvtoolnix.git";
+    rev = "54e6b52b3dde07f89da4542997ef059e18802128";
+    sha256 = "1hm9f9q60c0axmmlsalazsiil8gk3v8q6cl5qxsfa95m51i39878";
   };
 
-  patchPhase = ''
-    patchShebangs ./rake.d/
-    patchShebangs ./Rakefile
-    # Force ruby encoding to use UTF-8 or else when enabling qt5 the Rakefile may
-    # fail with `invalid byte sequence in US-ASCII' due to UTF-8 characters
-    # This workaround replaces an arbitrary comment in the drake file
-    sed -e 's,#--,Encoding.default_external = Encoding::UTF_8,' -i ./drake
-  '';
-
-  configureFlags = [
-    "--with-boost-libdir=${boost.lib}/lib"
-    "--without-curl"
-  ] ++ (
-    if (withGUI || legacyGUI) then [
-      "--with-mkvtoolnix-gui"
-      "--enable-gui"
-      (enableFeature withGUI "qt")
-      (enableFeature legacyGUI "wxwidgets")
-    ] else [
-      "--disable-gui"
-    ]
-  );
-
-  nativeBuildInputs = [ gettext pkgconfig ruby ];
+  nativeBuildInputs = [ gettext ruby ];
 
   buildInputs = [
-    boost expat file flac libebml libmatroska libogg libvorbis xdg_utils zlib
-  ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ]
-    ++ optional withGUI qt5
-    ++ optional legacyGUI wxGTK;
-
-  enableParallelBuilding = true;
+    pkgconfig autoconf automake expat
+    file xdg_utils boost libebml zlib
+    libmatroska libogg libvorbis flac
+    (optional withGUI qt5.qtbase)
+  ];
 
-  buildPhase = ''
-    ./drake
-  '';
+  preConfigure = "./autogen.sh";
+  buildPhase   = "./drake -j $NIX_BUILD_CORES";
+  installPhase = "./drake install -j $NIX_BUILD_CORES";
 
-  installPhase = ''
-    ./drake install
-  '';
+  configureFlags = [
+    "--enable-magic"
+    "--enable-optimization"
+    "--with-boost-libdir=${boost.lib}/lib"
+    "--disable-debug"
+    "--disable-profiling"
+    "--disable-precompiled-headers"
+    "--disable-static-qt"
+    "--without-curl"
+    "--with-gettext"
+    (enableFeature withGUI "qt")
+  ];
 
   meta = with stdenv.lib; {
     description = "Cross-platform tools for Matroska";
-    homepage = http://www.bunkus.org/videotools/mkvtoolnix/;
-    license = licenses.gpl2;
-    maintainers = with maintainers; [ codyopel fuuzetsu ];
-    platforms = platforms.all;
+    homepage    = http://www.bunkus.org/videotools/mkvtoolnix/;
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ codyopel fuuzetsu rnhmjoj ];
+    platforms   = platforms.linux;
   };
 }