about summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r--pkgs/applications/misc/acbuild/default.nix2
-rw-r--r--pkgs/applications/misc/alacritty/default.nix1
-rw-r--r--pkgs/applications/misc/bashSnippets/default.nix2
-rw-r--r--pkgs/applications/misc/bitcoinarmory/default.nix1
-rw-r--r--pkgs/applications/misc/calibre/default.nix8
-rw-r--r--pkgs/applications/misc/cataract/default.nix11
-rw-r--r--pkgs/applications/misc/cataract/unstable.nix11
-rw-r--r--pkgs/applications/misc/cherrytree/default.nix6
-rw-r--r--pkgs/applications/misc/chirp/default.nix6
-rw-r--r--pkgs/applications/misc/clipmenu/default.nix33
-rw-r--r--pkgs/applications/misc/cpp-ethereum/default.nix4
-rw-r--r--pkgs/applications/misc/cura/default.nix8
-rw-r--r--pkgs/applications/misc/curaengine/default.nix8
-rw-r--r--pkgs/applications/misc/dbeaver/default.nix4
-rw-r--r--pkgs/applications/misc/dbvisualizer/default.nix2
-rw-r--r--pkgs/applications/misc/dfilemanager/default.nix2
-rw-r--r--pkgs/applications/misc/diffpdf/default.nix6
-rw-r--r--pkgs/applications/misc/digitalbitbox/default.nix6
-rw-r--r--pkgs/applications/misc/electron-cash/default.nix2
-rw-r--r--pkgs/applications/misc/electrum/default.nix2
-rw-r--r--pkgs/applications/misc/ephemeralpg/default.nix4
-rw-r--r--pkgs/applications/misc/evtest/default.nix2
-rw-r--r--pkgs/applications/misc/far2l/add-nix-syntax-highlighting.patch158
-rw-r--r--pkgs/applications/misc/far2l/default.nix20
-rw-r--r--pkgs/applications/misc/finalterm/default.nix2
-rw-r--r--pkgs/applications/misc/gcal/default.nix2
-rw-r--r--pkgs/applications/misc/glava/default.nix3
-rw-r--r--pkgs/applications/misc/golden-cheetah/default.nix2
-rw-r--r--pkgs/applications/misc/googleearth/default.nix2
-rw-r--r--pkgs/applications/misc/gpsprune/default.nix2
-rw-r--r--pkgs/applications/misc/gpxsee/default.nix2
-rw-r--r--pkgs/applications/misc/gramps/default.nix2
-rw-r--r--pkgs/applications/misc/guake/default.nix4
-rw-r--r--pkgs/applications/misc/gummi/default.nix2
-rw-r--r--pkgs/applications/misc/gutenberg/default.nix8
-rw-r--r--pkgs/applications/misc/gxneur/default.nix21
-rw-r--r--pkgs/applications/misc/hamster-time-tracker/default.nix2
-rw-r--r--pkgs/applications/misc/haxor-news/default.nix2
-rw-r--r--pkgs/applications/misc/houdini/default.nix2
-rw-r--r--pkgs/applications/misc/hyper/default.nix4
-rw-r--r--pkgs/applications/misc/icesl/default.nix2
-rw-r--r--pkgs/applications/misc/ipmiview/default.nix6
-rw-r--r--pkgs/applications/misc/josm/default.nix6
-rw-r--r--pkgs/applications/misc/khard/default.nix2
-rw-r--r--pkgs/applications/misc/kitty/default.nix4
-rw-r--r--pkgs/applications/misc/kiwix/default.nix2
-rw-r--r--pkgs/applications/misc/kupfer/default.nix2
-rw-r--r--pkgs/applications/misc/llpp/default.nix5
-rw-r--r--pkgs/applications/misc/lxterminal/default.nix4
-rw-r--r--pkgs/applications/misc/madonctl/default.nix2
-rw-r--r--pkgs/applications/misc/masterpdfeditor/default.nix2
-rw-r--r--pkgs/applications/misc/memo/default.nix4
-rw-r--r--pkgs/applications/misc/moonlight-embedded/default.nix4
-rw-r--r--pkgs/applications/misc/mop/default.nix2
-rw-r--r--pkgs/applications/misc/mucommander/default.nix8
-rw-r--r--pkgs/applications/misc/nixnote2/default.nix7
-rw-r--r--pkgs/applications/misc/octoprint/default.nix2
-rw-r--r--pkgs/applications/misc/octoprint/plugins.nix2
-rw-r--r--pkgs/applications/misc/onboard/default.nix4
-rw-r--r--pkgs/applications/misc/oneko/default.nix7
-rw-r--r--pkgs/applications/misc/orca/default.nix4
-rw-r--r--pkgs/applications/misc/perkeep/default.nix2
-rw-r--r--pkgs/applications/misc/pgmanage/default.nix2
-rw-r--r--pkgs/applications/misc/polybar/default.nix2
-rw-r--r--pkgs/applications/misc/pt/default.nix2
-rw-r--r--pkgs/applications/misc/qpdfview/default.nix4
-rw-r--r--pkgs/applications/misc/redis-desktop-manager/default.nix2
-rw-r--r--pkgs/applications/misc/redshift/default.nix2
-rw-r--r--pkgs/applications/misc/rofi/default.nix2
-rw-r--r--pkgs/applications/misc/rofi/wrapper.nix2
-rw-r--r--pkgs/applications/misc/roxterm/default.nix12
-rw-r--r--pkgs/applications/misc/rtv/default.nix2
-rw-r--r--pkgs/applications/misc/rxvt_unicode/wrapper.nix2
-rw-r--r--pkgs/applications/misc/simplenote/default.nix2
-rw-r--r--pkgs/applications/misc/slic3r/prusa3d.nix2
-rw-r--r--pkgs/applications/misc/spacefm/default.nix2
-rw-r--r--pkgs/applications/misc/sweethome3d/editors.nix4
-rw-r--r--pkgs/applications/misc/synergy/default.nix46
-rw-r--r--pkgs/applications/misc/synergy/respect_macos_arch.patch61
-rw-r--r--pkgs/applications/misc/synergy/update_gtest_gmock.patch158
-rw-r--r--pkgs/applications/misc/tasksh/default.nix2
-rw-r--r--pkgs/applications/misc/terminus/default.nix4
-rw-r--r--pkgs/applications/misc/termite/add_errno_header.patch24
-rw-r--r--pkgs/applications/misc/termite/default.nix15
-rw-r--r--pkgs/applications/misc/termite/remove_ldflags_macos.patch25
-rw-r--r--pkgs/applications/misc/tilix/default.nix2
-rw-r--r--pkgs/applications/misc/timewarrior/default.nix2
-rw-r--r--pkgs/applications/misc/tqsl/default.nix7
-rw-r--r--pkgs/applications/misc/truecrypt/default.nix4
-rw-r--r--pkgs/applications/misc/twmn/default.nix2
-rw-r--r--pkgs/applications/misc/veracrypt/default.nix4
-rw-r--r--pkgs/applications/misc/wego/default.nix2
-rw-r--r--pkgs/applications/misc/welle-io/default.nix2
-rw-r--r--pkgs/applications/misc/wikicurses/default.nix23
-rw-r--r--pkgs/applications/misc/wsjtx/default.nix6
-rw-r--r--pkgs/applications/misc/xlog/default.nix29
-rw-r--r--pkgs/applications/misc/xmr-stak/default.nix6
-rw-r--r--pkgs/applications/misc/xmrig/default.nix4
-rw-r--r--pkgs/applications/misc/xmrig/proxy.nix4
-rw-r--r--pkgs/applications/misc/xneur/0.8.nix29
-rw-r--r--pkgs/applications/misc/xneur/default.nix53
-rw-r--r--pkgs/applications/misc/xneur/src-for-default.nix9
-rw-r--r--pkgs/applications/misc/xneur/src-info-for-default.nix5
-rw-r--r--pkgs/applications/misc/xscope/default.nix24
-rw-r--r--pkgs/applications/misc/yarssr/default.nix2
-rw-r--r--pkgs/applications/misc/yubioath-desktop/default.nix4
-rw-r--r--pkgs/applications/misc/zathura/core/default.nix2
-rw-r--r--pkgs/applications/misc/zathura/pdf-mupdf/default.nix3
-rw-r--r--pkgs/applications/misc/zscroll/default.nix2
109 files changed, 596 insertions, 467 deletions
diff --git a/pkgs/applications/misc/acbuild/default.nix b/pkgs/applications/misc/acbuild/default.nix
index 319764ae81a5..c1b8a7eb8663 100644
--- a/pkgs/applications/misc/acbuild/default.nix
+++ b/pkgs/applications/misc/acbuild/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, go, fetchFromGitHub }:
+{ stdenv, go, fetchFromGitHub }:
 
 stdenv.mkDerivation rec {
   name = "acbuild-${version}";
diff --git a/pkgs/applications/misc/alacritty/default.nix b/pkgs/applications/misc/alacritty/default.nix
index 698485fb086f..09da61f34641 100644
--- a/pkgs/applications/misc/alacritty/default.nix
+++ b/pkgs/applications/misc/alacritty/default.nix
@@ -9,7 +9,6 @@
   freetype,
   fontconfig,
   libX11,
-  gperf,
   libXcursor,
   libXxf86vm,
   libXi,
diff --git a/pkgs/applications/misc/bashSnippets/default.nix b/pkgs/applications/misc/bashSnippets/default.nix
index acd5ae7dd73d..fc5fa4d03006 100644
--- a/pkgs/applications/misc/bashSnippets/default.nix
+++ b/pkgs/applications/misc/bashSnippets/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchFromGitHub, makeWrapper
-, curl, netcat, python, bind, iproute, bc, gitMinimal }:
+, curl, python, bind, iproute, bc, gitMinimal }:
 let
   version = "1.17.3";
   deps = lib.makeBinPath [
diff --git a/pkgs/applications/misc/bitcoinarmory/default.nix b/pkgs/applications/misc/bitcoinarmory/default.nix
index a9d32d4b2522..3245a56e9de3 100644
--- a/pkgs/applications/misc/bitcoinarmory/default.nix
+++ b/pkgs/applications/misc/bitcoinarmory/default.nix
@@ -6,7 +6,6 @@
 let
 
   version = "0.96.1";
-  sitePackages = pythonPackages.python.sitePackages;
   inherit (pythonPackages) buildPythonApplication pyqt4 psutil twisted;
 
 in buildPythonApplication {
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index 1aabbb587eb5..0fa859ac84bb 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, fetchurl, fetchpatch, poppler_utils, pkgconfig, libpng
+{ stdenv, fetchurl, poppler_utils, pkgconfig, libpng
 , imagemagick, libjpeg, fontconfig, podofo, qtbase, qmake, icu, sqlite
-, makeWrapper, unrarSupport ? false, chmlib, python2Packages, xz, libusb1, libmtp
+, makeWrapper, unrarSupport ? false, chmlib, python2Packages, libusb1, libmtp
 , xdg_utils, makeDesktopItem, wrapGAppsHook
 }:
 
 stdenv.mkDerivation rec {
-  version = "3.27.1";
+  version = "3.28.0";
   name = "calibre-${version}";
 
   src = fetchurl {
     url = "https://download.calibre-ebook.com/${version}/${name}.tar.xz";
-    sha256 = "0hmdlnwrfql2b675xmjf50hnnrrkv5jbky0ssdpyfjfa5vxya2bh";
+    sha256 = "0b3vv03c6m6972sk8zj3zc5sq6b9837irnfgjlqhv9z5i75m0414";
   };
 
   patches = [
diff --git a/pkgs/applications/misc/cataract/default.nix b/pkgs/applications/misc/cataract/default.nix
index 83292a76c5dd..3a9f20289227 100644
--- a/pkgs/applications/misc/cataract/default.nix
+++ b/pkgs/applications/misc/cataract/default.nix
@@ -1,13 +1,4 @@
-{ callPackage
-, stdenv
-, fetchgit
-, autoconf
-, automake
-, glib
-, pkgconfig
-, libxml2
-, exiv2
-, imagemagick }:
+{ callPackage }:
 
 callPackage ./build.nix {
   version = "1.1.0";
diff --git a/pkgs/applications/misc/cataract/unstable.nix b/pkgs/applications/misc/cataract/unstable.nix
index 8d8b063e48b3..397aed355a95 100644
--- a/pkgs/applications/misc/cataract/unstable.nix
+++ b/pkgs/applications/misc/cataract/unstable.nix
@@ -1,13 +1,4 @@
-{ callPackage
-, stdenv
-, fetchgit
-, autoconf
-, automake
-, glib
-, pkgconfig
-, libxml2
-, exiv2
-, imagemagick }:
+{ callPackage }:
 
 callPackage ./build.nix {
   version = "unstable-2016-10-18";
diff --git a/pkgs/applications/misc/cherrytree/default.nix b/pkgs/applications/misc/cherrytree/default.nix
index 0b2bee9122e0..6bd1cef7c1b2 100644
--- a/pkgs/applications/misc/cherrytree/default.nix
+++ b/pkgs/applications/misc/cherrytree/default.nix
@@ -1,14 +1,14 @@
-{ stdenv, fetchurl, pythonPackages, gettext, sqlite }:
+{ stdenv, fetchurl, pythonPackages, gettext }:
 
 with stdenv.lib;
 stdenv.mkDerivation rec {
 
   name = "cherrytree-${version}";
-  version = "0.38.4";
+  version = "0.38.5";
 
   src = fetchurl {
     url = "https://www.giuspen.com/software/${name}.tar.xz";
-    sha256 = "1zazyxkrli77wahn4c1z24qyz5bwlayl335f2kdxb44dicrx58g2";
+    sha256 = "1ja3b14vm3yd26pf82p2qlld0flqkqvgdg2g33r5dav6wfq3pz6y";
   };
 
   buildInputs = with pythonPackages;
diff --git a/pkgs/applications/misc/chirp/default.nix b/pkgs/applications/misc/chirp/default.nix
index 148031273bed..8c57ebead6ae 100644
--- a/pkgs/applications/misc/chirp/default.nix
+++ b/pkgs/applications/misc/chirp/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, libxml2Python, libxslt, makeWrapper
-, python, pyserial, pygtk }:
+, pyserial, pygtk }:
 
 stdenv.mkDerivation rec {
   name = "chirp-daily-${version}";
-  version = "20180623";
+  version = "20180707";
 
   src = fetchurl {
     url = "https://trac.chirp.danplanet.com/chirp_daily/daily-${version}/${name}.tar.gz";
-    sha256 = "0s7b5w98rblqfcpvaxkkri0sfqxmqjwgdf8syzva50vm7swrg946";
+    sha256 = "09siq74k0ss65ssck7i7h515dxp7fhdz5klc3y0yp9wajn706ic3";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/applications/misc/clipmenu/default.nix b/pkgs/applications/misc/clipmenu/default.nix
new file mode 100644
index 000000000000..679724ed0622
--- /dev/null
+++ b/pkgs/applications/misc/clipmenu/default.nix
@@ -0,0 +1,33 @@
+{ clipnotify, makeWrapper, xsel, dmenu2, utillinux, gawk, stdenv, fetchFromGitHub, lib }:
+let
+  runtimePath = lib.makeBinPath [ clipnotify xsel dmenu2 utillinux gawk ];
+in
+stdenv.mkDerivation rec {
+  name = "clipmenu-${version}";
+  version = "5.4.0";
+
+  src = fetchFromGitHub {
+    owner  = "cdown";
+    repo   = "clipmenu";
+    rev    = version;
+    sha256 = "1qbpca0wny6i222vbikfl2znn3fynhbl4100qs8v4wn27ra5p0mi";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp clipdel clipmenu clipmenud $out/bin
+
+    for bin in $out/bin/*; do
+      wrapProgram "$bin" --prefix PATH : "${runtimePath}"
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Clipboard management using dmenu";
+    inherit (src.meta) homepage;
+    maintainers = with maintainers; [ jb55 ];
+    license = licenses.publicDomain;
+  };
+}
diff --git a/pkgs/applications/misc/cpp-ethereum/default.nix b/pkgs/applications/misc/cpp-ethereum/default.nix
index 33b16e3242c6..4d9975192461 100644
--- a/pkgs/applications/misc/cpp-ethereum/default.nix
+++ b/pkgs/applications/misc/cpp-ethereum/default.nix
@@ -2,7 +2,7 @@
 , fetchFromGitHub
 , cmake
 , jsoncpp
-, libjson_rpc_cpp
+, libjson-rpc-cpp
 , curl
 , boost
 , leveldb
@@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
   buildInputs = [
     cmake
     jsoncpp
-    libjson_rpc_cpp
+    libjson-rpc-cpp
     curl
     boost
     leveldb
diff --git a/pkgs/applications/misc/cura/default.nix b/pkgs/applications/misc/cura/default.nix
index 3b00bba709a0..f97b83a85075 100644
--- a/pkgs/applications/misc/cura/default.nix
+++ b/pkgs/applications/misc/cura/default.nix
@@ -2,20 +2,20 @@
 
 mkDerivation rec {
   name = "cura-${version}";
-  version = "3.3.1";
+  version = "3.4.1";
 
   src = fetchFromGitHub {
     owner = "Ultimaker";
     repo = "Cura";
     rev = version;
-    sha256 = "0a2xxiw1h5cq4nd4pdkq757hap85p2i29msxs57kbfdd78izrjlx";
+    sha256 = "03s9nf1aybbnbf1rzqja41m9g6991bbvrcly1lcrfqksianfn06w";
   };
 
   materials = fetchFromGitHub {
     owner = "Ultimaker";
     repo = "fdm_materials";
-    rev = "3.3.0";
-    sha256 = "0vf7s4m14aqhdg4m2yjj87kjxi2gpa46mgx86p0a91jwvkxa8a1q";
+    rev = "3.4.1";
+    sha256 = "1pw30clxqd7qgnidsyx6grizvlgfn8rhj6rd5ppkvv3rdjh0gj28";
   };
 
   buildInputs = [ qtbase qtquickcontrols2 ];
diff --git a/pkgs/applications/misc/curaengine/default.nix b/pkgs/applications/misc/curaengine/default.nix
index ac4c68f9b536..ba9a98c616b3 100644
--- a/pkgs/applications/misc/curaengine/default.nix
+++ b/pkgs/applications/misc/curaengine/default.nix
@@ -1,18 +1,18 @@
-{ stdenv, fetchFromGitHub, cmake, libarcus }:
+{ stdenv, fetchFromGitHub, cmake, libarcus, stb }:
 
 stdenv.mkDerivation rec {
   name = "curaengine-${version}";
-  version = "3.3.0";
+  version = "3.4.1";
 
   src = fetchFromGitHub {
     owner = "Ultimaker";
     repo = "CuraEngine";
     rev = version;
-    sha256 = "1dj80lk58qb54apdv7n9cmcck4smb00lidgqld21xnndnnqqb4lw";
+    sha256 = "083jmhzmb60rmqw0fhbnlxyblzkmpn3k6zc75xq90x5g3h60wib4";
   };
 
   nativeBuildInputs = [ cmake ];
-  buildInputs = [ libarcus ];
+  buildInputs = [ libarcus stb ];
 
   cmakeFlags = [ "-DCURA_ENGINE_VERSION=${version}" ];
 
diff --git a/pkgs/applications/misc/dbeaver/default.nix b/pkgs/applications/misc/dbeaver/default.nix
index ed08356fdc5a..d23b789780b3 100644
--- a/pkgs/applications/misc/dbeaver/default.nix
+++ b/pkgs/applications/misc/dbeaver/default.nix
@@ -7,7 +7,7 @@
 
 stdenv.mkDerivation rec {
   name = "dbeaver-ce-${version}";
-  version = "5.1.2";
+  version = "5.1.3";
 
   desktopItem = makeDesktopItem {
     name = "dbeaver";
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
-    sha256 = "1p1klrasasc440qzxsn96lcgfib5qwhl508gvwrbslvmija6m6b2";
+    sha256 = "1znkr28pfpclq2gl2prllb3hwq9v9rj5xl7xarq0hsggzfg9n071";
   };
 
   installPhase = ''
diff --git a/pkgs/applications/misc/dbvisualizer/default.nix b/pkgs/applications/misc/dbvisualizer/default.nix
index 7aa19ffb3017..fbeb965df380 100644
--- a/pkgs/applications/misc/dbvisualizer/default.nix
+++ b/pkgs/applications/misc/dbvisualizer/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, jre, coreutils, makeWrapper }:
+{ stdenv, fetchurl, jre, makeWrapper }:
 
 stdenv.mkDerivation {
   name = "dbvisualizer-9.5.7";
diff --git a/pkgs/applications/misc/dfilemanager/default.nix b/pkgs/applications/misc/dfilemanager/default.nix
index 53344595f783..6cbdc8ece0ca 100644
--- a/pkgs/applications/misc/dfilemanager/default.nix
+++ b/pkgs/applications/misc/dfilemanager/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, cmake, file, qtbase, qttools, qtx11extras, solid }:
+{ stdenv, fetchgit, cmake, file, qtbase, qttools, solid }:
 
 let
   version = "git-2016-01-10";
diff --git a/pkgs/applications/misc/diffpdf/default.nix b/pkgs/applications/misc/diffpdf/default.nix
index 144e1fa566ca..daea20835c8a 100644
--- a/pkgs/applications/misc/diffpdf/default.nix
+++ b/pkgs/applications/misc/diffpdf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, qmake, qttools, qtbase, poppler_qt5 }:
+{ stdenv, fetchurl, fetchpatch, qmake, qttools, qtbase, poppler }:
 
 stdenv.mkDerivation rec {
   version = "2.1.3";
@@ -18,10 +18,10 @@ stdenv.mkDerivation rec {
   ];
 
   nativeBuildInputs = [ qmake qttools ];
-  buildInputs = [ qtbase poppler_qt5 ];
+  buildInputs = [ qtbase poppler ];
 
   preConfigure = ''
-    substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT5@@ ${poppler_qt5.dev}
+    substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT5@@ ${poppler.dev}
     lrelease diffpdf.pro
   '';
 
diff --git a/pkgs/applications/misc/digitalbitbox/default.nix b/pkgs/applications/misc/digitalbitbox/default.nix
index 09b6db3abf9a..3e6a6ab53f77 100644
--- a/pkgs/applications/misc/digitalbitbox/default.nix
+++ b/pkgs/applications/misc/digitalbitbox/default.nix
@@ -7,7 +7,7 @@
 , libevent
 , libtool
 , libqrencode
-, libudev
+, udev
 , libusb
 , makeWrapper
 , pkgconfig
@@ -67,12 +67,12 @@ in stdenv.mkDerivation rec {
     qttools
   ];
 
-  buildInputs = with stdenv.lib; [
+  buildInputs = [
     # TODO: remove libcap when pruneLibtoolFiles applies to pulseaudio.
     libcap
     libevent
     libtool
-    libudev
+    udev
     libusb
     libqrencode
 
diff --git a/pkgs/applications/misc/electron-cash/default.nix b/pkgs/applications/misc/electron-cash/default.nix
index 76b61de56088..891222a0f10e 100644
--- a/pkgs/applications/misc/electron-cash/default.nix
+++ b/pkgs/applications/misc/electron-cash/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, python3Packages, qtbase }:
+{ stdenv, fetchurl, python3Packages }:
 
 let
 
diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix
index 383f73b62994..ed2f0626e5d2 100644
--- a/pkgs/applications/misc/electrum/default.nix
+++ b/pkgs/applications/misc/electrum/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, python3, python3Packages, zbar, fetchpatch }:
+{ stdenv, fetchurl, python3, python3Packages, zbar }:
 
 python3Packages.buildPythonApplication rec {
   name = "electrum-${version}";
diff --git a/pkgs/applications/misc/ephemeralpg/default.nix b/pkgs/applications/misc/ephemeralpg/default.nix
index 65df422599ca..0ade32d99899 100644
--- a/pkgs/applications/misc/ephemeralpg/default.nix
+++ b/pkgs/applications/misc/ephemeralpg/default.nix
@@ -1,10 +1,10 @@
 { stdenv, fetchurl, postgresql, makeWrapper }:
 stdenv.mkDerivation rec {
   name = "ephemeralpg-${version}";
-  version = "2.2";
+  version = "2.5";
   src = fetchurl {
     url = "http://ephemeralpg.org/code/${name}.tar.gz";
-    sha256 = "1v48bcmc23zzqbha80p3spxd5l347qnjzs4z44wl80i2s8fdzlyz";
+    sha256 = "004fcll7248h73adkqawn9bhkqj9wsxyi3w99x64f7s37r2518wk";
   };
   buildInputs = [ makeWrapper ];
   installPhase = ''
diff --git a/pkgs/applications/misc/evtest/default.nix b/pkgs/applications/misc/evtest/default.nix
index 73911bab6f66..3d715a1d16bd 100644
--- a/pkgs/applications/misc/evtest/default.nix
+++ b/pkgs/applications/misc/evtest/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, autoreconfHook, automake, pkgconfig, libxml2 }:
+{ stdenv, fetchgit, autoreconfHook, pkgconfig, libxml2 }:
 
 stdenv.mkDerivation rec {
   name = "evtest-1.33";
diff --git a/pkgs/applications/misc/far2l/add-nix-syntax-highlighting.patch b/pkgs/applications/misc/far2l/add-nix-syntax-highlighting.patch
deleted file mode 100644
index a50070c4eadd..000000000000
--- a/pkgs/applications/misc/far2l/add-nix-syntax-highlighting.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-diff --git a/colorer/configs/base/hrc/nix.hrc b/colorer/configs/base/hrc/nix.hrc
-new file mode 100644
-index 0000000..1bd9bb5
---- /dev/null
-+++ b/colorer/configs/base/hrc/nix.hrc
-@@ -0,0 +1,132 @@
-+<?xml version="1.0" encoding="windows-1251"?>
-+<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN"
-+  "http://colorer.sf.net/2003/hrc.dtd">
-+<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
-+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-+     xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">
-+
-+  <type name="nix">
-+
-+    <annotation><documentation>
-+        Nix
-+    </documentation></annotation>
-+
-+    <import type="def"/>
-+
-+    <region name="Code" parent="def:Text"/>
-+    <region name="StringEscape" parent="def:StringContent"/>
-+    <region name='Import' parent='def:Directive'/>
-+    <region name='ImportOutline' parent='def:Outlined'/>
-+    <region name="Path"     parent="def:Path"/>
-+    <region name="URL"      parent="def:String"/>
-+    <region name="LiteralKeyword" parent="def:Keyword"/>
-+    <region name='Interpolation' parent='def:StringEdge'/>
-+    <region name="Ident" parent="def:Identifier"/> <!-- Label  -->
-+
-+    <scheme name="TabsAsErrors" if="tabs-as-errors">
-+      <regexp match="/\t+/" region='def:Error'/>
-+    </scheme>
-+
-+    <scheme name="SpacesAsErrors" if="spaces-as-errors">
-+      <regexp match="/\x20+$/" region='def:Error'/>
-+    </scheme>
-+
-+    <scheme name="NotNestedComment">
-+      <inherit scheme="TabsAsErrors"/>
-+      <inherit scheme="SpacesAsErrors"/>
-+      <inherit scheme="Comment"/>
-+    </scheme>
-+
-+    <scheme name="String">
-+      <inherit scheme="TabsAsErrors"/>
-+      <inherit scheme="SpacesAsErrors"/>
-+<!--  <regexp match="/\\[xX]0*[\da-fA-F]{1,2}/"                   region0="StringEscape"/> -->
-+      <regexp match="/\\./"                                       region0="StringEscape"/>
-+      <block start="/(\$\{)/" end="/(\})/" scheme="NixExpression" region="Code" region00="Interpolation" region01="PairStart" region10="Interpolation" region11="PairEnd"/>
-+    </scheme>
-+
-+    <scheme name="BlockString">
-+      <inherit scheme="TabsAsErrors"/>
-+      <inherit scheme="SpacesAsErrors"/>
-+
-+      <regexp match="/&apos;&apos;\$/"                                          region0="StringEscape"/>
-+      <regexp match="/&apos;&apos;&apos;/"                                      region0="StringEscape"/>
-+      <block start="/(\$\{)/" end="/(\})/" scheme="NixExpression" region="Code" region00="Interpolation" region01="PairStart" region10="Interpolation" region11="PairEnd"/>
-+    </scheme>
-+
-+    <scheme name="NixIdent">
-+      <regexp match="/\w[\w\d-]*'*/"           region0="Ident"/>
-+    </scheme>
-+
-+    <scheme name="NixExpression">
-+      <inherit scheme="TabsAsErrors"/>
-+      <inherit scheme="SpacesAsErrors"/>
-+
-+      <inherit scheme="def:unixCommentDirective"/>
-+      <block start="/#/"    end="/\s*$/"            scheme="Comment"          region="LineComment" region10="def:Error"/>
-+      <block start="/\/\*/" end="/\*\//"            scheme="NotNestedComment" region="Comment"     region00="PairStart" region10="PairEnd"/>
-+
-+      <block start="/(\$\{)/" end="/(\})/" scheme="NixExpression" region00="Interpolation" region01="PairStart" region10="Interpolation" region11="PairEnd"/>
-+      <block start="/(\{)/"   end="/(\})/" scheme="NixExpression" region00="Symbol"        region01="PairStart" region10="Symbol"        region11="PairEnd"/>
-+      <block start="/(\()/"   end="/(\))/" scheme="NixExpression" region00="Symbol"        region01="PairStart" region10="Symbol"        region11="PairEnd"/>
-+      <block start="/(\[)/"   end="/(\])/" scheme="NixExpression" region00="Symbol"        region01="PairStart" region10="Symbol"        region11="PairEnd"/>
-+
-+      <regexp match="/[\w\d.+=?~-]*(\/[\w\d.+?~-]+)+/"                          region0="Path"/>
-+      <regexp match="/&lt;[\w\d\/.+?~-]+&gt;/"                                  region0="Path"/>
-+      <regexp match="/(ftp|mirror|http|https|git):\/\/[\w\d\/:?=&amp;.~+-]+/"   region0="URL"/>
-+      <block start="/(&quot;)/"       end="/(&quot;)/"       scheme="String"      region="String" region00="def:StringEdge" region01="def:PairStart" region10="def:StringEdge" region11="def:PairEnd"/>
-+      <block start="/(&apos;&apos;)/" end="/(&apos;&apos;)/" scheme="BlockString" region="String" region00="def:StringEdge" region01="def:PairStart" region10="def:StringEdge" region11="def:PairEnd"/>
-+
-+      <keywords region="Keyword">
-+        <word name="assert"/>
-+        <word name="else"/>
-+        <word name="if"/>
-+        <word name="in"/>
-+        <word name="inherit"/>
-+        <word name="import"/>
-+        <word name="let"/>
-+        <word name="or"/>
-+        <word name="rec"/>
-+        <word name="then"/>
-+        <word name="throw"/>
-+        <word name="with"/>
-+      </keywords>
-+      <keywords region="LiteralKeyword">
-+        <word name="true"/>
-+        <word name="false"/>
-+        <word name="null"/>
-+      </keywords>
-+      <keywords region="Symbol">
-+        <symb name="."/>
-+        <symb name=":"/>
-+        <symb name=","/>
-+        <symb name=";"/>
-+
-+        <symb name="*"/>
-+        <symb name="/"/>
-+        <symb name="%"/>
-+        <symb name="+"/>
-+        <symb name="-"/>
-+        <symb name="!"/>
-+        <symb name="?"/>
-+        <symb name="@"/>
-+        <symb name="&lt;"/>
-+        <symb name="&gt;"/>
-+        <symb name="&amp;"/>
-+        <symb name="|"/>
-+        <symb name="="/>
-+        <symb name="..."/>
-+      </keywords>
-+
-+      <inherit scheme="def:Number"/>
-+      <inherit scheme="NixIdent"/>
-+
-+      <regexp match="/[^\)\}\]\s]/" region='def:Error'/>
-+
-+    </scheme>
-+
-+    <scheme name="nix">
-+      <inherit scheme="NixExpression"/>
-+    </scheme>
-+
-+  </type>
-+</hrc>
-diff --git a/colorer/configs/base/hrc/proto.hrc b/colorer/configs/base/hrc/proto.hrc
-index 11e493b..2a67263 100644
---- a/colorer/configs/base/hrc/proto.hrc
-+++ b/colorer/configs/base/hrc/proto.hrc
-@@ -156,6 +156,14 @@
-     <location link="jar:common.jar!base/lua.hrc"/>
-     <filename>/\.(w?lua)$/i</filename>
-   </prototype>
-+  <prototype name="nix" group="main" description="Nix">
-+    <location link="nix.hrc"/>
-+    <filename>/\.(nix)$/i</filename>
-+    <parameters>
-+      <param name="tabs-as-errors" value="true" description="Shows tabulation symbol as error"/>
-+      <param name="spaces-as-errors" value="true" description="Shows trailing spaces as error"/>
-+    </parameters>
-+  </prototype>
-   <prototype name="ruby" group="main" description="Ruby">
-     <location link="jar:common.jar!base/ruby.hrc"/>
-     <filename>/\.(rb|rbw|ruby|rake)$/i</filename>
diff --git a/pkgs/applications/misc/far2l/default.nix b/pkgs/applications/misc/far2l/default.nix
index 9ddd39981cc2..3cdd4fb0bfe9 100644
--- a/pkgs/applications/misc/far2l/default.nix
+++ b/pkgs/applications/misc/far2l/default.nix
@@ -3,15 +3,14 @@
 
 with stdenv.lib;
 stdenv.mkDerivation rec {
-  rev = "819d131110a9fedfc14f3b3bea8f1f56e68b077a";
-  build = "unstable-2018-02-27.git${builtins.substring 0 7 rev}";
+  build = "unstable-2018-07-19.git${builtins.substring 0 7 src.rev}";
   name = "far2l-2.1.${build}";
 
   src = fetchFromGitHub {
     owner = "elfmz";
     repo = "far2l";
-    rev = rev;
-    sha256 = "1xjy2ricd68pm9j758pb2axc2269ns2xh86443x5llfcaxrjja4b";
+    rev = "dceaa3918ea2c5e43600bad3fc63f861b8d26fc4";
+    sha256 = "1ssd3hwz4b7vl4r858d9whl61cn23pgcamcjmvfa6ysf4x2b7sgi";
   };
 
   nativeBuildInputs = [ cmake pkgconfig m4 makeWrapper imagemagick ];
@@ -19,10 +18,8 @@ stdenv.mkDerivation rec {
   buildInputs = [ wxGTK30 glib pcre ]
     ++ optional stdenv.isDarwin darwin.apple_sdk.frameworks.Cocoa;
 
-  patches = [ ./add-nix-syntax-highlighting.patch ];
-
   postPatch = optionalString stdenv.isLinux ''
-    substituteInPlace far2l/bootstrap/open.sh \
+    substituteInPlace far2l/bootstrap/trash.sh \
       --replace 'gvfs-trash'  '${gvfs}/bin/gvfs-trash'
   '' + optionalString stdenv.isDarwin ''
     substituteInPlace far2l/CMakeLists.txt \
@@ -44,6 +41,15 @@ stdenv.mkDerivation rec {
       --replace '"gzip '      '"${gzip}/bin/gzip '         \
       --replace '"bzip2 '     '"${bzip2}/bin/bzip2 '       \
       --replace '"tar '       '"${gnutar}/bin/tar '
+
+    ( cd colorer/configs/base
+      patch -p2 <  ${ fetchpatch {
+                        name   = "nix-language-highlighting.patch";
+                        url    = https://github.com/colorer/Colorer-schemes/commit/64bd06de0a63224b431cd8fc42cd9fa84b8ba7c0.patch;
+                        sha256 = "1mrj1wyxmk7sll9j1jzw6miwi0sfavf654klms24wngnh6hadsch";
+                      }
+                    }
+    )
   '';
 
   installPhase = ''
diff --git a/pkgs/applications/misc/finalterm/default.nix b/pkgs/applications/misc/finalterm/default.nix
index 93e5d297ffb3..2c024b9fe0ed 100644
--- a/pkgs/applications/misc/finalterm/default.nix
+++ b/pkgs/applications/misc/finalterm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, makeWrapper
+{ stdenv, fetchFromGitHub, makeWrapper
 , pkgconfig, cmake, libxml2, vala_0_26, intltool, libmx, gnome3, gtk3, gtk-doc
 , keybinder3, clutter-gtk, libnotify
 , libxkbcommon, xorg, udev
diff --git a/pkgs/applications/misc/gcal/default.nix b/pkgs/applications/misc/gcal/default.nix
index f3f7fe2aacba..a3aebf227339 100644
--- a/pkgs/applications/misc/gcal/default.nix
+++ b/pkgs/applications/misc/gcal/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, ncurses  }:
+{ stdenv, fetchurl, ncurses  }:
 
 stdenv.mkDerivation rec {
   name = "gcal-${version}";
diff --git a/pkgs/applications/misc/glava/default.nix b/pkgs/applications/misc/glava/default.nix
index d115d1ae1d24..e0535eeca387 100644
--- a/pkgs/applications/misc/glava/default.nix
+++ b/pkgs/applications/misc/glava/default.nix
@@ -84,8 +84,9 @@ in
       mv $out/usr/bin/glava $out/bin/.glava-unwrapped
       rm -rf $out/usr
 
-      patchelf $out/bin/.glava-unwrapped \
+      patchelf \
         --set-rpath "$(patchelf --print-rpath $out/bin/.glava-unwrapped):${makeLibraryPath [ libGL ]}" \
+        $out/bin/.glava-unwrapped
 
       substitute ${wrapperScript} $out/bin/glava --subst-var out
       chmod +x $out/bin/glava
diff --git a/pkgs/applications/misc/golden-cheetah/default.nix b/pkgs/applications/misc/golden-cheetah/default.nix
index efd3bfe73dd9..f62eb92ac04a 100644
--- a/pkgs/applications/misc/golden-cheetah/default.nix
+++ b/pkgs/applications/misc/golden-cheetah/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl
 , qtbase, qtsvg, qtserialport, qtwebkit, qtmultimedia, qttools, qtconnectivity
-, yacc, flex, zlib, config, qmake, makeWrapper
+, yacc, flex, zlib, qmake, makeWrapper
 }:
 stdenv.mkDerivation rec {
   name = "golden-cheetah-${version}";
diff --git a/pkgs/applications/misc/googleearth/default.nix b/pkgs/applications/misc/googleearth/default.nix
index c77f8658220b..9c1b457c299d 100644
--- a/pkgs/applications/misc/googleearth/default.nix
+++ b/pkgs/applications/misc/googleearth/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, glibc, libGLU_combined, freetype, glib, libSM, libICE, libXi, libXv
-, libXrender, libXrandr, libXfixes, libXcursor, libXinerama, libXext, libX11, qt4
+, libXrender, libXrandr, libXfixes, libXcursor, libXinerama, libXext, libX11
 , zlib, fontconfig, dpkg, libproxy, libxml2, gstreamer, gst_all_1, dbus }:
 
 let
diff --git a/pkgs/applications/misc/gpsprune/default.nix b/pkgs/applications/misc/gpsprune/default.nix
index 586807b2dd5c..6689a3cae102 100644
--- a/pkgs/applications/misc/gpsprune/default.nix
+++ b/pkgs/applications/misc/gpsprune/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, makeDesktopItem, makeWrapper, unzip, bash, jre8 }:
+{ fetchurl, stdenv, makeDesktopItem, makeWrapper, unzip, jre8 }:
 
 stdenv.mkDerivation rec {
   name = "gpsprune-${version}";
diff --git a/pkgs/applications/misc/gpxsee/default.nix b/pkgs/applications/misc/gpxsee/default.nix
index d87ac459d021..ed0dd3ba5be3 100644
--- a/pkgs/applications/misc/gpxsee/default.nix
+++ b/pkgs/applications/misc/gpxsee/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, qmake, qtbase, qttools }:
+{ stdenv, fetchFromGitHub, qmake, qttools }:
 
 stdenv.mkDerivation rec {
   name = "gpxsee-${version}";
diff --git a/pkgs/applications/misc/gramps/default.nix b/pkgs/applications/misc/gramps/default.nix
index 50f575d15cec..b4b98909447e 100644
--- a/pkgs/applications/misc/gramps/default.nix
+++ b/pkgs/applications/misc/gramps/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, gtk3, pythonPackages, intltool, gnome3,
-  pango, gsettings-desktop-schemas, gobjectIntrospection, wrapGAppsHook,
+  pango, gobjectIntrospection, wrapGAppsHook,
 # Optional packages:
  enableOSM ? true, osm-gps-map
  }:
diff --git a/pkgs/applications/misc/guake/default.nix b/pkgs/applications/misc/guake/default.nix
index 57dc68263ac4..8bf779185b36 100644
--- a/pkgs/applications/misc/guake/default.nix
+++ b/pkgs/applications/misc/guake/default.nix
@@ -2,7 +2,7 @@
 , gtk3, keybinder3, libnotify, libutempter, vte }:
 
 let
-  version = "3.3.0";
+  version = "3.3.2";
 in python3.pkgs.buildPythonApplication rec {
   name = "guake-${version}";
   format = "other";
@@ -11,7 +11,7 @@ in python3.pkgs.buildPythonApplication rec {
     owner = "Guake";
     repo = "guake";
     rev = version;
-    sha256 = "1wckzz18rpgacnkynh4rknhhki52agd76i2p80kk9rlrdifqs788";
+    sha256 = "0cz58wfsa66j01sqpka7908ilj5ch3jdxaxzqdi8yspqwzz5iwc7";
   };
 
   nativeBuildInputs = [ gettext gobjectIntrospection wrapGAppsHook python3.pkgs.pip glibcLocales ];
diff --git a/pkgs/applications/misc/gummi/default.nix b/pkgs/applications/misc/gummi/default.nix
index 5fdb8985bbbb..6c84f3cbd326 100644
--- a/pkgs/applications/misc/gummi/default.nix
+++ b/pkgs/applications/misc/gummi/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgs, makeWrapper
+{ stdenv, pkgs, makeWrapper
 , glib, gnome2, gnome3, gtk2-x11, gtkspell2, poppler
 , pkgconfig, intltool, autoreconfHook, wrapGAppsHook
 }:
diff --git a/pkgs/applications/misc/gutenberg/default.nix b/pkgs/applications/misc/gutenberg/default.nix
index 7a04bd7194f2..8ab840221815 100644
--- a/pkgs/applications/misc/gutenberg/default.nix
+++ b/pkgs/applications/misc/gutenberg/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   name = "gutenberg-${version}";
-  version = "0.3.1";
+  version = "0.3.4";
 
   src = fetchFromGitHub {
     owner = "Keats";
     repo = "gutenberg";
     rev = "v${version}";
-    sha256 = "03zhbwxp4dbqydiydx0hpp3vpg769zzn5i95h2sl868mpfia8gyd";
+    sha256 = "1v26q1m3bx7mdmmwgd6p601ncf13rr4rrx9s06fiy8vnd0ar1vlf";
   };
 
-  cargoSha256 = "0441lbmxx16aar6fn651ihk3psrx0lk3qdbbyih05xjlkkbk1qxs";
+  cargoSha256 = "0cdy0wvibkpnmlqwxvn02a2k2vqy6zdqzflj2dh6g1cjbz1j8qh5";
 
   nativeBuildInputs = [ cmake ];
   buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices cf-private ];
@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
     description = "An opinionated static site generator with everything built-in";
     homepage = https://www.getgutenberg.io;
     license = licenses.mit;
-    maintainers = [];
+    maintainers = with maintainers; [ dywedir ];
     platforms = platforms.all;
   };
 }
diff --git a/pkgs/applications/misc/gxneur/default.nix b/pkgs/applications/misc/gxneur/default.nix
index 69c91d257558..ec041902b256 100644
--- a/pkgs/applications/misc/gxneur/default.nix
+++ b/pkgs/applications/misc/gxneur/default.nix
@@ -1,24 +1,19 @@
-{ stdenv, fetchurl, pkgconfig, gtk2, xorg, glib, xneur_0_13, libglade, GConf, pcre }:
+{ stdenv, fetchurl, pkgconfig, intltool, gtk2, xorg, glib, xneur, libglade, GConf, libappindicator-gtk2, pcre }:
 
 stdenv.mkDerivation {
-  name = "gxneur-0.13.0";
-  
+  name = "gxneur-0.20.0";
+
   src = fetchurl {
-    url = https://dists.xneur.ru/release-0.13.0/tgz/gxneur-0.13.0.tar.bz2;
-    sha256 = "f093428a479158247a7ff8424f0aec9af9f7b1d05b191cf30b7c534965a6839f";
+    url = https://github.com/AndrewCrewKuznetsov/xneur-devel/raw/f66723feb272c68f7c22a8bf0dbcafa5e3a8a5ee/dists/0.20.0/gxneur_0.20.0.orig.tar.gz;
+    sha256 = "0avmhdcj0hpr55fc0iih8fjykmdhn34c8mwdnqvl8jh4nhxxchxr";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig intltool ];
   buildInputs = [
-    xorg.libX11 glib gtk2 xorg.libXpm xorg.libXt xorg.libXext xneur_0_13
-    libglade GConf pcre
+    xorg.libX11 glib gtk2 xorg.libXpm xorg.libXt xorg.libXext xneur
+    libglade GConf pcre libappindicator-gtk2
   ];
 
-  preConfigure = ''
-    sed -e 's@-Werror@@' -i configure
-    sed -e 's@"xneur"@"${xneur_0_13}/bin/xneur"@' -i src/misc.c
-  '';
-
   meta = {
     description = "GUI for XNEUR keyboard layout switcher";
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/applications/misc/hamster-time-tracker/default.nix b/pkgs/applications/misc/hamster-time-tracker/default.nix
index 105f7beb98fe..2abdce45c95f 100644
--- a/pkgs/applications/misc/hamster-time-tracker/default.nix
+++ b/pkgs/applications/misc/hamster-time-tracker/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchzip, pythonPackages, docbook2x, libxslt, gnome-doc-utils
-, intltool, dbus-glib, gnome_python, dbus
+, intltool, dbus-glib, gnome_python
 , hicolor-icon-theme
 }:
 
diff --git a/pkgs/applications/misc/haxor-news/default.nix b/pkgs/applications/misc/haxor-news/default.nix
index 624c15e118a2..1fa016627d4e 100644
--- a/pkgs/applications/misc/haxor-news/default.nix
+++ b/pkgs/applications/misc/haxor-news/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, python }:
+{ stdenv, python }:
 
 with python.pkgs;
 
diff --git a/pkgs/applications/misc/houdini/default.nix b/pkgs/applications/misc/houdini/default.nix
index 0b679617243d..607dff293189 100644
--- a/pkgs/applications/misc/houdini/default.nix
+++ b/pkgs/applications/misc/houdini/default.nix
@@ -1,4 +1,4 @@
-{ zsh, stdenv, callPackage, buildFHSUserEnv, undaemonize }:
+{ callPackage, buildFHSUserEnv, undaemonize }:
 
 let
   houdini-runtime = callPackage ./runtime.nix { };
diff --git a/pkgs/applications/misc/hyper/default.nix b/pkgs/applications/misc/hyper/default.nix
index 65b85868bc59..a70506f7aaaa 100644
--- a/pkgs/applications/misc/hyper/default.nix
+++ b/pkgs/applications/misc/hyper/default.nix
@@ -1,13 +1,13 @@
 { stdenv, lib, fetchurl, dpkg, atk, glib, pango, gdk_pixbuf, gnome3, gtk2, cairo
 , freetype, fontconfig, dbus, libXi, libXcursor, libXdamage, libXrandr
 , libXcomposite, libXext, libXfixes, libXrender, libX11, libXtst, libXScrnSaver
-, libxcb, nss, nspr, alsaLib, cups, expat, libudev, libpulseaudio }:
+, libxcb, nss, nspr, alsaLib, cups, expat, udev, libpulseaudio }:
 
 let
   libPath = stdenv.lib.makeLibraryPath [
     stdenv.cc.cc gtk2 gnome3.gconf atk glib pango gdk_pixbuf cairo freetype fontconfig dbus
     libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes libxcb
-    libXrender libX11 libXtst libXScrnSaver nss nspr alsaLib cups expat libudev libpulseaudio
+    libXrender libX11 libXtst libXScrnSaver nss nspr alsaLib cups expat udev libpulseaudio
   ];
 in
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/misc/icesl/default.nix b/pkgs/applications/misc/icesl/default.nix
index 2295e15cc3d3..49b1741fd5af 100644
--- a/pkgs/applications/misc/icesl/default.nix
+++ b/pkgs/applications/misc/icesl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchzip, patchelf, freeglut, libXmu, libXi, libX11, libICE, libGLU_combined, libSM, libXext, dialog, makeWrapper }:
+{ stdenv, lib, fetchzip, freeglut, libXmu, libXi, libX11, libICE, libGLU_combined, libSM, libXext, dialog, makeWrapper }:
 let
   lpath = stdenv.lib.makeLibraryPath [ libXmu libXi libX11 freeglut libICE libGLU_combined libSM libXext ];
 in
diff --git a/pkgs/applications/misc/ipmiview/default.nix b/pkgs/applications/misc/ipmiview/default.nix
index 638765840cb9..58fcd59a2b2f 100644
--- a/pkgs/applications/misc/ipmiview/default.nix
+++ b/pkgs/applications/misc/ipmiview/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
    name = "IPMIView-${version}";
-   version = "2.13.0";
-   buildVersion = "170504";
+   version = "2.14.0";
+   buildVersion = "180213";
 
    src = fetchurl {
     url = "ftp://ftp.supermicro.com/utility/IPMIView/Linux/IPMIView_${version}_build.${buildVersion}_bundleJRE_Linux_x64.tar.gz";
-    sha256 = "1hfw5g6lxg3vqg0nc3g2sv2h6bn8za35bxxms0ri0sgb9v3xg1y6";
+    sha256 = "1wp22wm7smlsb25x0cck4p660cycfczxj381930crd1qrf68mw4h";
   };
 
    buildInputs = [ patchelf makeWrapper ];
diff --git a/pkgs/applications/misc/josm/default.nix b/pkgs/applications/misc/josm/default.nix
index 97b60080365f..9872ff23f347 100644
--- a/pkgs/applications/misc/josm/default.nix
+++ b/pkgs/applications/misc/josm/default.nix
@@ -1,12 +1,12 @@
-{ fetchurl, stdenv, makeDesktopItem, makeWrapper, unzip, bash, jre10 }:
+{ fetchurl, stdenv, makeDesktopItem, makeWrapper, unzip, jre10 }:
 
 stdenv.mkDerivation rec {
   name = "josm-${version}";
-  version = "13996";
+  version = "14026";
 
   src = fetchurl {
     url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
-    sha256 = "1j98wxw84f5rf3finr38bkr1sh9ckah8pmhmxyhmcw2rxf1mv9bf";
+    sha256 = "1ysi23j2yj5b6cn3xdsrl4xp56klpw4xa7c4gv90z2dllx06mqli";
   };
 
   buildInputs = [ jre10 makeWrapper ];
diff --git a/pkgs/applications/misc/khard/default.nix b/pkgs/applications/misc/khard/default.nix
index 075640f702cb..3c5184d54632 100644
--- a/pkgs/applications/misc/khard/default.nix
+++ b/pkgs/applications/misc/khard/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub, glibcLocales, python3 }:
+{ stdenv, fetchurl, glibcLocales, python3 }:
 
 let
   python = python3.override {
diff --git a/pkgs/applications/misc/kitty/default.nix b/pkgs/applications/misc/kitty/default.nix
index 38c2494c9f7d..0c894fb0b612 100644
--- a/pkgs/applications/misc/kitty/default.nix
+++ b/pkgs/applications/misc/kitty/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchFromGitHub, pkgs, python3Packages, glfw, libunistring, harfbuzz,
-  fontconfig, zlib, pkgconfig, ncurses, imagemagick, makeWrapper, xsel,
+{ stdenv, fetchFromGitHub, python3Packages, glfw, libunistring, harfbuzz,
+  fontconfig, pkgconfig, ncurses, imagemagick, xsel,
   libstartup_notification, libX11, libXrandr, libXinerama, libXcursor,
   libxkbcommon, libXi, libXext, wayland-protocols, wayland,
   which
diff --git a/pkgs/applications/misc/kiwix/default.nix b/pkgs/applications/misc/kiwix/default.nix
index 699cb2fd0986..c37d26f3dbcc 100644
--- a/pkgs/applications/misc/kiwix/default.nix
+++ b/pkgs/applications/misc/kiwix/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, makeWrapper, pkgconfig
 , zip, python, zlib, which, icu, libmicrohttpd, lzma, aria2, wget, bc
-, libuuid, glibc, libX11, libXext, libXt, libXrender, glib, dbus, dbus-glib
+, libuuid, libX11, libXext, libXt, libXrender, glib, dbus, dbus-glib
 , gtk2, gdk_pixbuf, pango, cairo, freetype, fontconfig, alsaLib, atk, cmake
 , xapian, ctpp2, zimlib
 }:
diff --git a/pkgs/applications/misc/kupfer/default.nix b/pkgs/applications/misc/kupfer/default.nix
index bb55fc2d4a8b..3072963c43e8 100644
--- a/pkgs/applications/misc/kupfer/default.nix
+++ b/pkgs/applications/misc/kupfer/default.nix
@@ -1,11 +1,9 @@
 { stdenv
-, makeWrapper
 , fetchurl
 , intltool
 , python3Packages
 , gobjectIntrospection
 , gtk3
-, dbus
 , libwnck3
 , keybinder3
 , hicolor-icon-theme
diff --git a/pkgs/applications/misc/llpp/default.nix b/pkgs/applications/misc/llpp/default.nix
index 959ed6b11bab..372adef4375c 100644
--- a/pkgs/applications/misc/llpp/default.nix
+++ b/pkgs/applications/misc/llpp/default.nix
@@ -1,10 +1,9 @@
 { stdenv, lib, makeWrapper, fetchgit, pkgconfig, ninja, ocaml, findlib, mupdf
-, lablgl, gtk3, openjpeg, jbig2dec, mujs, xsel, openssl, freetype, ncurses }:
+, gtk3, openjpeg, jbig2dec, mujs, xsel, openssl, freetype, ncurses }:
 
 assert lib.versionAtLeast (lib.getVersion ocaml) "4.02";
 
-let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version;
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
   name = "llpp-${version}";
   version = "2018-03-02";
 
diff --git a/pkgs/applications/misc/lxterminal/default.nix b/pkgs/applications/misc/lxterminal/default.nix
index 0a2a051223ac..b16507c8b7bd 100644
--- a/pkgs/applications/misc/lxterminal/default.nix
+++ b/pkgs/applications/misc/lxterminal/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, automake, autoconf, intltool, pkgconfig, gtk3, vte
-, libxslt, docbook_xml_dtd_412, docbook_xml_xslt, libxml2, findXMLCatalogs
+, libxslt, docbook_xml_dtd_412, docbook_xsl, libxml2, findXMLCatalogs
 }:
 
 let version = "0.3.1"; in
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [
     automake autoconf intltool pkgconfig
-    libxslt docbook_xml_dtd_412 docbook_xml_xslt libxml2 findXMLCatalogs
+    libxslt docbook_xml_dtd_412 docbook_xsl libxml2 findXMLCatalogs
   ];
 
   buildInputs = [ gtk3 vte ];
diff --git a/pkgs/applications/misc/madonctl/default.nix b/pkgs/applications/misc/madonctl/default.nix
index 787ce7231f30..f2dacb7890f0 100644
--- a/pkgs/applications/misc/madonctl/default.nix
+++ b/pkgs/applications/misc/madonctl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildGoPackage, fetchFromGitHub, fetchgx }:
+{ stdenv, buildGoPackage, fetchFromGitHub }:
 
 buildGoPackage rec {
   name = "madonctl-${version}";
diff --git a/pkgs/applications/misc/masterpdfeditor/default.nix b/pkgs/applications/misc/masterpdfeditor/default.nix
index fb17aadfa490..23f14d7ac9af 100644
--- a/pkgs/applications/misc/masterpdfeditor/default.nix
+++ b/pkgs/applications/misc/masterpdfeditor/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, glibc, sane-backends, qtbase, qtsvg, libXext, libX11, libXdmcp, libXau, libxcb, autoPatchelfHook }:
+{ stdenv, fetchurl, sane-backends, qtbase, qtsvg, autoPatchelfHook }:
 let
   version = "4.3.89";
 in stdenv.mkDerivation {
diff --git a/pkgs/applications/misc/memo/default.nix b/pkgs/applications/misc/memo/default.nix
index 56cbb338a403..7d48b61793ca 100644
--- a/pkgs/applications/misc/memo/default.nix
+++ b/pkgs/applications/misc/memo/default.nix
@@ -1,4 +1,4 @@
-{ fetchFromGitHub, ag, tree, man, stdenv, 
+{ fetchFromGitHub, silver-searcher, tree, man, stdenv,
   pandocSupport ? true, pandoc ? null
   , ... }:
 
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
   in ''
     mkdir -p $out/{bin,share/man/man1,share/bash-completion/completions}
     substituteInPlace memo \
-      --replace "ack_cmd=ack"       "ack_cmd=${ag}/bin/ag" \
+      --replace "ack_cmd=ack"       "ack_cmd=${silver-searcher}/bin/ag" \
       --replace "tree_cmd=tree"     "tree_cmd=${tree}/bin/tree" \
       --replace "man_cmd=man"       "man_cmd=${man}/bin/man" \
       --replace "pandoc_cmd=pandoc" "${pandocReplacement}"
diff --git a/pkgs/applications/misc/moonlight-embedded/default.nix b/pkgs/applications/misc/moonlight-embedded/default.nix
index 42f1b58061ef..5aaaa7a0e37b 100644
--- a/pkgs/applications/misc/moonlight-embedded/default.nix
+++ b/pkgs/applications/misc/moonlight-embedded/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchgit, cmake, perl
-, alsaLib, libevdev, libopus, libudev, SDL2
+, alsaLib, libevdev, libopus, udev, SDL2
 , ffmpeg, pkgconfig, xorg, libvdpau, libpulseaudio, libcec
 , curl, expat, avahi, enet, libuuid
 }:
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake perl ];
   buildInputs = [
-    alsaLib libevdev libopus libudev SDL2
+    alsaLib libevdev libopus udev SDL2
     ffmpeg pkgconfig xorg.libxcb libvdpau libpulseaudio libcec
     xorg.libpthreadstubs curl expat avahi enet libuuid
   ];
diff --git a/pkgs/applications/misc/mop/default.nix b/pkgs/applications/misc/mop/default.nix
index 336b136c56d6..8c6bd92d5362 100644
--- a/pkgs/applications/misc/mop/default.nix
+++ b/pkgs/applications/misc/mop/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, buildGoPackage, fetchgit }:
+{ stdenv, buildGoPackage, fetchgit }:
 
 buildGoPackage rec {
   name = "mop-${version}";
diff --git a/pkgs/applications/misc/mucommander/default.nix b/pkgs/applications/misc/mucommander/default.nix
index fdb236194f9c..d6153d2268b6 100644
--- a/pkgs/applications/misc/mucommander/default.nix
+++ b/pkgs/applications/misc/mucommander/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, gradle_3_5, perl, makeWrapper, jre }:
+{ stdenv, fetchFromGitHub, gradle_3_5, perl, makeWrapper, jre, gsettings-desktop-schemas }:
 
 let
   version = "0.9.2";
@@ -10,7 +10,7 @@ let
     rev = version;
     sha256 = "1fvij0yjjz56hsyddznx7mdgq1zm25fkng3axl03iyrij976z7b8";
   };
-  
+
   postPatch = ''
     # there is no .git anyway
     substituteInPlace build.gradle \
@@ -69,7 +69,9 @@ in stdenv.mkDerivation {
   installPhase = ''
     mkdir $out
     tar xvf build/distributions/mucommander-${version}.tar --directory=$out --strip=1
-    wrapProgram $out/bin/mucommander --set JAVA_HOME ${jre}
+    wrapProgram $out/bin/mucommander \
+      --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name} \
+      --set JAVA_HOME ${jre}
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/misc/nixnote2/default.nix b/pkgs/applications/misc/nixnote2/default.nix
index 4ac152c26694..12f8c12b5864 100644
--- a/pkgs/applications/misc/nixnote2/default.nix
+++ b/pkgs/applications/misc/nixnote2/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, mkDerivation, fetchFromGitHub, boost, qtbase, qtwebkit, poppler_qt5, qmake, hunspell, html-tidy}:
+{ stdenv, mkDerivation, fetchFromGitHub, boost
+, qtbase, qtwebkit, poppler, qmake, hunspell, html-tidy}:
 
 mkDerivation rec {
   name = "nixnote2-${version}";
@@ -11,7 +12,7 @@ mkDerivation rec {
     sha256 = "0cfq95mxvcgby66r61gclm1a2c6zck5aln04xmg2q8kg6p9d31fr";
   };
 
-  buildInputs = [ boost qtbase qtwebkit poppler_qt5 hunspell ];
+  buildInputs = [ boost qtbase qtwebkit poppler hunspell ];
 
   enableParallelBuilding = true;
 
@@ -28,7 +29,7 @@ mkDerivation rec {
 
     substituteInPlace nixnote.cpp --replace 'tidyProcess.start("tidy' 'tidyProcess.start("${html-tidy}/bin/tidy'
   '';
-  
+
   postInstal = ''
     cp images/windowIcon.png $out/share/pixmaps/nixnote2.png
   '';
diff --git a/pkgs/applications/misc/octoprint/default.nix b/pkgs/applications/misc/octoprint/default.nix
index 6b057186eaf3..2abbfdea0417 100644
--- a/pkgs/applications/misc/octoprint/default.nix
+++ b/pkgs/applications/misc/octoprint/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, python2, fetchurl }:
+{ stdenv, fetchFromGitHub, python2 }:
 
 let
 
diff --git a/pkgs/applications/misc/octoprint/plugins.nix b/pkgs/applications/misc/octoprint/plugins.nix
index 0a1d26012a80..bd65acf5e5e9 100644
--- a/pkgs/applications/misc/octoprint/plugins.nix
+++ b/pkgs/applications/misc/octoprint/plugins.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch, octoprint, pythonPackages }:
+{ stdenv, fetchFromGitHub, octoprint, pythonPackages }:
 
 let
   buildPlugin = args: pythonPackages.buildPythonApplication (args // {
diff --git a/pkgs/applications/misc/onboard/default.nix b/pkgs/applications/misc/onboard/default.nix
index de64705d832b..78105ea535d6 100644
--- a/pkgs/applications/misc/onboard/default.nix
+++ b/pkgs/applications/misc/onboard/default.nix
@@ -16,7 +16,7 @@
 , intltool
 , isocodes
 , libcanberra-gtk3
-, libudev
+, udev
 , libxkbcommon
 , pkgconfig
 , procps
@@ -79,7 +79,7 @@ in python3.pkgs.buildPythonApplication rec {
     hunspell
     isocodes
     libcanberra-gtk3
-    libudev
+    udev
     libxkbcommon
     wrapGAppsHook
     xorg.libXtst
diff --git a/pkgs/applications/misc/oneko/default.nix b/pkgs/applications/misc/oneko/default.nix
index 58e80e7f7264..e1cc70e42779 100644
--- a/pkgs/applications/misc/oneko/default.nix
+++ b/pkgs/applications/misc/oneko/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, xorg, x11 }:
+{ stdenv, fetchurl, xorg, xlibsWrapper }:
 
 stdenv.mkDerivation rec {
   version = "1.2.sakura.5";
@@ -8,8 +8,8 @@ stdenv.mkDerivation rec {
     url = "http://www.daidouji.com/oneko/distfiles/oneko-${version}.tar.gz";
     sha256 = "2c2e05f1241e9b76f54475b5577cd4fb6670de058218d04a741a04ebd4a2b22f";
   };
-  buildInputs = [ xorg.imake xorg.gccmakedep x11 ];
-  
+  buildInputs = [ xorg.imake xorg.gccmakedep xlibsWrapper ];
+
   configurePhase = "xmkmf";
 
   installPhase = ''
@@ -31,4 +31,3 @@ stdenv.mkDerivation rec {
     platforms = platforms.unix;
   };
 }
-
diff --git a/pkgs/applications/misc/orca/default.nix b/pkgs/applications/misc/orca/default.nix
index ca06b5fa6df6..199fa3e9bfe9 100644
--- a/pkgs/applications/misc/orca/default.nix
+++ b/pkgs/applications/misc/orca/default.nix
@@ -1,9 +1,9 @@
-{ stdenv, lib, pkgconfig, fetchurl, buildPythonApplication
+{ lib, pkgconfig, fetchurl, buildPythonApplication
 , autoreconfHook, wrapGAppsHook, gobjectIntrospection
 , intltool, yelp-tools, itstool, libxmlxx3
 , python, pygobject3, gtk3, gnome3, substituteAll
 , at-spi2-atk, at-spi2-core, pyatspi, dbus, dbus-python, pyxdg
-, xkbcomp, gsettings-desktop-schemas, liblouis
+, xkbcomp, gsettings-desktop-schemas
 , speechd, brltty, setproctitle, gst_all_1, gst-python
 }:
 
diff --git a/pkgs/applications/misc/perkeep/default.nix b/pkgs/applications/misc/perkeep/default.nix
index 746a319c2e1e..9ecf0da58067 100644
--- a/pkgs/applications/misc/perkeep/default.nix
+++ b/pkgs/applications/misc/perkeep/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, go, fetchzip, git, fetchpatch, fetchFromGitHub, fetchgit }:
+{ stdenv, go, fetchzip, git, fetchFromGitHub, fetchgit }:
 
 # When perkeep is updated all deps in the let block should be removed
 let
diff --git a/pkgs/applications/misc/pgmanage/default.nix b/pkgs/applications/misc/pgmanage/default.nix
index 23ab0f8d34ad..a548c149665a 100644
--- a/pkgs/applications/misc/pgmanage/default.nix
+++ b/pkgs/applications/misc/pgmanage/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, runCommand, postgresql, openssl } :
+{ stdenv, fetchFromGitHub, postgresql, openssl } :
 
 stdenv.mkDerivation rec {
   name = "pgmanage-${version}";
diff --git a/pkgs/applications/misc/polybar/default.nix b/pkgs/applications/misc/polybar/default.nix
index 05ad3e2a9066..3ac719d18d25 100644
--- a/pkgs/applications/misc/polybar/default.nix
+++ b/pkgs/applications/misc/polybar/default.nix
@@ -1,6 +1,6 @@
 { cairo, cmake, fetchgit, libXdmcp, libpthreadstubs, libxcb, pcre, pkgconfig
 , python2 , stdenv, xcbproto, xcbutil, xcbutilimage, xcbutilrenderutil
-, xcbutilwm, xcbutilxrm, fetchpatch, makeWrapper
+, xcbutilwm, xcbutilxrm, makeWrapper
 
 # optional packages-- override the variables ending in 'Support' to enable or
 # disable modules
diff --git a/pkgs/applications/misc/pt/default.nix b/pkgs/applications/misc/pt/default.nix
index a400bb04da43..dbda7664bde0 100644
--- a/pkgs/applications/misc/pt/default.nix
+++ b/pkgs/applications/misc/pt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, bundlerEnv, ruby }:
+{ lib, bundlerEnv, ruby }:
 
 bundlerEnv {
   name = "pt-0.7.3";
diff --git a/pkgs/applications/misc/qpdfview/default.nix b/pkgs/applications/misc/qpdfview/default.nix
index f836ce5b8085..dfaa90d43adf 100644
--- a/pkgs/applications/misc/qpdfview/default.nix
+++ b/pkgs/applications/misc/qpdfview/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, qmake, qtbase, qtsvg, pkgconfig, poppler_qt5, djvulibre, libspectre, cups
+{stdenv, fetchurl, qmake, qtbase, qtsvg, pkgconfig, poppler, djvulibre, libspectre, cups
 , file, ghostscript
 }:
 let
@@ -12,7 +12,7 @@ let
   };
   nativeBuildInputs = [ qmake pkgconfig ];
   buildInputs = [
-    qtbase qtsvg poppler_qt5 djvulibre libspectre cups file ghostscript
+    qtbase qtsvg poppler djvulibre libspectre cups file ghostscript
   ];
 in
 stdenv.mkDerivation {
diff --git a/pkgs/applications/misc/redis-desktop-manager/default.nix b/pkgs/applications/misc/redis-desktop-manager/default.nix
index 7a4348260fd3..bf4559e91178 100644
--- a/pkgs/applications/misc/redis-desktop-manager/default.nix
+++ b/pkgs/applications/misc/redis-desktop-manager/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchgit, fetchpatch, pkgconfig, libssh2
+{ stdenv, lib, fetchgit, pkgconfig, libssh2
 , qtbase, qtdeclarative, qtgraphicaleffects, qtimageformats, qtquickcontrols
 , qtsvg, qttools, qtquick1, qtcharts
 , qmake
diff --git a/pkgs/applications/misc/redshift/default.nix b/pkgs/applications/misc/redshift/default.nix
index dcc8300550f4..c6d3d6e1a9d5 100644
--- a/pkgs/applications/misc/redshift/default.nix
+++ b/pkgs/applications/misc/redshift/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchurl, autoconf, automake, gettext, intltool
+{ stdenv, fetchFromGitHub, autoconf, automake, gettext, intltool
 , libtool, pkgconfig, wrapGAppsHook, wrapPython, gobjectIntrospection
 , gtk3, python, pygobject3, hicolor-icon-theme, pyxdg
 
diff --git a/pkgs/applications/misc/rofi/default.nix b/pkgs/applications/misc/rofi/default.nix
index 7da721e9f374..2d22d87c49a8 100644
--- a/pkgs/applications/misc/rofi/default.nix
+++ b/pkgs/applications/misc/rofi/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, autoreconfHook, pkgconfig, libxkbcommon, pango, which, git
-, cairo, glib, libxcb, xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification
+, cairo, libxcb, xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification
 , bison, flex, librsvg, check
 }:
 
diff --git a/pkgs/applications/misc/rofi/wrapper.nix b/pkgs/applications/misc/rofi/wrapper.nix
index 17bbf1583c46..c2384f56faa1 100644
--- a/pkgs/applications/misc/rofi/wrapper.nix
+++ b/pkgs/applications/misc/rofi/wrapper.nix
@@ -1,4 +1,4 @@
-{ stdenv, rofi-unwrapped, makeWrapper, theme ? null, lib }:
+{ stdenv, rofi-unwrapped, makeWrapper, theme ? null }:
 
 if theme == null then rofi-unwrapped else
 stdenv.mkDerivation {
diff --git a/pkgs/applications/misc/roxterm/default.nix b/pkgs/applications/misc/roxterm/default.nix
index 1d0c7d28de6e..11a75e4064f4 100644
--- a/pkgs/applications/misc/roxterm/default.nix
+++ b/pkgs/applications/misc/roxterm/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, docbook_xsl, dbus_libs, dbus-glib, expat, gettext
-, gsettings-desktop-schemas, gdk_pixbuf, gtk2, gtk3, hicolor-icon-theme
-, imagemagick, itstool, librsvg, libtool, libxslt, lockfile, makeWrapper
+{ stdenv, fetchurl, docbook_xsl, dbus, dbus-glib, expat
+, gsettings-desktop-schemas, gdk_pixbuf, gtk3, hicolor-icon-theme
+, imagemagick, itstool, librsvg, libtool, libxslt, makeWrapper
 , pkgconfig, python, pythonPackages, vte
 , wrapGAppsHook}:
 
@@ -22,13 +22,13 @@ in stdenv.mkDerivation rec {
 
   buildInputs =
     [ docbook_xsl expat imagemagick itstool librsvg libtool libxslt
-      makeWrapper python pythonPackages.lockfile dbus_libs dbus-glib
+      makeWrapper python pythonPackages.lockfile dbus dbus-glib
       gdk_pixbuf gsettings-desktop-schemas gtk3
       hicolor-icon-theme vte ];
 
   NIX_CFLAGS_COMPILE = [ "-I${dbus-glib.dev}/include/dbus-1.0"
-                         "-I${dbus_libs.dev}/include/dbus-1.0"
-                         "-I${dbus_libs.lib}/lib/dbus-1.0/include" ];
+                         "-I${dbus.dev}/include/dbus-1.0"
+                         "-I${dbus.lib}/lib/dbus-1.0/include" ];
 
   # Fix up python path so the lockfile library is on it.
   PYTHONPATH = stdenv.lib.makeSearchPathOutput "lib" python.sitePackages [
diff --git a/pkgs/applications/misc/rtv/default.nix b/pkgs/applications/misc/rtv/default.nix
index d20276968244..5c16a02ddb8c 100644
--- a/pkgs/applications/misc/rtv/default.nix
+++ b/pkgs/applications/misc/rtv/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgs, pythonPackages }:
+{ stdenv, fetchFromGitHub, pythonPackages }:
 
 with pythonPackages;
 buildPythonApplication rec {
diff --git a/pkgs/applications/misc/rxvt_unicode/wrapper.nix b/pkgs/applications/misc/rxvt_unicode/wrapper.nix
index 98d7e12a8ed8..909c267def82 100644
--- a/pkgs/applications/misc/rxvt_unicode/wrapper.nix
+++ b/pkgs/applications/misc/rxvt_unicode/wrapper.nix
@@ -1,4 +1,4 @@
-{ stdenv, symlinkJoin, rxvt_unicode, makeWrapper, plugins }:
+{ symlinkJoin, rxvt_unicode, makeWrapper, plugins }:
 
 let
   rxvt_name = builtins.parseDrvName rxvt_unicode.name;
diff --git a/pkgs/applications/misc/simplenote/default.nix b/pkgs/applications/misc/simplenote/default.nix
index 513c5facc6b2..8049cc2feae7 100644
--- a/pkgs/applications/misc/simplenote/default.nix
+++ b/pkgs/applications/misc/simplenote/default.nix
@@ -1,5 +1,5 @@
 { fetchurl, stdenv, lib, zlib, glib, alsaLib, dbus, gtk2, atk, pango, freetype, fontconfig
-, libgnome-keyring3, gdk_pixbuf, gvfs, cairo, cups, expat, libgpgerror, nspr
+, libgnome-keyring3, gdk_pixbuf, cairo, cups, expat, libgpgerror, nspr
 , nss, xorg, libcap, systemd, libnotify ,libXScrnSaver, gnome3 }:
 
  stdenv.mkDerivation rec {
diff --git a/pkgs/applications/misc/slic3r/prusa3d.nix b/pkgs/applications/misc/slic3r/prusa3d.nix
index 11a5baa288dd..9f4036c3f967 100644
--- a/pkgs/applications/misc/slic3r/prusa3d.nix
+++ b/pkgs/applications/misc/slic3r/prusa3d.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, makeWrapper, which, cmake, perl, perlPackages,
-  boost, tbb, wxGTK30, pkgconfig, gtk3, fetchurl, gtk2, bash, libGLU,
+  boost, tbb, wxGTK30, pkgconfig, gtk3, fetchurl, gtk2, libGLU,
   glew, eigen, curl }:
 let
   AlienWxWidgets = perlPackages.buildPerlPackage rec {
diff --git a/pkgs/applications/misc/spacefm/default.nix b/pkgs/applications/misc/spacefm/default.nix
index 6fa594dec046..9f20b20f7f3a 100644
--- a/pkgs/applications/misc/spacefm/default.nix
+++ b/pkgs/applications/misc/spacefm/default.nix
@@ -1,6 +1,6 @@
 { pkgs, fetchFromGitHub, stdenv, gtk3, udev, desktop-file-utils
 , shared-mime-info, intltool, pkgconfig, wrapGAppsHook, ffmpegthumbnailer
-, jmtpfs, ifuseSupport ? false, ifuse ? null, lsof, udisks2, hicolor-icon-theme, adwaita-icon-theme }:
+, jmtpfs, ifuseSupport ? false, ifuse ? null, lsof, udisks2 }:
 
 stdenv.mkDerivation rec {
   name = "spacefm-${version}";
diff --git a/pkgs/applications/misc/sweethome3d/editors.nix b/pkgs/applications/misc/sweethome3d/editors.nix
index 6c4b32ca9aa6..14285a52e27c 100644
--- a/pkgs/applications/misc/sweethome3d/editors.nix
+++ b/pkgs/applications/misc/sweethome3d/editors.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, fetchcvs, makeWrapper, makeDesktopItem, jdk, jre, ant
-, gtk3, gsettings-desktop-schemas, p7zip, sweethome3dApp }:
+{ stdenv, fetchcvs, makeWrapper, makeDesktopItem, jdk, jre, ant
+, gtk3, gsettings-desktop-schemas, sweethome3dApp }:
 
 let
 
diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix
index ee3cb9cd8ed4..5f12bdb4dfcd 100644
--- a/pkgs/applications/misc/synergy/default.nix
+++ b/pkgs/applications/misc/synergy/default.nix
@@ -1,7 +1,6 @@
-{ stdenv, fetchFromGitHub, fetchpatch, cmake, xlibsWrapper, libX11, libXi, libXtst, libXrandr
-, xinput, curl, openssl, unzip }:
-
-with stdenv.lib;
+{ stdenv, lib, fetchFromGitHub, fetchpatch, fetchurl, cmake, xlibsWrapper
+, ApplicationServices, Carbon, Cocoa, CoreServices, ScreenSaver
+, libX11, libXi, libXtst, libXrandr, xinput, curl, openssl, unzip }:
 
 stdenv.mkDerivation rec {
   name = "synergy-${version}";
@@ -14,17 +13,33 @@ stdenv.mkDerivation rec {
     sha256 = "0ksgr9hkf09h54572p7k7b9zkfhcdb2g2d5x7ixxn028y8i3jyp3";
   };
 
-  patches = [ ./openssl-1.1.patch ];
+  patches = [./openssl-1.1.patch ./update_gtest_gmock.patch
+  ] ++ lib.optional stdenv.isDarwin ./respect_macos_arch.patch;
 
   patch_gcc6 = fetchpatch {
     url = https://raw.githubusercontent.com/gentoo/gentoo/20e2bff3697ebf5f291e9907b34aae3074a36b53/dev-cpp/gmock/files/gmock-1.7.0-gcc6.patch;
     sha256 = "0j3f381x1lf8qci9pfv6mliggl8qs2w05v5lw3rs3gn7aibg174d";
   };
 
+  # Due to the included gtest and gmock not supporting clang
+  # we replace it with 1.7.0 for synergy-1.8.8. This should
+  # become unnecessary when we update to a newer version of Synergy.
+  gmock_zip = fetchurl {
+    url = https://github.com/google/googlemock/archive/release-1.7.0.zip;
+    sha256 = "11bd04098rzamv7f9y01zaf9c8zrmzdk6g1qrlwq780pxzlr4ya0";
+  };
+
+  gtest_zip = fetchurl {
+    url = https://github.com/google/googletest/archive/release-1.7.0.zip;
+    sha256 = "1l5n6kzdypjzjrz2jh14ylzrx735lccfx2p3s4ccgci8g9abg35m";
+  };
+
   postPatch = ''
-    ${unzip}/bin/unzip -d ext/gmock-1.6.0 ext/gmock-1.6.0.zip
-    ${unzip}/bin/unzip -d ext/gtest-1.6.0 ext/gtest-1.6.0.zip
-    patch -d ext/gmock-1.6.0 -p1 -i ${patch_gcc6}
+    ${unzip}/bin/unzip -d ext/ ${gmock_zip}
+    ${unzip}/bin/unzip -d ext/ ${gtest_zip}
+    mv ext/googlemock-release-1.7.0 ext/gmock-1.7.0
+    mv ext/googletest-release-1.7.0 ext/gtest-1.7.0
+    patch -d ext/gmock-1.7.0 -p1 -i ${patch_gcc6}
   ''
     # We have XRRNotifyEvent (libXrandr), but with the upstream CMakeLists.txt
     # it's not able to find it (it's trying to search the store path of libX11
@@ -38,15 +53,19 @@ stdenv.mkDerivation rec {
     #   Looking for XRRNotifyEvent - not found
     #
     # So let's force it:
-  + optionalString stdenv.isLinux ''
+  + lib.optionalString stdenv.isLinux ''
     sed -i -e '/HAVE_X11_EXTENSIONS_XRANDR_H/c \
       set(HAVE_X11_EXTENSIONS_XRANDR_H true)
     ' CMakeLists.txt
   '';
 
+  cmakeFlags = lib.optionals stdenv.isDarwin [ "-DOSX_TARGET_MAJOR=10" "-DOSX_TARGET_MINOR=7" ];
+
   buildInputs = [
-    cmake xlibsWrapper libX11 libXi libXtst libXrandr xinput curl openssl
-  ];
+    cmake curl openssl
+  ] ++ lib.optionals stdenv.isDarwin [
+    ApplicationServices Carbon Cocoa CoreServices ScreenSaver
+  ] ++ lib.optionals stdenv.isLinux [ xlibsWrapper libX11 libXi libXtst libXrandr xinput ];
 
   installPhase = ''
     mkdir -p $out/bin
@@ -58,12 +77,11 @@ stdenv.mkDerivation rec {
   doCheck = true;
   checkPhase = "../bin/unittests";
 
-  meta = {
+  meta = with lib; {
     description = "Share one mouse and keyboard between multiple computers";
     homepage = http://synergy-project.org/;
     license = licenses.gpl2;
-    maintainers = [ maintainers.aszlig ];
+    maintainers = with maintainers; [ aszlig enzime ];
     platforms = platforms.all;
-    broken = stdenv.isDarwin;
   };
 }
diff --git a/pkgs/applications/misc/synergy/respect_macos_arch.patch b/pkgs/applications/misc/synergy/respect_macos_arch.patch
new file mode 100644
index 000000000000..003d7d22421a
--- /dev/null
+++ b/pkgs/applications/misc/synergy/respect_macos_arch.patch
@@ -0,0 +1,61 @@
+From 944177c76d4c7ff5ef3460eab28286a45344a0e7 Mon Sep 17 00:00:00 2001
+From: Michael Hoang <enzime@users.noreply.github.com>
+Date: Sat, 14 Jul 2018 21:56:59 +1000
+Subject: [PATCH 2/2] Make sure CMake respects the current arch on macOS
+
+Only set the macOS architecture if not defined by the user. Use the
+OpenSSL libraries and headers from Nix on macOS to prevent architecture
+mismatches.
+---
+ CMakeLists.txt     |  2 +-
+ src/CMakeLists.txt | 14 +-------------
+ 2 files changed, 2 insertions(+), 14 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2f37424d..c7217e28 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -172,7 +172,7 @@ if (UNIX)
+ 			# <= 10.5: 32-bit Intel and PowerPC
+ 			set(CMAKE_OSX_ARCHITECTURES "ppc;i386"
+ 				CACHE STRING "" FORCE)
+-		else()
++		elseif (NOT CMAKE_OSX_ARCHITECTURES)
+ 			# >= 10.6: Intel only
+ 			set(CMAKE_OSX_ARCHITECTURES "i386"
+ 				CACHE STRING "" FORCE)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 237ba484..04428636 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -23,11 +23,6 @@ if (WIN32)
+ 	set(OPENSSL_INCLUDE ${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/inc32)
+ endif()
+ 
+-if (APPLE)
+-	set(OPENSSL_PLAT_DIR openssl-osx)
+-	set(OPENSSL_INCLUDE ${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/include)
+-endif()
+-
+ if (WIN32)
+ 	set(OPENSSL_LIBS
+ 		${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/out32dll/libeay32.lib
+@@ -36,14 +31,7 @@ if (WIN32)
+ endif()
+ 
+ if (UNIX)
+-	if (APPLE)
+-		set(OPENSSL_LIBS
+-		${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/libssl.a
+-		${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/libcrypto.a
+-		)
+-	else()
+-		set(OPENSSL_LIBS ssl crypto)
+-	endif()
++	set(OPENSSL_LIBS ssl crypto)
+ endif()
+ 
+ add_subdirectory(lib)
+-- 
+2.17.1
+
diff --git a/pkgs/applications/misc/synergy/update_gtest_gmock.patch b/pkgs/applications/misc/synergy/update_gtest_gmock.patch
new file mode 100644
index 000000000000..87b53e78585b
--- /dev/null
+++ b/pkgs/applications/misc/synergy/update_gtest_gmock.patch
@@ -0,0 +1,158 @@
+From eea85dbf4bbde545d8cb07d7ee9fbdca3dcf48fd Mon Sep 17 00:00:00 2001
+From: Michael Hoang <enzime@users.noreply.github.com>
+Date: Sat, 14 Jul 2018 22:07:39 +1000
+Subject: [PATCH 1/2] Update gtest and gmock to version 1.7.0
+
+Fixes compilation under clang on macOS as <tr1/tuple> is now found under
+<tuple>.
+---
+ CMakeLists.txt                     |  2 +-
+ ext/toolchain/commands1.py         |  4 ++--
+ src/lib/platform/CMakeLists.txt    |  2 +-
+ src/lib/server/CMakeLists.txt      |  2 +-
+ src/lib/shared/CMakeLists.txt      |  2 +-
+ src/lib/synergy/CMakeLists.txt     |  2 +-
+ src/test/CMakeLists.txt            | 12 ++++++------
+ src/test/integtests/CMakeLists.txt |  4 ++--
+ src/test/unittests/CMakeLists.txt  |  4 ++--
+ 9 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 94c474e8..2f37424d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -178,7 +178,7 @@ if (UNIX)
+ 				CACHE STRING "" FORCE)
+ 		endif()
+ 		
+-		set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1")
++		set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS}")
+ 
+ 		find_library(lib_ScreenSaver ScreenSaver)
+ 		find_library(lib_IOKit IOKit)
+diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py
+index f32ec483..bf997cf6 100644
+--- a/ext/toolchain/commands1.py
++++ b/ext/toolchain/commands1.py
+@@ -251,10 +251,10 @@ class InternalCommands:
+ 	macIdentity = None
+ 	
+ 	# gtest dir with version number
+-	gtestDir = 'gtest-1.6.0'
++	gtestDir = 'gtest-1.7.0'
+ 	
+ 	# gmock dir with version number
+-	gmockDir = 'gmock-1.6.0'
++	gmockDir = 'gmock-1.7.0'
+ 
+ 	win32_generators = {
+ 		1 : VisualStudioGenerator('10'),
+diff --git a/src/lib/platform/CMakeLists.txt b/src/lib/platform/CMakeLists.txt
+index 481d8ef9..1ce67eca 100644
+--- a/src/lib/platform/CMakeLists.txt
++++ b/src/lib/platform/CMakeLists.txt
+@@ -31,7 +31,7 @@ endif()
+ 
+ include_directories(
+ 	../
+-	../../../ext/gtest-1.6.0/include
++	../../../ext/gtest-1.7.0/include
+ )
+ 
+ if (UNIX)
+diff --git a/src/lib/server/CMakeLists.txt b/src/lib/server/CMakeLists.txt
+index 3cb582ec..0525d627 100644
+--- a/src/lib/server/CMakeLists.txt
++++ b/src/lib/server/CMakeLists.txt
+@@ -24,7 +24,7 @@ endif()
+ include_directories(
+ 	../
+ 	../../../ext
+-	../../../ext/gtest-1.6.0/include
++	../../../ext/gtest-1.7.0/include
+ )
+ 
+ if (UNIX)
+diff --git a/src/lib/shared/CMakeLists.txt b/src/lib/shared/CMakeLists.txt
+index 891f4aa7..16c8b04a 100644
+--- a/src/lib/shared/CMakeLists.txt
++++ b/src/lib/shared/CMakeLists.txt
+@@ -25,7 +25,7 @@ add_library(shared STATIC ${sources})
+ include_directories(
+ 	../
+ 	../../../ext
+-	../../../ext/gtest-1.6.0/include
++	../../../ext/gtest-1.7.0/include
+ )
+ 
+ target_link_libraries(shared arch base)
+diff --git a/src/lib/synergy/CMakeLists.txt b/src/lib/synergy/CMakeLists.txt
+index 0972be8c..e19fcce5 100644
+--- a/src/lib/synergy/CMakeLists.txt
++++ b/src/lib/synergy/CMakeLists.txt
+@@ -36,7 +36,7 @@ endif()
+ include_directories(
+ 	../
+ 	../../../ext
+-	../../../ext/gtest-1.6.0/include
++	../../../ext/gtest-1.7.0/include
+ )
+ 
+ if (UNIX)
+diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
+index 8812150a..04cdfc50 100644
+--- a/src/test/CMakeLists.txt
++++ b/src/test/CMakeLists.txt
+@@ -15,13 +15,13 @@
+ # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ 
+ include_directories(
+-	../../ext/gtest-1.6.0
+-	../../ext/gtest-1.6.0/include
+-	../../ext/gmock-1.6.0
+-	../../ext/gmock-1.6.0/include)
++	../../ext/gtest-1.7.0
++	../../ext/gtest-1.7.0/include
++	../../ext/gmock-1.7.0
++	../../ext/gmock-1.7.0/include)
+ 	
+-add_library(gtest STATIC ../../ext/gtest-1.6.0/src/gtest-all.cc)
+-add_library(gmock STATIC ../../ext/gmock-1.6.0/src/gmock-all.cc)
++add_library(gtest STATIC ../../ext/gtest-1.7.0/src/gtest-all.cc)
++add_library(gmock STATIC ../../ext/gmock-1.7.0/src/gmock-all.cc)
+ 
+ if (UNIX)
+ 	# ignore warnings in gtest and gmock
+diff --git a/src/test/integtests/CMakeLists.txt b/src/test/integtests/CMakeLists.txt
+index 2f1ca7f3..6ddbd29a 100644
+--- a/src/test/integtests/CMakeLists.txt
++++ b/src/test/integtests/CMakeLists.txt
+@@ -56,8 +56,8 @@ endif()
+ include_directories(
+ 	../../
+ 	../../lib/
+-	../../../ext/gtest-1.6.0/include
+-	../../../ext/gmock-1.6.0/include
++	../../../ext/gtest-1.7.0/include
++	../../../ext/gmock-1.7.0/include
+ )
+ 
+ if (UNIX)
+diff --git a/src/test/unittests/CMakeLists.txt b/src/test/unittests/CMakeLists.txt
+index 3e49dc3c..5f6c4fac 100644
+--- a/src/test/unittests/CMakeLists.txt
++++ b/src/test/unittests/CMakeLists.txt
+@@ -51,8 +51,8 @@ list(APPEND headers ${platform_sources})
+ include_directories(
+ 	../../
+ 	../../lib/
+-	../../../ext/gtest-1.6.0/include
+-	../../../ext/gmock-1.6.0/include
++	../../../ext/gtest-1.7.0/include
++	../../../ext/gmock-1.7.0/include
+ 	../../../ext
+ )
+ 
+-- 
+2.17.1
+
diff --git a/pkgs/applications/misc/tasksh/default.nix b/pkgs/applications/misc/tasksh/default.nix
index 1e51ba22ddc3..dac447edd7d2 100644
--- a/pkgs/applications/misc/tasksh/default.nix
+++ b/pkgs/applications/misc/tasksh/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, libuuid, gnutls, readline }:
+{ stdenv, fetchurl, cmake, readline }:
 
 stdenv.mkDerivation rec {
   name = "tasksh-${version}";
diff --git a/pkgs/applications/misc/terminus/default.nix b/pkgs/applications/misc/terminus/default.nix
index d2a2936680f9..6df81aa11729 100644
--- a/pkgs/applications/misc/terminus/default.nix
+++ b/pkgs/applications/misc/terminus/default.nix
@@ -2,13 +2,13 @@
 , freetype, fontconfig, dbus, libXi, libXcursor, libXdamage, libXrandr
 , libXcomposite, libXext, libXfixes, libXrender, libX11, libXtst, libXScrnSaver
 , libxcb, makeWrapper, nodejs
-, nss, nspr, alsaLib, cups, expat, libudev, libpulseaudio }:
+, nss, nspr, alsaLib, cups, expat, udev, libpulseaudio }:
 
 let
   libPath = stdenv.lib.makeLibraryPath [
     stdenv.cc.cc gtk2 atk glib pango gdk_pixbuf cairo freetype fontconfig dbus
     libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes libxcb
-    libXrender libX11 libXtst libXScrnSaver gnome3.gconf nss nspr alsaLib cups expat libudev libpulseaudio
+    libXrender libX11 libXtst libXScrnSaver gnome3.gconf nss nspr alsaLib cups expat udev libpulseaudio
   ];
 in
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/misc/termite/add_errno_header.patch b/pkgs/applications/misc/termite/add_errno_header.patch
new file mode 100644
index 000000000000..81283f86a21d
--- /dev/null
+++ b/pkgs/applications/misc/termite/add_errno_header.patch
@@ -0,0 +1,24 @@
+From 95c90f302c384f410dc92e64468ac7061b57fe2d Mon Sep 17 00:00:00 2001
+From: Michael Hoang <enzime@users.noreply.github.com>
+Date: Fri, 13 Jul 2018 19:03:09 +1000
+Subject: [PATCH] Add errno.h header which isn't always included automatically.
+
+---
+ termite.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/termite.cc b/termite.cc
+index 160fe82..13e2572 100644
+--- a/termite.cc
++++ b/termite.cc
+@@ -21,6 +21,7 @@
+ #include <cstdlib>
+ #include <cstring>
+ #include <cmath>
++#include <errno.h>
+ #include <functional>
+ #include <limits>
+ #include <map>
+-- 
+2.17.1
+
diff --git a/pkgs/applications/misc/termite/default.nix b/pkgs/applications/misc/termite/default.nix
index 46276bbb03fb..560dff594275 100644
--- a/pkgs/applications/misc/termite/default.nix
+++ b/pkgs/applications/misc/termite/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, pkgconfig, vte, gtk3, ncurses, makeWrapper, wrapGAppsHook, symlinkJoin
+{ stdenv, fetchFromGitHub, lib, pkgconfig, vte, gtk3, ncurses, makeWrapper, wrapGAppsHook, symlinkJoin
 , configFile ? null
 }:
 
@@ -7,16 +7,17 @@ let
   termite = stdenv.mkDerivation {
     name = "termite-${version}";
 
-    src = fetchgit {
-      url = "https://github.com/thestinger/termite";
-      rev = "refs/tags/v${version}";
+    src = fetchFromGitHub {
+      owner = "thestinger";
+      repo = "termite";
+      rev = "v${version}";
       sha256 = "02cn70ygl93ghhkhs3xdxn5b1yadc255v3yp8cmhhyzsv5027hvj";
+      fetchSubmodules = true;
     };
 
     # https://github.com/thestinger/termite/pull/516
-    patches = [ ./url_regexp_trailing.patch ];
-
-    postPatch = "sed '1i#include <math.h>' -i termite.cc";
+    patches = [ ./url_regexp_trailing.patch ./add_errno_header.patch
+                ] ++ lib.optional stdenv.isDarwin ./remove_ldflags_macos.patch;
 
     makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
 
diff --git a/pkgs/applications/misc/termite/remove_ldflags_macos.patch b/pkgs/applications/misc/termite/remove_ldflags_macos.patch
new file mode 100644
index 000000000000..f8c68518bb4d
--- /dev/null
+++ b/pkgs/applications/misc/termite/remove_ldflags_macos.patch
@@ -0,0 +1,25 @@
+From 1b5a6934635c55472eb7949bd87ab3f45fa1b2f3 Mon Sep 17 00:00:00 2001
+From: Michael Hoang <enzime@users.noreply.github.com>
+Date: Fri, 13 Jul 2018 19:01:51 +1000
+Subject: [PATCH] Remove --as-needed flag from ld to fix compilation on macOS.
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index b115f42..ab301ba 100644
+--- a/Makefile
++++ b/Makefile
+@@ -29,7 +29,7 @@ ifeq (${CXX}, clang++)
+ 	CXXFLAGS += -Wimplicit-fallthrough
+ endif
+ 
+-LDFLAGS := -s -Wl,--as-needed ${LDFLAGS}
++LDFLAGS := -s -Wl ${LDFLAGS}
+ LDLIBS := ${shell pkg-config --libs ${GTK} ${VTE}}
+ 
+ termite: termite.cc url_regex.hh util/clamp.hh util/maybe.hh util/memory.hh
+-- 
+2.17.1
+
diff --git a/pkgs/applications/misc/tilix/default.nix b/pkgs/applications/misc/tilix/default.nix
index 1cc03b4cd426..f30c6a639489 100644
--- a/pkgs/applications/misc/tilix/default.nix
+++ b/pkgs/applications/misc/tilix/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, dmd, gnome3, dbus
-, gsettings-desktop-schemas, libsecret, desktop-file-utils, gettext, gtkd
+, gsettings-desktop-schemas, desktop-file-utils, gettext, gtkd
 , perlPackages, wrapGAppsHook, xdg_utils }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/misc/timewarrior/default.nix b/pkgs/applications/misc/timewarrior/default.nix
index 9aca45264af3..ff3caec29644 100644
--- a/pkgs/applications/misc/timewarrior/default.nix
+++ b/pkgs/applications/misc/timewarrior/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, libuuid, gnutls }:
+{ stdenv, fetchurl, cmake }:
 
 stdenv.mkDerivation rec {
   name = "timewarrior-${version}";
diff --git a/pkgs/applications/misc/tqsl/default.nix b/pkgs/applications/misc/tqsl/default.nix
index b41f5c9a0a70..f001cbcaab92 100644
--- a/pkgs/applications/misc/tqsl/default.nix
+++ b/pkgs/applications/misc/tqsl/default.nix
@@ -1,12 +1,5 @@
 { stdenv, fetchurl, makeWrapper, cmake, expat, openssl, zlib, db, curl, wxGTK }:
 
-let
-  lib_suffix =
-  if stdenv.system == "x86_64-linux" then
-    "64"
-  else
-    "";
-in
 stdenv.mkDerivation rec {
   name = "tqsl-${version}";
   version = "2.3.1";
diff --git a/pkgs/applications/misc/truecrypt/default.nix b/pkgs/applications/misc/truecrypt/default.nix
index 9df2a2dde765..48e0d19e20b9 100644
--- a/pkgs/applications/misc/truecrypt/default.nix
+++ b/pkgs/applications/misc/truecrypt/default.nix
@@ -40,7 +40,7 @@ library, use the 'NOGUI' parameter:
    $ make NOGUI=1
 */
 
-{ fetchurl, stdenv, pkgconfig, nasm, fuse, wxGTK, devicemapper,
+{ fetchurl, stdenv, pkgconfig, nasm, fuse, wxGTK, lvm2,
   wxGUI ? true
 }:
 
@@ -86,7 +86,7 @@ stdenv.mkDerivation {
   };
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ fuse devicemapper wxGTK nasm ];
+  buildInputs = [ fuse lvm2 wxGTK nasm ];
 
   meta = {
     description = "Free Open-Source filesystem on-the-fly encryption";
diff --git a/pkgs/applications/misc/twmn/default.nix b/pkgs/applications/misc/twmn/default.nix
index 297f3d0b5991..020aa963541e 100644
--- a/pkgs/applications/misc/twmn/default.nix
+++ b/pkgs/applications/misc/twmn/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, fetchgit, qtbase, qtx11extras, qmake, pkgconfig, boost }:
+{ stdenv, fetchgit, qtbase, qtx11extras, qmake, pkgconfig, boost }:
 
 stdenv.mkDerivation rec {
   name = "twmn-git-2014-09-23";
diff --git a/pkgs/applications/misc/veracrypt/default.nix b/pkgs/applications/misc/veracrypt/default.nix
index 1c5c4d1dcaac..bc5b19e77370 100644
--- a/pkgs/applications/misc/veracrypt/default.nix
+++ b/pkgs/applications/misc/veracrypt/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, pkgconfig, yasm, fuse, wxGTK30, devicemapper, makeself,
+{ fetchurl, stdenv, pkgconfig, yasm, fuse, wxGTK30, lvm2, makeself,
   wxGUI ? true
 }:
 
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
     '';
 
   nativeBuildInputs = [ makeself yasm pkgconfig ];
-  buildInputs = [ fuse devicemapper ]
+  buildInputs = [ fuse lvm2 ]
     ++ optional wxGUI wxGTK30;
   makeFlags = optionalString (!wxGUI) "NOGUI=1";
 
diff --git a/pkgs/applications/misc/wego/default.nix b/pkgs/applications/misc/wego/default.nix
index e59a3e989432..b61566af6b2c 100644
--- a/pkgs/applications/misc/wego/default.nix
+++ b/pkgs/applications/misc/wego/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
+{ stdenv, buildGoPackage, fetchgit }:
 
 buildGoPackage rec {
   name = "wego-${version}";
diff --git a/pkgs/applications/misc/welle-io/default.nix b/pkgs/applications/misc/welle-io/default.nix
index 27376f4db81c..410346bce9ad 100644
--- a/pkgs/applications/misc/welle-io/default.nix
+++ b/pkgs/applications/misc/welle-io/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildEnv, fetchFromGitHub, cmake, pkgconfig
+{ stdenv, fetchFromGitHub, cmake, pkgconfig
 , qtbase, qtcharts, qtmultimedia, qtquickcontrols, qtquickcontrols2
 , faad2, rtl-sdr, soapysdr-with-plugins, libusb, fftwSinglePrec }:
 let
diff --git a/pkgs/applications/misc/wikicurses/default.nix b/pkgs/applications/misc/wikicurses/default.nix
index 84f7d4fd2913..d8628b794d71 100644
--- a/pkgs/applications/misc/wikicurses/default.nix
+++ b/pkgs/applications/misc/wikicurses/default.nix
@@ -1,24 +1,16 @@
-{ stdenv, fetchurl, pythonPackages }:
+{ stdenv, fetchFromGitHub, pythonPackages }:
 
 pythonPackages.buildPythonApplication rec {
-  version = "1.3";
+  version = "1.4";
   name = "wikicurses-${version}";
 
-  src = fetchurl {
-    url = "http://github.com/ids1024/wikicurses/archive/v${version}.tar.gz";
-    sha256 = "1yxgafk1sczg1xi2p6nhrvr3hchp7ydw98n48lp3qzwnryn1kxv8";
+  src = fetchFromGitHub {
+    owner = "ids1024";
+    repo = "wikicurses";
+    rev = "v${version}";
+    sha256 = "0f14s4qx3q5pr5vn460c34b5mbz2xs62d8ljs3kic8gmdn8x2knm";
   };
 
-  patches = [
-    # This is necessary to build without a config file.
-    # It can be safely removed after updating to wikicurses to 1.4
-    # or when commit 4b944ac339312b642c6dc5d6b5a2f7be7503218f is included
-    (fetchurl {
-      url = "https://github.com/ids1024/wikicurses/commit/4b944ac339312b642c6dc5d6b5a2f7be7503218f.patch";
-      sha256 = "0ii4b0c4hb1zdhcpp4ij908mfy5b8khpm1l7xr7lp314lfhsg9as";
-    })
-  ];
-
   propagatedBuildInputs = with pythonPackages; [ urwid beautifulsoup4 lxml ];
 
   meta = {
@@ -26,6 +18,7 @@ pythonPackages.buildPythonApplication rec {
     homepage = https://github.com/ids1024/wikicurses/;
     license = stdenv.lib.licenses.mit;
     platforms = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ pSub ];
   };
 
 }
diff --git a/pkgs/applications/misc/wsjtx/default.nix b/pkgs/applications/misc/wsjtx/default.nix
index 311983e8f527..fd6be8f59201 100644
--- a/pkgs/applications/misc/wsjtx/default.nix
+++ b/pkgs/applications/misc/wsjtx/default.nix
@@ -1,15 +1,15 @@
 { stdenv, fetchurl, asciidoc, asciidoctor, autoconf, automake, cmake,
-  docbook_xsl, fftw, fftwFloat, gfortran, libtool, libpulseaudio, qtbase,
+  docbook_xsl, fftw, fftwFloat, gfortran, libtool, qtbase,
   qtmultimedia, qtserialport, texinfo, libusb1 }:
 
 stdenv.mkDerivation rec {
   name = "wsjtx-${version}";
-  version = "1.9.0";
+  version = "1.9.1";
 
   # This is a composite source tarball containing both wsjtx and a hamlib fork
   src = fetchurl {
     url = "http://physics.princeton.edu/pulsar/K1JT/wsjtx-${version}.tgz";
-    sha256 = "1qxwiylnykh37kw780hh9xfphzbj8ndpfqz4xazld16v3qx2g0jc";
+    sha256 = "143r17fri08mwz28g17wcfxy60h3xgfk46mln5lmdr9k6355aqqc";
   };
 
   # Hamlib builds with autotools, wsjtx builds with cmake
diff --git a/pkgs/applications/misc/xlog/default.nix b/pkgs/applications/misc/xlog/default.nix
new file mode 100644
index 000000000000..3ba7062b7bb1
--- /dev/null
+++ b/pkgs/applications/misc/xlog/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, glib, gtk2, pkgconfig, hamlib }:
+stdenv.mkDerivation rec {
+  name = "xlog-${version}";
+  version = "2.0.15";
+  
+  src = fetchurl {
+    url = "http://download.savannah.gnu.org/releases/xlog/${name}.tar.gz";
+    sha256 = "0an883wqw3zwpw8nqinm9cb17hp2xw9vf603k4l2345p61jqdw2j";
+  };
+
+  buildInputs = [ glib pkgconfig gtk2 hamlib ];
+
+  meta = with stdenv.lib; {
+    description = "An amateur radio logging program";
+    longDescription =
+      '' Xlog is an amateur radio logging program.
+         It supports cabrillo, ADIF, trlog (format also used by tlf),
+         and EDI (ARRL VHF/UHF contest format) and can import twlog, editest and OH1AA logbook files.
+         Xlog is able to do DXCC lookups and will display country information, CQ and ITU zone,
+         location in latitude and longitude and distance and heading in kilometers or miles,
+         both for short and long path. 
+      '';
+    homepage = http://www.nongnu.org/xlog;
+    maintainers = [ maintainers.mafo ];
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+  };
+
+}
diff --git a/pkgs/applications/misc/xmr-stak/default.nix b/pkgs/applications/misc/xmr-stak/default.nix
index 05530af12547..b98d10efdee1 100644
--- a/pkgs/applications/misc/xmr-stak/default.nix
+++ b/pkgs/applications/misc/xmr-stak/default.nix
@@ -1,5 +1,5 @@
 { stdenv, stdenvGcc6, lib
-, fetchFromGitHub, cmake, libuv, libmicrohttpd, openssl
+, fetchFromGitHub, cmake, libmicrohttpd, openssl
 , opencl-headers, ocl-icd, hwloc, cudatoolkit
 , devDonationLevel ? "0.0"
 , cudaSupport ? false
@@ -12,13 +12,13 @@ in
 
 stdenv'.mkDerivation rec {
   name = "xmr-stak-${version}";
-  version = "2.4.5";
+  version = "2.4.7";
 
   src = fetchFromGitHub {
     owner = "fireice-uk";
     repo = "xmr-stak";
     rev = "${version}";
-    sha256 = "0ix4vqhcm4x9j5p6pwdfwkm2ml6wmwsyn3ppzvxllhp4dj8blzwf";
+    sha256 = "072gapchmd05ir5ygrvbgdhpjhm7pdjyl61n1ykxzvnvi81z6817";
   };
 
   NIX_CFLAGS_COMPILE = "-O3";
diff --git a/pkgs/applications/misc/xmrig/default.nix b/pkgs/applications/misc/xmrig/default.nix
index 340d84fd2aaf..f61cbf397597 100644
--- a/pkgs/applications/misc/xmrig/default.nix
+++ b/pkgs/applications/misc/xmrig/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   name = "xmrig-${version}";
-  version = "2.6.3";
+  version = "2.6.4";
 
   src = fetchFromGitHub {
     owner = "xmrig";
     repo = "xmrig";
     rev = "v${version}";
-    sha256 = "1ssiq2yv8b3xg4kfp2cfzl41m5apjw2r2k74lh3fz0g0ix3cq55b";
+    sha256 = "1c68qg7433chri6q1yhyggy4mbq2vnn3p2fxs8gqmgij9vpqn3m2";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/applications/misc/xmrig/proxy.nix b/pkgs/applications/misc/xmrig/proxy.nix
index aacf71e17b6c..c013a9cc44ec 100644
--- a/pkgs/applications/misc/xmrig/proxy.nix
+++ b/pkgs/applications/misc/xmrig/proxy.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   name = "xmrig-proxy-${version}";
-  version = "2.6.3";
+  version = "2.6.4";
 
   src = fetchFromGitHub {
     owner = "xmrig";
     repo = "xmrig-proxy";
     rev = "v${version}";
-    sha256 = "1f573shf0qv1kh0sb9sljagpb2q1rn8h7qc1hxlb5nlchs9qcnnn";
+    sha256 = "0h6ihrrkgwi8k642iqq13qx3zlxl9r8q7wm417hb7j35rnmwn8lq";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/applications/misc/xneur/0.8.nix b/pkgs/applications/misc/xneur/0.8.nix
deleted file mode 100644
index 897c861e40a1..000000000000
--- a/pkgs/applications/misc/xneur/0.8.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, pcre, gstreamer, glib, libxml2, aspell
-, imlib2, xorg, xosd }:
-
-stdenv.mkDerivation {
-  name = "xneur-0.8.0";
-  
-  src = fetchurl {
-    url = https://dists.xneur.ru/release-0.8.0/tgz/xneur-0.8.0.tar.bz2;
-    sha256 = "1f05bm4vqdrlm8rxwgqv89k5lhc236xg841aw4snw514g0hi2sl8";
-  };
-
-  buildInputs =
-    [ xorg.libX11 pkgconfig pcre gstreamer glib libxml2 aspell
-      xorg.libXpm imlib2 xosd xorg.libXt xorg.libXext
-    ];
-
-  preConfigure = ''
-    sed -e 's/-Werror//' -i configure
-    sed -e 's@for aspell_dir in@for aspell_dir in ${aspell} @' -i configure
-    sed -e 's@for imlib2_dir in@for imlib2_dir in ${imlib2} @' -i configure
-    sed -e 's@for xosd_dir in@for xosd_dir in ${xosd} @' -i configure
-  '';
-
-  meta = {
-    description = "Utility for switching between keyboard layouts";
-    platforms = stdenv.lib.platforms.linux;
-  };
-
-}
diff --git a/pkgs/applications/misc/xneur/default.nix b/pkgs/applications/misc/xneur/default.nix
index ff7c6a9e9767..c6438a21f2c3 100644
--- a/pkgs/applications/misc/xneur/default.nix
+++ b/pkgs/applications/misc/xneur/default.nix
@@ -1,44 +1,35 @@
-{ stdenv, fetchurl, pkgconfig, xorg, pcre, gstreamer, glib, libxml2
-, aspell, cairo, imlib2, xosd, libnotify, gtk2, pango, atk, enchant,
- gdk_pixbuf}:
-
-let s = import ./src-for-default.nix; in
+{ stdenv, fetchurl, pkgconfig, intltool, xorg, pcre, gst_all_1, glib
+, xosd, libnotify, enchant, wrapGAppsHook, gdk_pixbuf }:
 
 stdenv.mkDerivation rec {
-  inherit (s) version name;
+   name = "xneur-${version}";
+   version = "0.20.0";
+
   src = fetchurl {
-    inherit(s) url;
-    sha256 = s.hash;
+    url = "https://github.com/AndrewCrewKuznetsov/xneur-devel/raw/f66723feb272c68f7c22a8bf0dbcafa5e3a8a5ee/dists/0.20.0/xneur_0.20.0.orig.tar.gz";
+    sha256 = "1lg3qpi9pkx9f5xvfc8yf39wwc98f769yb7i2438vqn66kla1xpr";
   };
 
-  buildInputs =
-    [ xorg.libX11 pkgconfig pcre gstreamer glib libxml2 aspell cairo
-      xorg.libXpm imlib2 xosd xorg.libXt xorg.libXext xorg.libXi libnotify
-      gtk2 pango enchant gdk_pixbuf
-    ];
+  nativeBuildInputs = [
+    pkgconfig intltool wrapGAppsHook
+  ];
 
-  preConfigure = ''
-    sed -e 's/-Werror//' -i configure
-    sed -e 's@for aspell_dir in@for aspell_dir in ${aspell} @' -i configure
-    sed -e 's@for imlib2_dir in@for imlib2_dir in ${imlib2} @' -i configure
-    sed -e 's@for xosd_dir in@for xosd_dir in ${xosd} @' -i configure
+  buildInputs = [
+    xorg.libX11 xorg.libXtst pcre gst_all_1.gstreamer glib
+    xosd xorg.libXext xorg.libXi libnotify
+    enchant gdk_pixbuf
+    gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good
+  ];
 
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk2.dev}/include/gtk-2.0"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk2.out}/lib/gtk-2.0/include"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${cairo.dev}/include/cairo"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pango.dev}/include/pango-1.0"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${atk.dev}/include/atk-1.0"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf.dev}/include/gdk-pixbuf-2.0"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf.out}/lib/gdk-pixbuf-2.0/include"
-
-    export NIX_LDFLAGS="$NIX_LDFLAGS -lnotify"
+  postPatch = ''
+    sed -e 's@for xosd_dir in@for xosd_dir in ${xosd} @' -i configure
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Utility for switching between keyboard layouts";
     homepage = https://xneur.ru;
-    license = stdenv.lib.licenses.gpl2Plus;
-    maintainers = [ stdenv.lib.maintainers.raskin ];
-    platforms = stdenv.lib.platforms.linux;
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.raskin ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/misc/xneur/src-for-default.nix b/pkgs/applications/misc/xneur/src-for-default.nix
deleted file mode 100644
index a7db13bd81d1..000000000000
--- a/pkgs/applications/misc/xneur/src-for-default.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-rec {
-   version="0.13.0";
-   name="xneur-0.13.0";
-   hash="19z8nnfj9paf877k0nrqy6dih69l81svxymqg6llh7ndgkw20hgd";
-   url="http://dists.xneur.ru/release-${version}/tgz/xneur-${version}.tar.bz2";
-   advertisedUrl="http://dists.xneur.ru/release-0.13.0/tgz/xneur-0.13.0.tar.bz2";
-  
-  
-}
diff --git a/pkgs/applications/misc/xneur/src-info-for-default.nix b/pkgs/applications/misc/xneur/src-info-for-default.nix
deleted file mode 100644
index 0de3e83baf71..000000000000
--- a/pkgs/applications/misc/xneur/src-info-for-default.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  downloadPage = "http://xneur.ru/downloads";
-  baseName = "xneur";
-  versionReferenceCreator = "$(replaceAllVersionOccurences)";
-}
diff --git a/pkgs/applications/misc/xscope/default.nix b/pkgs/applications/misc/xscope/default.nix
new file mode 100644
index 000000000000..28ce4a0d500d
--- /dev/null
+++ b/pkgs/applications/misc/xscope/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, pkgconfig, libXt }:
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "xscope";
+  version = "1.4.1";
+
+  src = fetchurl {
+    url = "mirror://xorg/individual/app/${name}.tar.bz2";
+    sha256 = "08zl3zghvbcqy0r5dn54dim84lp52s0ygrr87jr3a942a6ypz01k";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libXt ];
+
+  meta = with stdenv.lib; {
+    description = "program to monitor X11/Client conversations";
+    homepage = https://cgit.freedesktop.org/xorg/app/xscope/;
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ ];
+    platforms = with platforms; unix;
+  };
+}
+
diff --git a/pkgs/applications/misc/yarssr/default.nix b/pkgs/applications/misc/yarssr/default.nix
index cadf5ccb6a48..2c569b7d6816 100644
--- a/pkgs/applications/misc/yarssr/default.nix
+++ b/pkgs/applications/misc/yarssr/default.nix
@@ -1,6 +1,6 @@
 {
 fetchFromGitHub, stdenv, lib,
-autoreconfHook, intltool, pkgconfig, makeWrapper, pkgs,
+makeWrapper, pkgs,
 perl, perlPackages,
 gnome2 }:
 
diff --git a/pkgs/applications/misc/yubioath-desktop/default.nix b/pkgs/applications/misc/yubioath-desktop/default.nix
index 300281761a4d..8843c821ffb4 100644
--- a/pkgs/applications/misc/yubioath-desktop/default.nix
+++ b/pkgs/applications/misc/yubioath-desktop/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl,  python27Packages, swig, gettext, pcsclite, qt48Full, yubikey-personalization }:
+{ stdenv, fetchurl,  python27Packages, pcsclite, yubikey-personalization }:
 
 python27Packages.buildPythonApplication rec {
     namePrefix = "";
@@ -18,7 +18,7 @@ python27Packages.buildPythonApplication rec {
 
     # Need LD_PRELOAD for libykpers as the Nix cpython disables ctypes.cdll.LoadLibrary
     # support that the yubicommon library uses to load libykpers
-    makeWrapperArgs = ''--prefix LD_LIBRARY_PATH : "${pcsclite}/lib:${yubikey-personalization}/lib" --prefix LD_PRELOAD : "${yubikey-personalization}/lib/libykpers-1.so"'';
+    makeWrapperArgs = ''--prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" --prefix LD_PRELOAD : "${yubikey-personalization}/lib/libykpers-1.so"'';
 
     postInstall = ''
       mkdir -p $out/share/applications
diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix
index 415995a828d6..001d70775d6d 100644
--- a/pkgs/applications/misc/zathura/core/default.nix
+++ b/pkgs/applications/misc/zathura/core/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, meson, ninja, makeWrapper, pkgconfig
 , appstream-glib, desktop-file-utils, python3
-, gtk, girara, ncurses, gettext, libxml2
+, gtk, girara, gettext, libxml2
 , file, sqlite, glib, texlive, libintl, libseccomp
 , gtk-mac-integration, synctexSupport ? true
 }:
diff --git a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix
index 86fe453465a5..9d86dfe4a445 100644
--- a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix
+++ b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix
@@ -1,6 +1,5 @@
 { stdenv, lib, meson, ninja, fetchurl, pkgconfig, zathura_core, cairo,
-gtk-mac-integration, girara, mupdf, openssl , libjpeg, jbig2dec,
-openjpeg, fetchpatch }:
+gtk-mac-integration, girara, mupdf }:
 
 stdenv.mkDerivation rec {
   version = "0.3.3";
diff --git a/pkgs/applications/misc/zscroll/default.nix b/pkgs/applications/misc/zscroll/default.nix
index 92d173807f90..18876cf355b8 100644
--- a/pkgs/applications/misc/zscroll/default.nix
+++ b/pkgs/applications/misc/zscroll/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, python3, python3Packages, fetchFromGitHub }:
+{ stdenv, python3, python3Packages, fetchFromGitHub }:
 
 let version = "1.0"; in