about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/audio/audacity/default.nix21
-rw-r--r--pkgs/applications/networking/instant-messengers/riot/riot-web.nix4
-rw-r--r--pkgs/applications/networking/p2p/tribler/default.nix16
-rw-r--r--pkgs/applications/science/logic/mcrl2/default.nix4
-rw-r--r--pkgs/development/compilers/dmd/2.067.1.nix1
-rw-r--r--pkgs/development/compilers/dmd/default.nix2
-rw-r--r--pkgs/development/compilers/ispc/default.nix12
-rw-r--r--pkgs/development/compilers/shaderc/default.nix1
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix11
-rw-r--r--pkgs/development/haskell-modules/lib.nix4
-rw-r--r--pkgs/development/libraries/fox/fox-1.6.nix9
-rw-r--r--pkgs/development/libraries/v8/3.30.33.nix6
-rw-r--r--pkgs/development/libraries/v8/4.5.nix145
-rw-r--r--pkgs/development/libraries/v8/default.nix2
-rw-r--r--pkgs/development/node-packages/default-v6.nix8
-rw-r--r--pkgs/development/python-modules/python-simple-hipchat/default.nix21
-rw-r--r--pkgs/development/python-modules/unicorn/default.nix23
-rw-r--r--pkgs/development/tools/glslviewer/default.nix23
-rwxr-xr-xpkgs/development/tools/misc/arm-frc-linux-gnueabi-binutils/default.nix2
-rw-r--r--pkgs/development/tools/profiling/oprofile/default.nix12
-rw-r--r--pkgs/misc/emulators/fs-uae/default.nix6
-rw-r--r--pkgs/misc/emulators/vice/default.nix24
-rw-r--r--pkgs/misc/emulators/zsnes/default.nix2
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.12.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.13.nix5
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.9.nix4
-rw-r--r--pkgs/servers/http/tomcat/default.nix12
-rw-r--r--pkgs/servers/openafs-client/default.nix7
-rw-r--r--pkgs/servers/plex/default.nix6
-rw-r--r--pkgs/servers/radarr/default.nix4
-rw-r--r--pkgs/tools/backup/borg/default.nix3
-rw-r--r--pkgs/tools/graphics/nifskope/default.nix6
-rw-r--r--pkgs/tools/graphics/nifskope/gcc-6.patch123
-rw-r--r--pkgs/tools/misc/fd/default.nix6
-rw-r--r--pkgs/tools/security/gnupg/22.nix3
-rw-r--r--pkgs/tools/security/pass/rofi-pass.nix4
-rw-r--r--pkgs/top-level/all-packages.nix34
-rw-r--r--pkgs/top-level/perl-packages.nix14
-rw-r--r--pkgs/top-level/python-packages.nix31
39 files changed, 334 insertions, 291 deletions
diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix
index 92e6adbaa965..3fb9faa26671 100644
--- a/pkgs/applications/audio/audacity/default.nix
+++ b/pkgs/applications/audio/audacity/default.nix
@@ -1,17 +1,18 @@
 { stdenv, fetchurl, wxGTK30, pkgconfig, file, gettext, gtk2, glib, zlib, perl, intltool,
   libogg, libvorbis, libmad, libjack2, lv2, lilv, serd, sord, sratom, suil, alsaLib, libsndfile, soxr, flac, lame, fetchpatch,
-  expat, libid3tag, ffmpeg, soundtouch /*, portaudio - given up fighting their portaudio.patch */
+  expat, libid3tag, ffmpeg, soundtouch, /*, portaudio - given up fighting their portaudio.patch */
+  autoconf, automake, libtool
   }:
 
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  version = "2.1.2";
+  version = "2.1.3";
   name = "audacity-${version}";
 
   src = fetchurl {
     url = "https://github.com/audacity/audacity/archive/Audacity-${version}.tar.gz";
-    sha256 = "1ggr6g0mk36rqj7ahsg8b0b1r9kphwajzvxgn43md263rm87n04h";
+    sha256 = "11mx7gb4dbqrgfp7hm0154x3m76ddnmhf2675q5zkxn7jc5qfc6b";
   };
   patches = [
     (fetchpatch {
@@ -20,19 +21,10 @@ stdenv.mkDerivation rec {
         + "/audacity-ffmpeg.patch?h=packages/audacity&id=0c1e35798d4d70692";
       sha256 = "19fr674mw844zmkp1476yigkcnmb6zyn78av64ccdwi3p68i00rf";
     })
-  ]
-    ++ optional (hasPrefix "gcc-6" stdenv.cc.cc.name)
-      (fetchpatch {
-        name = "gcc6.patch";
-        url = "https://github.com/audacity/audacity/commit/60f2322055756e8cacfe96530a12c63e9694482c.patch";
-        sha256 = "07jlxr8y7ap3nsblx3zh8v9rcx7ajbcfnvwzhwykmbwbsyirgqf2";
-      });
+  ];
 
   preConfigure = /* we prefer system-wide libs */ ''
-    mv lib-src lib-src-rm
-    mkdir lib-src
-    mv lib-src-rm/{Makefile*,lib-widget-extra,portaudio-v19,portmixer,portsmf,FileDialog,sbsms,libnyquist} lib-src/
-    rm -r lib-src-rm/
+    autoreconf -vi # use system libraries
 
     # we will get a (possibly harmless) warning during configure without this
     substituteInPlace configure \
@@ -63,6 +55,7 @@ stdenv.mkDerivation rec {
     pkgconfig file gettext wxGTK30 expat alsaLib
     libsndfile soxr libid3tag libjack2 lv2 lilv serd sord sratom suil gtk2
     ffmpeg libmad lame libvorbis flac soundtouch
+    autoconf automake libtool # for the preConfigure phase
   ]; #ToDo: detach sbsms
 
   enableParallelBuilding = true;
diff --git a/pkgs/applications/networking/instant-messengers/riot/riot-web.nix b/pkgs/applications/networking/instant-messengers/riot/riot-web.nix
index ea6ec1676ec8..c57fd4136897 100644
--- a/pkgs/applications/networking/instant-messengers/riot/riot-web.nix
+++ b/pkgs/applications/networking/instant-messengers/riot/riot-web.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name= "riot-web-${version}";
-  version = "0.12.2";
+  version = "0.12.3";
 
   src = fetchurl {
     url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz";
-    sha256 = "0zyddpnng1vjli12hn1hd0w99g6sfsk80dn2ll5h9276nc677pnh";
+    sha256 = "1v9k9rna9rziis5ld4x4lw3rhgm504cnnafiwk175jpjbbd8h4b3";
   };
 
   installPhase = ''
diff --git a/pkgs/applications/networking/p2p/tribler/default.nix b/pkgs/applications/networking/p2p/tribler/default.nix
index 8e99d5159f87..e5c0e30bce3a 100644
--- a/pkgs/applications/networking/p2p/tribler/default.nix
+++ b/pkgs/applications/networking/p2p/tribler/default.nix
@@ -1,17 +1,15 @@
-{ stdenv, fetchgit, pythonPackages, makeWrapper, nettools, libtorrentRasterbar, imagemagick
-, enablePlayer ? true, vlc ? null }:
+{ stdenv, fetchurl, pythonPackages, makeWrapper, nettools, libtorrentRasterbar, imagemagick
+, enablePlayer ? true, vlc ? null, qt5 }:
 
 stdenv.mkDerivation rec {
   pname = "tribler";
   name = "${pname}-${version}";
-  version = "7.0.0-beta";
+  version = "7.0.0-rc2";
   revision = "1d3ddb8";
 
-  src = fetchgit {
-    url = "https://github.com/Tribler/tribler";
-    rev = revision;
-    sha256 = "16mk76qgg7fgca11yvpygicxqbkc0kn6r82x73fly2310pagd845";
-    fetchSubmodules = true;
+  src = fetchurl {
+    url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-v${version}.tar.xz";
+    sha256 = "0wlv32cw52c5khnrm218dccgn2l177933p4dhp7m50hipqfb0ly2";
   };
 
   buildInputs = [
@@ -41,6 +39,7 @@ stdenv.mkDerivation rec {
     pythonPackages.plyvel
     pythonPackages.decorator
     pythonPackages.feedparser
+    pythonPackages.service-identity
   ];
 
   postPatch = ''
@@ -58,6 +57,7 @@ stdenv.mkDerivation rec {
     wrapPythonPrograms
     cp -prvd ./* $out/
     makeWrapper ${pythonPackages.python}/bin/python $out/bin/tribler \
+        --set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \
         --set _TRIBLERPATH $out \
         --set PYTHONPATH $out:$program_PYTHONPATH \
         --set NO_AT_BRIDGE 1 \
diff --git a/pkgs/applications/science/logic/mcrl2/default.nix b/pkgs/applications/science/logic/mcrl2/default.nix
index c9016a5ee0ce..ce368a77c2b4 100644
--- a/pkgs/applications/science/logic/mcrl2/default.nix
+++ b/pkgs/applications/science/logic/mcrl2/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, xlibs, cmake, subversion, mesa, qt5, boost,
+{stdenv, gcc5, fetchurl, xlibs, cmake, subversion, mesa, qt5, boost,
  python27, python27Packages}:
 
 stdenv.mkDerivation rec {
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "1c8h94ja7271ph61zrcgnjgblxppld6v22f7f900prjgzbcfy14m";
   };
 
-  buildInputs = [ cmake mesa qt5.qtbase boost ];
+  buildInputs = [ gcc5 cmake mesa qt5.qtbase boost ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/compilers/dmd/2.067.1.nix b/pkgs/development/compilers/dmd/2.067.1.nix
index 3cf530e9e5e8..7134aa6888b0 100644
--- a/pkgs/development/compilers/dmd/2.067.1.nix
+++ b/pkgs/development/compilers/dmd/2.067.1.nix
@@ -153,6 +153,7 @@ stdenv.mkDerivation rec {
     # https://github.com/dlang/dmd/pull/6680
     license = licenses.boost;
     platforms = platforms.unix;
+    broken = true;
   };
 }
 
diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix
index 278a77f62903..80e9b34a5525 100644
--- a/pkgs/development/compilers/dmd/default.nix
+++ b/pkgs/development/compilers/dmd/default.nix
@@ -154,6 +154,6 @@ stdenv.mkDerivation rec {
     # https://github.com/dlang/dmd/pull/6680
     license = licenses.boost;
     platforms = platforms.unix;
+    broken = true;
   };
 }
-
diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix
index 6bc7f66ca299..0e4bc420241d 100644
--- a/pkgs/development/compilers/ispc/default.nix
+++ b/pkgs/development/compilers/ispc/default.nix
@@ -2,11 +2,9 @@
 testedTargets ? ["sse2" "host"] # the default test target is sse4, but that is not supported by all Hydra agents
 }:
 
-# TODO: patch LLVM so Skylake-EX works better (patch included in ispc github) - needed for LLVM 3.9?
-
 stdenv.mkDerivation rec {
-  version = "1.9.1";
-  rev = "v${version}";
+  version = "20170807";
+  rev = "6e0fc2f148e95afad998a7c7f4d7908d29fd8e44";
 
   inherit testedTargets;
 
@@ -16,7 +14,7 @@ stdenv.mkDerivation rec {
     owner = "ispc";
     repo = "ispc";
     inherit rev;
-    sha256 = "1wwsyvn44hd5iyi5779l5378x096307slpyl29wrsmfp66796693";
+    sha256 = "17fwnfm8a329lgfhjwcvji4h1fm4iqmc28wz23hvgqbpj8lk6qgh";
   };
 
   # there are missing dependencies in the Makefile, causing sporadic build failures
@@ -60,8 +58,8 @@ stdenv.mkDerivation rec {
   '';
 
   makeFlags = [
-    "CXX=${llvmPackages.clang}/bin/clang++"
-    "CLANG=${llvmPackages.clang}/bin/clang"
+    "CXX=${stdenv.cc}/bin/clang++"
+    "CLANG=${stdenv.cc}/bin/clang"
     "CLANG_INCLUDE=${llvmPackages.clang-unwrapped}/include"
     ];
 
diff --git a/pkgs/development/compilers/shaderc/default.nix b/pkgs/development/compilers/shaderc/default.nix
index df0c136d05f5..9df718694913 100644
--- a/pkgs/development/compilers/shaderc/default.nix
+++ b/pkgs/development/compilers/shaderc/default.nix
@@ -27,5 +27,6 @@ stdenv.mkDerivation rec {
   meta = with stdenv.lib; {
     inherit (src.meta) homepage;
     description = "A collection of tools, libraries and tests for shader compilation.";
+    broken = true;
   };
 }
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index da027a5e0597..2820c538b76b 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -56,6 +56,13 @@ self: super: {
   # segfault due to missing return: https://github.com/haskell/c2hs/pull/184
   c2hs = dontCheck super.c2hs;
 
+  # https://github.com/gilith/hol/pull/1
+  hol = appendPatch (doJailbreak super.hol) (pkgs.fetchpatch {
+    name = "hol.patch";
+    url = "https://github.com/gilith/hol/commit/a5171bdcacdbe93c46c9f82ec5a38f2a2b69e632.patch";
+    sha256 = "0xkgbhc4in38hspxgz2wcvk56pjalw43gig7lzkjfhgavwxv3jyj";
+  });
+
   # This test keeps being aborted because it runs too quietly for too long
   Lazy-Pbkdf2 = if pkgs.stdenv.isi686 then dontCheck super.Lazy-Pbkdf2 else super.Lazy-Pbkdf2;
 
@@ -132,6 +139,8 @@ self: super: {
     extraLibraries = [ pkgs.openblasCompat ];
   });
 
+  LambdaHack = super.LambdaHack.override { sdl2-ttf = super.sdl2-ttf_2_0_1; };
+
   # The Haddock phase fails for one reason or another.
   acme-one = dontHaddock super.acme-one;
   attoparsec-conduit = dontHaddock super.attoparsec-conduit;
@@ -916,4 +925,6 @@ self: super: {
   # https://github.com/jtdaugherty/text-zipper/issues/11
   text-zipper = dontCheck super.text-zipper;
 
+  # https://github.com/graknlabs/grakn-haskell/pull/1
+  grakn = dontCheck (doJailbreak super.grakn);
 }
diff --git a/pkgs/development/haskell-modules/lib.nix b/pkgs/development/haskell-modules/lib.nix
index 48110cffabf8..fcb4258deb14 100644
--- a/pkgs/development/haskell-modules/lib.nix
+++ b/pkgs/development/haskell-modules/lib.nix
@@ -117,7 +117,9 @@ rec {
     '';
   });
 
-  buildStrictly = pkg: buildFromSdist (appendConfigureFlag pkg "--ghc-option=-Wall --ghc-option=-Werror");
+  buildStrictly = pkg: buildFromSdist (failOnAllWarnings pkg);
+
+  failOnAllWarnings = drv: appendConfigureFlag drv "--ghc-option=-Wall --ghc-option=-Werror";
 
   checkUnusedPackages =
     { ignoreEmptyImports ? false
diff --git a/pkgs/development/libraries/fox/fox-1.6.nix b/pkgs/development/libraries/fox/fox-1.6.nix
index 98becb8e2da1..63ec62336163 100644
--- a/pkgs/development/libraries/fox/fox-1.6.nix
+++ b/pkgs/development/libraries/fox/fox-1.6.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchurl, xlibsWrapper, libpng, libjpeg, libtiff, zlib, bzip2, libXcursor
-, libXrandr, mesa, libXft, libXfixes, xinput }:
+, libXrandr, mesa, libXft, libXfixes, xinput
+, CoreServices }:
 
 let
   version = "1.6.49";
@@ -13,8 +14,10 @@ stdenv.mkDerivation rec {
     sha256 = "03m9wm8hpzh1i0fxx5mpvjr67384pfm9hn7gzdcq55b4639fqy9n";
   };
 
-  buildInputs = [ xlibsWrapper libpng libjpeg libtiff zlib bzip2 libXcursor libXrandr
-      libXft mesa libXfixes xinput ];
+  buildInputs = [
+    xlibsWrapper libpng libjpeg libtiff zlib bzip2 libXcursor libXrandr
+    libXft mesa libXfixes xinput
+  ] ++ stdenv.lib.optional stdenv.isDarwin CoreServices;
 
   doCheck = true;
 
diff --git a/pkgs/development/libraries/v8/3.30.33.nix b/pkgs/development/libraries/v8/3.30.33.nix
deleted file mode 100644
index 6ae5c896efa1..000000000000
--- a/pkgs/development/libraries/v8/3.30.33.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{ callPackage, ... } @ args:
-
-callPackage ./generic.nix (args // {
-  version = "3.30.33.16";
-  sha256 = "1azf1b36gqj4z5x0k9wq2dkp99zfyhwb0d6i2cl5fjm3k6js7l45";
-})
diff --git a/pkgs/development/libraries/v8/4.5.nix b/pkgs/development/libraries/v8/4.5.nix
deleted file mode 100644
index 655ccf1ccf38..000000000000
--- a/pkgs/development/libraries/v8/4.5.nix
+++ /dev/null
@@ -1,145 +0,0 @@
-{ stdenv, lib, fetchgit, fetchFromGitHub, gyp, readline, python, which, icu
-, patchelf, coreutils
-, doCheck ? false
-}:
-
-assert readline != null;
-
-let
-  arch = if stdenv.isArm
-         then if stdenv.is64bit
-              then"arm64"
-              else "arm"
-         else if stdenv.is64bit
-              then"x64"
-              else "ia32";
-  git_url = "https://chromium.googlesource.com";
-  clangFlag = if stdenv.isDarwin then "1" else "0";
-
-  deps = {
-    "build/gyp" = fetchgit {
-      url = "${git_url}/external/gyp.git";
-      rev = "5122240c5e5c4d8da12c543d82b03d6089eb77c5";
-      sha256 = "0mdrrhmfl4jrdmfrxmg7ywhdf9c7gv2x08fiq955fs9z8kvxqgdx";
-    };
-    "third_party/icu" = fetchgit {
-      url = "${git_url}/chromium/deps/icu.git";
-      rev = "c81a1a3989c3b66fa323e9a6ee7418d7c08297af";
-      sha256 = "0xrhig85vpw9hqjrhkxsr69m2xnig2bwmjhylzffrwz0783l7yhw";
-    };
-    "buildtools" = fetchgit {
-      url = "${git_url}/chromium/buildtools.git";
-      rev = "ecc8e253abac3b6186a97573871a084f4c0ca3ae";
-      sha256 = "1ccfnj3dp4i0z2bj09zy8aa4x749id6h058qa330li368417jwci";
-    };
-    "testing/gtest" = fetchgit {
-      url = "${git_url}/external/googletest.git";
-      rev = "23574bf2333f834ff665f894c97bef8a5b33a0a9";
-      sha256 = "1scyrk8d6xrsqma27q0wdrxqfa2n12k8mi9lfbsm5ivim9sr1d75";
-    };
-    "testing/gmock" = fetchgit {
-      url = "${git_url}/external/googlemock.git";
-      rev = "29763965ab52f24565299976b936d1265cb6a271";
-      sha256 = "0n2ajjac7myr5bgqk0x7j8281b4whkzgr1irv5nji9n3xz5i6gz4";
-    };
-    "tools/clang" = fetchgit {
-      url = "${git_url}/chromium/src/tools/clang.git";
-      rev = "73ec8804ed395b0886d6edf82a9f33583f4a7902";
-      sha256 = "0p2w4cgj3d4lqa8arss3j86lk0g8zhbbn5pzlcrhy5pl4xphjbk3";
-    };
-  };
-
-in
-
-stdenv.mkDerivation rec {
-  name = "v8-${version}";
-  version = "4.5.107";
-
-  inherit doCheck;
-
-  src = fetchFromGitHub {
-    owner = "v8";
-    repo = "v8";
-    rev = version;
-    sha256 = "0wbzi4rhm4ygsm1k4x0vwfm42z3j8ww6wz7bcvd0m7mqzayn0bw4";
-  };
-
-  postUnpack = ''
-    ${lib.concatStringsSep "\n" (
-      lib.mapAttrsToList (n: v: ''
-        mkdir -p $sourceRoot/${n}
-        cp -r ${v}/* $sourceRoot/${n}
-      '') deps)}
-  '';
-
-  # Patches pulled from:
-  # https://github.com/cowboyd/libv8/tree/4.5/patches
-  patches = lib.optional (!doCheck) ./disable-building-tests.patch ++ [
-    ./fPIC-for-static.patch
-    ./build-standalone-static-library.patch
-  ];
-
-  postPatch = ''
-    sed -i 's,#!/usr/bin/env python,#!${python}/bin/python,' build/gyp_v8
-    sed -i 's,/bin/echo,${coreutils}/bin/echo,' build/standalone.gypi
-    sed -i '/CR_CLANG_REVISION/ d' build/standalone.gypi
-    sed -i 's/-Wno-format-pedantic//g' build/standalone.gypi
-  '';
-
-  configurePhase = ''
-    PYTHONPATH="tools/generate_shim_headers:$PYTHONPATH" \
-    PYTHONPATH="$(toPythonPath ${gyp}):$PYTHONPATH" \
-      build/gyp_v8 \
-        -f make \
-        --generator-output="out" \
-        -Dflock_index=0 \
-        -Dclang=${clangFlag} \
-        -Dv8_enable_i18n_support=1 \
-        -Duse_system_icu=1 \
-        -Dcomponent=shared_library \
-        -Dconsole=readline \
-        -Dv8_target_arch=${arch} \
-        -Dv8_use_external_startup_data=0
-  '';
-
-  nativeBuildInputs = [ which ];
-  buildInputs = [ readline python icu patchelf ];
-
-  NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow";
-
-  buildFlags = [
-    "LINK=g++"
-    "-C out"
-    "builddir=$(CURDIR)/Release"
-    "BUILDTYPE=Release"
-  ];
-
-  enableParallelBuilding = true;
-
-  # the `libv8_libplatform` target is _only_ built as a static library,
-  # and is expected to be statically linked in when needed.
-  # see the following link for further commentary:
-  # https://github.com/cowboyd/therubyracer/issues/391
-  installPhase = ''
-    install -vD out/Release/d8 "$out/bin/d8"
-    install -vD out/Release/mksnapshot "$out/bin/mksnapshot"
-    ${if stdenv.isDarwin then ''
-    install -vD out/Release/lib.target/libv8.dylib "$out/lib/libv8.dylib"
-    install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc.lib}/lib/libgcc_s.1.dylib $out/bin/d8
-    install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc.lib}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib
-    '' else ''
-    install -vD out/Release/lib.target/libv8.so "$out/lib/libv8.so"
-    ''}
-    mkdir -p "$out/include"
-    cp -vr include/*.h "$out/include"
-    cp -vr include/libplatform "$out/include"
-    cp -v  out/Release/*.a "$out/lib"
-  '';
-
-  meta = with lib; {
-    description = "Google's open source JavaScript engine";
-    maintainers = with maintainers; [ cstrahan proglodyte ];
-    platforms = platforms.linux;
-    license = licenses.bsd3;
-  };
-}
diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix
index 00fb037168ea..c2cd5a015168 100644
--- a/pkgs/development/libraries/v8/default.nix
+++ b/pkgs/development/libraries/v8/default.nix
@@ -161,7 +161,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ readline python icu patchelf ]
   ++ stdenv.lib.optionals stdenv.isDarwin [ cctools ];
 
-  NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow";
+  NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow -Wno-error=unused-function -Wno-error=attributes";
 
   buildFlags = [
     "LINK=c++"
diff --git a/pkgs/development/node-packages/default-v6.nix b/pkgs/development/node-packages/default-v6.nix
index 27664385b613..334c79a82672 100644
--- a/pkgs/development/node-packages/default-v6.nix
+++ b/pkgs/development/node-packages/default-v6.nix
@@ -53,4 +53,12 @@ nodePackages // {
       export PATH="$PATH:$tmp"
     '';
   });
+
+  fast-cli = nodePackages.fast-cli.override (oldAttrs: {
+    preRebuild = ''
+      # Simply ignore the phantomjs --version check. It seems to need a display but it is safe to ignore
+      sed -i -e "s|console.error('Error verifying phantomjs, continuing', err)|console.error('Error verifying phantomjs, continuing', err); return true;|" node_modules/phantomjs-prebuilt/lib/util.js
+    '';
+    buildInputs = oldAttrs.buildInputs ++ [ pkgs.phantomjs2 ];
+  });
 }
diff --git a/pkgs/development/python-modules/python-simple-hipchat/default.nix b/pkgs/development/python-modules/python-simple-hipchat/default.nix
new file mode 100644
index 000000000000..1e3f627ab0b9
--- /dev/null
+++ b/pkgs/development/python-modules/python-simple-hipchat/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, unzip }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "python-simple-hipchat";
+  version = "0.4.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0zy6prrj85jjc4xmxgfg8h94j81k6zhfxfffcbvq9b10jis1rgav";
+  };
+
+  buildInputs = [ unzip ];
+
+  meta = with stdenv.lib; {
+    description = "Easy peasy wrapper for HipChat's v1 API";
+    homepage = https://github.com/kurttheviking/simple-hipchat-py;
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/unicorn/default.nix b/pkgs/development/python-modules/unicorn/default.nix
new file mode 100644
index 000000000000..b20843d0fc29
--- /dev/null
+++ b/pkgs/development/python-modules/unicorn/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, buildPythonPackage, fetchPypi, isPy3k }:
+
+buildPythonPackage rec {
+  name  = "${pname}-${version}";
+  pname = "unicorn";
+  version = "1.0.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0a5b4vh734b3wfkgapzzf8x18rimpmzvwwkly56da84n27wfw9bg";
+  };
+
+  disabled = isPy3k;
+
+  setupPyBuildFlags = [ "--plat-name" "linux" ];
+
+  meta = with stdenv.lib; {
+    description = "Unicorn CPU emulator engine";
+    homepage = "http://www.unicorn-engine.org/";
+    license = [ licenses.gpl2 ];
+    maintainers = [ maintainers.bennofs ];
+  };
+}
diff --git a/pkgs/development/tools/glslviewer/default.nix b/pkgs/development/tools/glslviewer/default.nix
index 1cca6a096fe6..a971ae83e637 100644
--- a/pkgs/development/tools/glslviewer/default.nix
+++ b/pkgs/development/tools/glslviewer/default.nix
@@ -1,6 +1,7 @@
-{ stdenv, fetchFromGitHub, glfw, pkgconfig, libXrandr, libXdamage,
-  libXext, libXrender, libXinerama, libXcursor, libXxf86vm, libXi,
-  libX11, mesa_glu }:
+{ stdenv, fetchFromGitHub, glfw, pkgconfig, libXrandr, libXdamage
+, libXext, libXrender, libXinerama, libXcursor, libXxf86vm, libXi
+, libX11, mesa_glu, Cocoa
+}:
 
 stdenv.mkDerivation rec {
   name = "glslviewer-${version}";
@@ -15,17 +16,21 @@ stdenv.mkDerivation rec {
 
   # Makefile has /usr/local/bin hard-coded for 'make install'
   preConfigure = ''
-    sed s,/usr/local,$out, -i Makefile
+    substituteInPlace Makefile \
+        --replace '/usr/local' "$out" \
+        --replace '/usr/bin/clang++' 'clang++'
   '';
 
   preInstall = ''
     mkdir -p $out/bin
   '';
-  
-  buildInputs = [ glfw mesa_glu pkgconfig glfw libXrandr libXdamage
-                  libXext libXrender libXinerama libXcursor libXxf86vm
-                  libXi libX11 ];
-  
+
+  buildInputs = [
+    glfw mesa_glu pkgconfig glfw libXrandr libXdamage
+    libXext libXrender libXinerama libXcursor libXxf86vm
+    libXi libX11
+  ] ++ stdenv.lib.optional stdenv.isDarwin Cocoa;
+
   meta = with stdenv.lib; {
     description = "Live GLSL coding renderer";
     homepage = http://patriciogonzalezvivo.com/2015/glslViewer/;
diff --git a/pkgs/development/tools/misc/arm-frc-linux-gnueabi-binutils/default.nix b/pkgs/development/tools/misc/arm-frc-linux-gnueabi-binutils/default.nix
index 4e3ad7ab8b08..fff91c6f7f38 100755
--- a/pkgs/development/tools/misc/arm-frc-linux-gnueabi-binutils/default.nix
+++ b/pkgs/development/tools/misc/arm-frc-linux-gnueabi-binutils/default.nix
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
     license = stdenv.lib.licenses.gpl2;
     maintainers = [ stdenv.lib.maintainers.colescott ];
     platforms = stdenv.lib.platforms.linux;
-
+    broken = true; # since 2017-09-10
     priority = 3;
   };
 }
diff --git a/pkgs/development/tools/profiling/oprofile/default.nix b/pkgs/development/tools/profiling/oprofile/default.nix
index 063b0375fc7d..ac87870eb590 100644
--- a/pkgs/development/tools/profiling/oprofile/default.nix
+++ b/pkgs/development/tools/profiling/oprofile/default.nix
@@ -1,17 +1,23 @@
-{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, linuxHeaders
+{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, linuxHeaders, coreutils
 , libiberty_static, withGUI ? false , qt4 ? null}:
 
 # libX11 is needed because the Qt build stuff automatically adds `-lX11'.
 assert withGUI -> qt4 != null;
 
 stdenv.mkDerivation rec {
-  name = "oprofile-1.1.0";
+  name = "oprofile-1.2.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/oprofile/${name}.tar.gz";
-    sha256 = "0v1nn38h227bgxjwqf22rjp2iqgjm4ls3gckzifks0x6w5nrlxfg";
+    sha256 = "0zd5ih6gmm1pkqavd9laa93iff7qv5jkbfjznhlyxl5p826gk5gb";
   };
 
+  postPatch = ''
+    substituteInPlace opjitconv/opjitconv.c \
+      --replace "/bin/rm" "${coreutils}/bin/rm" \
+      --replace "/bin/cp" "${coreutils}/bin/cp"
+  '';
+
   buildInputs = [ binutils zlib popt pkgconfig linuxHeaders libiberty_static ]
     ++ stdenv.lib.optionals withGUI [ qt4 ];
 
diff --git a/pkgs/misc/emulators/fs-uae/default.nix b/pkgs/misc/emulators/fs-uae/default.nix
index f7d94bcad471..172b2a2eb3e2 100644
--- a/pkgs/misc/emulators/fs-uae/default.nix
+++ b/pkgs/misc/emulators/fs-uae/default.nix
@@ -5,11 +5,11 @@ with stdenv.lib;
 stdenv.mkDerivation rec {
 
   name = "fs-uae-${version}";
-  version = "2.8.0";
+  version = "2.8.3";
 
   src = fetchurl {
     url = "http://fs-uae.net/fs-uae/stable/${version}/${name}.tar.gz";
-    sha256 = "1cvvlkzhh4rrpax7505bngw990rx86l1nhad174zpqc9ah93il25";
+    sha256 = "14k2p324sdr662f49299mv0bw5jmpj1i2iqn0xs5pgf80x6l3mg2";
   };
 
   buildInputs = [ pkgconfig gettext gtk2 SDL2 zlib glib openal mesa lua freetype libmpeg2 zip ];
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
     license = licenses.gpl2Plus;
     homepage = http://fs-uae.net;
     maintainers = with stdenv.lib; [ maintainers.AndersonTorres ];
-    platforms = stdenv.lib.platforms.linux;
+    platforms = [ "i686-linux" "x86_64-linux" ];
   };
 }
 # TODO: testing and Python GUI support
diff --git a/pkgs/misc/emulators/vice/default.nix b/pkgs/misc/emulators/vice/default.nix
index 6251282aae32..0b56cb21dc0d 100644
--- a/pkgs/misc/emulators/vice/default.nix
+++ b/pkgs/misc/emulators/vice/default.nix
@@ -1,18 +1,19 @@
-{ stdenv, fetchurl, perl, libpng, giflib, libjpeg, alsaLib, readline, mesa, libX11
+{ stdenv, fetchurl, bison, flex, perl, libpng, giflib, libjpeg, alsaLib, readline, mesa, libX11, libXaw
 , pkgconfig, gtk2, SDL, autoreconfHook, makeDesktopItem
 }:
 
 stdenv.mkDerivation rec {
-  name = "vice-2.2";
+  name = "vice-3.1";
 
   src = fetchurl {
-    url = http://www.zimmers.net/anonftp/pub/cbm/crossplatform/emulators/VICE/vice-2.2.tar.gz;
-    sha256 = "0l8mp9ybx494fdqgr1ps4x3c3qzms4yyg4hzcn3ihzy92zw1nn2x";
+    url = mirror://sourceforge/vice-emu/vice-3.1.tar.gz;
+    sha256 = "0h0jbml02s2a36hr78dxv1zshmfhxp1wadpcdl09aq416fb1bf1y";
   };
 
-  buildInputs = [ perl libpng giflib libjpeg alsaLib readline mesa
-                  pkgconfig gtk2 SDL autoreconfHook ];
-  configureFlags = "--with-sdl --enable-fullscreen --enable-gnomeui";
+  buildInputs = [ bison flex perl libpng giflib libjpeg alsaLib readline mesa
+    pkgconfig gtk2 SDL autoreconfHook libXaw ];
+  dontDisableStatic = true;
+  configureFlags = "--enable-fullscreen --enable-gnomeui";
 
   desktopItem = makeDesktopItem {
     name = "vice";
@@ -23,12 +24,19 @@ stdenv.mkDerivation rec {
     categories = "Application;Emulator;";
   };
 
+  preBuild = ''
+    for i in src/resid src/resid-dtv
+    do
+        mkdir -pv $i/src
+        ln -sv ../../wrap-u-ar.sh $i/src
+    done
+  '';
   patchPhase = ''
     # Disable font-cache update
     sed -i -e "s|install: install-data-am|install-no: install-data-am|" data/fonts/Makefile.am
   '';
 
-  NIX_LDFLAGS = "-lX11 -L${libX11}/lib";
+  #NIX_LDFLAGS = "-lX11 -L${libX11}/lib";
 
   postInstall = ''
     mkdir -p $out/share/applications
diff --git a/pkgs/misc/emulators/zsnes/default.nix b/pkgs/misc/emulators/zsnes/default.nix
index 6f3957379e53..ad80cb13f78c 100644
--- a/pkgs/misc/emulators/zsnes/default.nix
+++ b/pkgs/misc/emulators/zsnes/default.nix
@@ -58,6 +58,6 @@ in stdenv.mkDerivation {
     license = stdenv.lib.licenses.gpl2Plus;
     maintainers = [ stdenv.lib.maintainers.sander ];
     homepage = http://www.zsnes.com;
-    platforms = stdenv.lib.platforms.linux;
+    platforms = [ "i686-linux" "x86_64-linux" ];
   };
 }
diff --git a/pkgs/os-specific/linux/kernel/linux-4.12.nix b/pkgs/os-specific/linux/kernel/linux-4.12.nix
index 4bcbca4dacce..c35b9e3e02ce 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.12.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.12.nix
@@ -1,12 +1,12 @@
 { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "4.12.11";
+  version = "4.12.12";
   extraMeta.branch = "4.12";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "015kyh0v9lkk4a6sa7ysddi7dm639z5p45v2sh2kswsih4sf7kxf";
+    sha256 = "1d254yxn46ydp0x3s5cpyg4p74zvdwiqfiaaim1m3g6rwjmlkjpa";
   };
 
   kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/linux-4.13.nix b/pkgs/os-specific/linux/kernel/linux-4.13.nix
index 4c7039b2165c..29f0a05558cf 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.13.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.13.nix
@@ -1,13 +1,12 @@
 { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "4.13";
-  modDirVersion = "4.13.0";
+  version = "4.13.1";
   extraMeta.branch = "4.13";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "0b4slkcq9pxxwp5sfbzffplsf8p0a4lksflpbfr3xn9sdh3ddcrd";
+    sha256 = "1kp1lsf4314af7crpqkd2x1zx407a97r7rz3zhhskbilvsifgkny";
   };
 
   kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix
index 81f4f2a95775..309286b662fc 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.9.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix
@@ -1,12 +1,12 @@
 { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "4.9.48";
+  version = "4.9.49";
   extraMeta.branch = "4.9";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "0y3s5xbh5axdvsx9iwz7sinbm7v6j2dvmj8dz46zj1mziwicagwq";
+    sha256 = "1ywiww2h1gf3ps305irzk7n9xkcgg9bclr2jw6r5cqxmh3qxrv2p";
   };
 
   kernelPatches = args.kernelPatches;
diff --git a/pkgs/servers/http/tomcat/default.nix b/pkgs/servers/http/tomcat/default.nix
index 06594885dbc2..6a29ecaad569 100644
--- a/pkgs/servers/http/tomcat/default.nix
+++ b/pkgs/servers/http/tomcat/default.nix
@@ -32,20 +32,20 @@ let
 in {
   tomcat7 = common {
     versionMajor = "7";
-    versionMinor = "0.75";
-    sha256 = "0w5adsy4792qkf3ws46f539lrdbpz7lghy79s6b04c9yqaxjz6ni";
+    versionMinor = "0.81";
+    sha256 = "0mcr3caizqk6qrc0j9p91apdsg65ksawg0l6xpqk1fq6071nd5rq";
   };
 
   tomcat8 = common {
     versionMajor = "8";
-    versionMinor = "0.41";
-    sha256 = "1mvnf6m29y3p40vvi9mgghrddlmgwcrcvfwrf9vbama78fsh8wm5";
+    versionMinor = "0.46";
+    sha256 = "14wb9mgb7z02j6wvvmcsfc2zkcqnijc40gzyg1mnxcy5fvf8nzpk";
   };
 
   tomcat85 = common {
     versionMajor = "8";
-    versionMinor = "5.14";
-    sha256 = "0dls16lw7yak3s6cwwcccfg0qb5g8s36waxlg8wgjk8vc57h316w";
+    versionMinor = "5.20";
+    sha256 = "1l5cgxzaassjnfbr4rbr3wzz45idcqa8aqhphhvlx1xl8xqv6p8a";
   };
 
   tomcatUnstable = common {
diff --git a/pkgs/servers/openafs-client/default.nix b/pkgs/servers/openafs-client/default.nix
index ebbd10e8fa2c..93c854d8e08b 100644
--- a/pkgs/servers/openafs-client/default.nix
+++ b/pkgs/servers/openafs-client/default.nix
@@ -3,11 +3,11 @@
 
 stdenv.mkDerivation rec {
   name = "openafs-${version}-${kernel.version}";
-  version = "1.6.20.2";
+  version = "1.6.21";
 
   src = fetchurl {
     url = "http://www.openafs.org/dl/openafs/${version}/openafs-${version}-src.tar.bz2";
-    sha256 = "50234820c3da9752d2ca05fb7e83b7dc5c96a0e96a0b875ebc7ae3c835607614";
+    sha256 = "ba9c1f615edd53b64fc271ad369c49a816acedca70cdd090975033469a84118f";
   };
 
   nativeBuildInputs = [ autoconf automake flex yacc perl which ];
@@ -47,6 +47,7 @@ stdenv.mkDerivation rec {
     platforms = platforms.linux;
     maintainers = [ maintainers.z77z ];
     broken =
-      (builtins.compareVersions kernel.version  "3.18" == -1);
+      (builtins.compareVersions kernel.version  "3.18" == -1) ||
+      (builtins.compareVersions kernel.version "4.13" == 0);
   };
 }
diff --git a/pkgs/servers/plex/default.nix b/pkgs/servers/plex/default.nix
index 0e5cb3e697f5..9b2278fe3667 100644
--- a/pkgs/servers/plex/default.nix
+++ b/pkgs/servers/plex/default.nix
@@ -6,9 +6,9 @@
 let
   plexPass = throw "Plex pass has been removed at upstream's request; please unset nixpkgs.config.plex.pass";
   plexpkg = if enablePlexPass then plexPass else {
-    version = "1.7.5.4035";
-    vsnHash = "313f93718";
-    sha256 = "89b8585e561046a8422d520ebcdae784f5dc3c895aac8d313c435cc6b58795b8";
+    version = "1.8.4.4249";
+    vsnHash = "3497d6779";
+    sha256 = "ca3db297f4dbc73a5a405ac032ff250e5df97b84da6dcac55165b13e6445ca80";
   };
 
 in stdenv.mkDerivation rec {
diff --git a/pkgs/servers/radarr/default.nix b/pkgs/servers/radarr/default.nix
index 088eef0830b9..3b86cf1758c0 100644
--- a/pkgs/servers/radarr/default.nix
+++ b/pkgs/servers/radarr/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "radarr-${version}";
-  version = "0.2.0.778";
+  version = "0.2.0.846";
 
   src = fetchurl {
     url = "https://github.com/Radarr/Radarr/releases/download/v${version}/Radarr.develop.${version}.linux.tar.gz";
-    sha256 = "0145nsdnhsd3nbg2nml5malm4kn28k2siaimqb41dcmc88fws015";
+    sha256 = "1lpr05aaf6a9p2msmsh0j8krxk83sf5d3avrh5qpyjap5j3phvky";
   };
 
   buildInputs = [ makeWrapper ];
diff --git a/pkgs/tools/backup/borg/default.nix b/pkgs/tools/backup/borg/default.nix
index dcea9c9435b9..19495b6e1df6 100644
--- a/pkgs/tools/backup/borg/default.nix
+++ b/pkgs/tools/backup/borg/default.nix
@@ -37,6 +37,9 @@ python3Packages.buildPythonApplication rec {
     cp -R docs/_build/man $out/share/man/man1
   '';
 
+  # tests fail due to missing test command in nix_run_setup.py
+  doCheck = false;
+
   meta = with stdenv.lib; {
     description = "A deduplicating backup program (attic fork)";
     homepage = https://borgbackup.github.io/;
diff --git a/pkgs/tools/graphics/nifskope/default.nix b/pkgs/tools/graphics/nifskope/default.nix
index f66d01ef7aa3..19aa7f00f14a 100644
--- a/pkgs/tools/graphics/nifskope/default.nix
+++ b/pkgs/tools/graphics/nifskope/default.nix
@@ -4,10 +4,12 @@ stdenv.mkDerivation rec {
   name = "nifskope-1.1.3";
 
   src = fetchurl {
-    url = "mirror://sourceforge/niftools/${name}.tar.bz2";
+    url = "https://github.com/niftools/nifskope/releases/download/${name}/${name}.tar.bz2";
     sha256 = "0fcvrcjyvivww10sjhxamcip797b9ykbf5p3rm2k24xhkwdaqp72";
   };
 
+  patches = [ ./gcc-6.patch ];
+
   buildInputs = [ qt4 ];
 
   nativeBuildInputs = [ qmake4Hook ];
@@ -46,7 +48,7 @@ stdenv.mkDerivation rec {
     ''; # */
 
   meta = {
-    homepage = http://niftools.sourceforge.net/;
+    homepage = https://github.com/niftools/nifskope/;
     description = "A tool for analyzing and editing NetImmerse/Gamebryo '*.nif' files";
     maintainers = [ stdenv.lib.maintainers.eelco ];
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/tools/graphics/nifskope/gcc-6.patch b/pkgs/tools/graphics/nifskope/gcc-6.patch
new file mode 100644
index 000000000000..2bb8af9cfe4c
--- /dev/null
+++ b/pkgs/tools/graphics/nifskope/gcc-6.patch
@@ -0,0 +1,123 @@
+Based on https://github.com/niftools/nifskope/commit/7261b0a119a549b11006d8e41ba990d706171f1c
+
+diff -ru -x '*~' nifskope-1.1.3-orig/gl/dds/ColorBlock.cpp nifskope-1.1.3/gl/dds/ColorBlock.cpp
+--- nifskope-1.1.3-orig/gl/dds/ColorBlock.cpp	2012-11-17 23:40:31.000000000 +0100
++++ nifskope-1.1.3/gl/dds/ColorBlock.cpp	2017-09-10 10:50:36.766909836 +0200
+@@ -78,8 +78,8 @@
+ 

+ void ColorBlock::init(const Image * img, uint x, uint y)

+ {

+-	const uint bw = min(img->width() - x, 4U);

+-	const uint bh = min(img->height() - y, 4U);

++	const uint bw = std::min(img->width() - x, 4U);

++	const uint bh = std::min(img->height() - y, 4U);

+ 

+ 	static int remainder[] = {

+ 		0, 0, 0, 0,

+diff -ru -x '*~' nifskope-1.1.3-orig/gl/dds/Common.h nifskope-1.1.3/gl/dds/Common.h
+--- nifskope-1.1.3-orig/gl/dds/Common.h	2012-11-17 23:40:31.000000000 +0100
++++ nifskope-1.1.3/gl/dds/Common.h	2017-09-10 10:48:08.462099032 +0200
+@@ -33,14 +33,10 @@
+ #ifndef _DDS_COMMON_H

+ #define _DDS_COMMON_H

+ 

+-#ifndef min

+-#define min(a,b) ((a) <= (b) ? (a) : (b))

+-#endif

+-#ifndef max

+-#define max(a,b) ((a) >= (b) ? (a) : (b))

+-#endif

++#include <algorithm>

++

+ #ifndef clamp

+-#define clamp(x,a,b) min(max((x), (a)), (b))

++#define clamp(x,a,b) std::min( std::max( (x), (a) ), (b) )

+ #endif

+ 

+ template<typename T>

+diff -ru -x '*~' nifskope-1.1.3-orig/gl/dds/DirectDrawSurface.cpp nifskope-1.1.3/gl/dds/DirectDrawSurface.cpp
+--- nifskope-1.1.3-orig/gl/dds/DirectDrawSurface.cpp	2012-11-17 23:40:31.000000000 +0100
++++ nifskope-1.1.3/gl/dds/DirectDrawSurface.cpp	2017-09-10 10:48:45.912056969 +0200
+@@ -63,6 +63,7 @@
+ #include "DirectDrawSurface.h"

+ #include "BlockDXT.h"

+ #include "PixelFormat.h"

++#include "Common.h"

+ 

+ #include <stdio.h> // printf

+ #include <math.h>  // sqrt

+@@ -685,8 +686,8 @@
+ 	// Compute width and height.

+ 	for (uint m = 0; m < mipmap; m++)

+ 	{

+-		w = max(1U, w / 2);

+-		h = max(1U, h / 2);

++		w = std::max(1U, w / 2);

++		h = std::max(1U, h / 2);

+ 	}

+ 	

+ 	img->allocate(w, h);

+@@ -787,9 +788,9 @@
+ 			readBlock(&block);

+ 			

+ 			// Write color block.

+-			for (uint y = 0; y < min(4U, h-4*by); y++)

++			for (uint y = 0; y < std::min(4U, h-4*by); y++)

+ 			{

+-				for (uint x = 0; x < min(4U, w-4*bx); x++)

++				for (uint x = 0; x < std::min(4U, w-4*bx); x++)

+ 				{

+ 					img->pixel(4*bx+x, 4*by+y) = block.color(x, y);

+ 				}

+@@ -909,9 +910,9 @@
+ 	

+ 	for (uint m = 0; m < mipmap; m++)

+ 	{

+-		w = max(1U, w / 2);

+-		h = max(1U, h / 2);

+-		d = max(1U, d / 2);

++		w = std::max(1U, w / 2);

++		h = std::max(1U, h / 2);

++		d = std::max(1U, d / 2);

+ 	}

+ 

+ 	if (header.pf.flags & DDPF_FOURCC)

+diff -ru -x '*~' nifskope-1.1.3-orig/gl/gltexloaders.cpp nifskope-1.1.3/gl/gltexloaders.cpp
+--- nifskope-1.1.3-orig/gl/gltexloaders.cpp	2012-11-17 23:40:31.000000000 +0100
++++ nifskope-1.1.3/gl/gltexloaders.cpp	2017-09-10 10:51:23.586839810 +0200
+@@ -1736,8 +1736,8 @@
+ 			

+ 			// generate next offset, resize

+ 			mipmapOffset += mipmapWidth * mipmapHeight * 4;

+-			mipmapWidth = max( 1, mipmapWidth / 2 );

+-			mipmapHeight = max( 1, mipmapHeight / 2 );

++			mipmapWidth = std::max( 1, mipmapWidth / 2 );

++			mipmapHeight = std::max( 1, mipmapHeight / 2 );

+ 		}

+ 		

+ 		// set total pixel size

+@@ -1932,11 +1932,11 @@
+ 			{

+ 				if ( ddsHeader.ddsPixelFormat.dwFourCC == FOURCC_DXT1 )

+ 				{

+-					mipmapOffset += max( 8, ( mipmapWidth * mipmapHeight / 2 ) );

++					mipmapOffset += std::max( 8, ( mipmapWidth * mipmapHeight / 2 ) );

+ 				}

+ 				else if ( ddsHeader.ddsPixelFormat.dwFourCC == FOURCC_DXT5 )

+ 				{

+-					mipmapOffset += max( 16, ( mipmapWidth * mipmapHeight ) );

++					mipmapOffset += std::max( 16, ( mipmapWidth * mipmapHeight ) );

+ 				}

+ 			}

+ 			else if ( ddsHeader.ddsPixelFormat.dwBPP == 24 )

+@@ -1947,8 +1947,8 @@
+ 			{

+ 				mipmapOffset += ( mipmapWidth * mipmapHeight * 4 );

+ 			}

+-			mipmapWidth = max( 1, mipmapWidth / 2 );

+-			mipmapHeight = max( 1, mipmapHeight / 2 );

++			mipmapWidth = std::max( 1, mipmapWidth / 2 );

++			mipmapHeight = std::max( 1, mipmapHeight / 2 );

+ 		}

+ 		

+ 		nif->set<quint32>( iData, "Num Pixels", mipmapOffset );

diff --git a/pkgs/tools/misc/fd/default.nix b/pkgs/tools/misc/fd/default.nix
index 763ca668d181..047840c5a18d 100644
--- a/pkgs/tools/misc/fd/default.nix
+++ b/pkgs/tools/misc/fd/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   name = "fd-${version}";
-  version = "2.0.0";
+  version = "3.0.0";
 
   src = fetchFromGitHub {
     owner = "sharkdp";
     repo = "fd";
     rev = "v${version}";
-    sha256 = "1xs4y9zf5m0ykl95787jv98xg0a60gkcyyh7kg7qg4xrcgf4qz4j";
+    sha256 = "0d6xfcsz2xxggk4k7xsjhhzrkd5lj6h36h97krwdxpj4n0w6py93";
   };
 
-  depsSha256 = "1hxf3j4584jgpwrwykx6yil6q6ka9l81qvx6zrbprdxk3pslp049";
+  depsSha256 = "1icfv3v2s4wgpnp2n74ws6xl449ilgdm08balxb0m1cq9ypy744f";
 
   meta = {
     description = "A simple, fast and user-friendly alternative to find";
diff --git a/pkgs/tools/security/gnupg/22.nix b/pkgs/tools/security/gnupg/22.nix
index 3cabf9e1e41b..7080cda57f41 100644
--- a/pkgs/tools/security/gnupg/22.nix
+++ b/pkgs/tools/security/gnupg/22.nix
@@ -45,6 +45,9 @@ stdenv.mkDerivation rec {
       substitute $f $out/lib/systemd/user/$(basename $f) \
         --replace /usr/bin $out/bin
     done
+
+    # add gpg2 symlink to make sure git does not break when signing commits
+    ln -s $out/bin/gpg $out/bin/gpg2
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/security/pass/rofi-pass.nix b/pkgs/tools/security/pass/rofi-pass.nix
index 2f3fab6de816..44bc40d95914 100644
--- a/pkgs/tools/security/pass/rofi-pass.nix
+++ b/pkgs/tools/security/pass/rofi-pass.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   name = "rofi-pass-${version}";
-  version = "1.5.0";
+  version = "1.5.1";
 
   src = fetchFromGitHub {
     owner = "carnager";
     repo = "rofi-pass";
     rev = version;
-    sha256 = "08chbn966140p3gmgalkhhm01ym64fvb6d2w5mbwpyl0986m89ba";
+    sha256 = "1qv1yphfy2zmiibc92kq1m0k8plal5wcb6jymc3ks2wrl4v98iy4";
   };
 
   buildInputs = [ makeWrapper ];
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 2cb27852c5c3..2bf0622e09a5 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -740,9 +740,7 @@ with pkgs;
 
   bubblewrap = callPackage ../tools/admin/bubblewrap { };
 
-  borgbackup = callPackage ../tools/backup/borg {
-    python3Packages = python34Packages;
-  };
+  borgbackup = callPackage ../tools/backup/borg { };
 
   boomerang = callPackage ../development/tools/boomerang { };
 
@@ -1029,9 +1027,7 @@ with pkgs;
 
   fastJson = callPackage ../development/libraries/fastjson { };
 
-  fast-cli = nodePackages.fast-cli.overrideDerivation (old: {
-    buildInputs = old.buildInputs ++ [phantomjs2];
-  });
+  fast-cli = nodePackages.fast-cli;
 
   fd = callPackage ../tools/misc/fd { };
 
@@ -1077,7 +1073,9 @@ with pkgs;
 
   glock = callPackage ../development/tools/glock { };
 
-  glslviewer = callPackage ../development/tools/glslviewer { };
+  glslviewer = callPackage ../development/tools/glslviewer {
+    inherit (darwin.apple_sdk.frameworks) Cocoa;
+  };
 
   gmic = callPackage ../tools/graphics/gmic { };
 
@@ -2050,7 +2048,9 @@ with pkgs;
     inherit (darwin.apple_sdk.frameworks) CoreServices;
   };
 
-  fox_1_6 = callPackage ../development/libraries/fox/fox-1.6.nix { };
+  fox_1_6 = callPackage ../development/libraries/fox/fox-1.6.nix {
+    inherit (darwin.apple_sdk.frameworks) CoreServices;
+  };
 
   fping = callPackage ../tools/networking/fping {};
 
@@ -8523,7 +8523,8 @@ with pkgs;
   isocodes = callPackage ../development/libraries/iso-codes { };
 
   ispc = callPackage ../development/compilers/ispc {
-    llvmPackages = llvmPackages_39;
+    llvmPackages = llvmPackages_4;
+    stdenv = llvmPackages_4.stdenv;
   };
 
   itk = callPackage ../development/libraries/itk { };
@@ -9688,7 +9689,9 @@ with pkgs;
 
   libmpc = callPackage ../development/libraries/libmpc { };
 
-  mpich2 = callPackage ../development/libraries/mpich2 { };
+  mpich2 = callPackage ../development/libraries/mpich2 {
+    gfortran = gfortran5;
+  };
 
   mstpd = callPackage ../os-specific/linux/mstpd { };
 
@@ -10639,18 +10642,12 @@ with pkgs;
   v8_3_16_14 = callPackage ../development/libraries/v8/3.16.14.nix {
     inherit (python2Packages) python gyp;
     cctools = darwin.cctools;
+    stdenv = overrideCC stdenv gcc5;
   };
 
   v8_3_24_10 = callPackage ../development/libraries/v8/3.24.10.nix {
     inherit (python2Packages) python gyp;
-  };
-
-  v8_3_30_33 = callPackage ../development/libraries/v8/3.30.33.nix {
-    inherit (python2Packages) python gyp;
-  };
-
-  v8_4_5 = callPackage ../development/libraries/v8/4.5.nix {
-    inherit (python2Packages) python gyp;
+    stdenv = overrideCC stdenv gcc5;
   };
 
   v8 = callPackage ../development/libraries/v8 {
@@ -16269,6 +16266,7 @@ with pkgs;
 
   snapper = callPackage ../tools/misc/snapper {
     btrfs-progs = btrfs-progs_4_4_1;
+    stdenv = overrideCC stdenv gcc5;
   };
 
   snd = callPackage ../applications/audio/snd { };
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index a8282ba6f6bb..55f543e68baf 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -224,11 +224,16 @@ let self = _self // overrides; _self = with self; {
   };
 
   ApacheTest = buildPerlPackage {
-    name = "Apache-Test-1.38";
+    name = "Apache-Test-1.40";
     src = fetchurl {
-      url = mirror://cpan/authors/id/P/PH/PHRED/Apache-Test-1.38.tar.gz;
-      sha256 = "321717f58636ed0aa85cba6d69fc01e2ccbc90ba71ec2dcc2134d8401af65145";
+      url = mirror://cpan/authors/id/S/SH/SHAY/Apache-Test-1.40.tar.gz;
+      sha256 = "0h5fsi0is6nhclsd3wwkkqx2hfgl3bpdazxycafm9sqxr3qkgx9w";
     };
+    checkPhase = ''
+      make test \
+        NIX_REDIRECTS=/etc/protocols=${pkgs.iana-etc}/etc/protocols \
+        LD_PRELOAD=${pkgs.libredirect}/lib/libredirect.so
+    '';
   };
 
   AppCLI = buildPerlPackage {
@@ -9045,6 +9050,9 @@ let self = _self // overrides; _self = with self; {
     };
     buildInputs = [ CPANMetaCheck CPANMetaRequirements DistCheckConflicts TestCleanNamespaces TestFatal TestRequires ModuleMetadata ];
     propagatedBuildInputs = [ ClassLoad ClassLoadXS DataOptList DevelGlobalDestruction DevelStackTrace DistCheckConflicts EvalClosure ListMoreUtils MROCompat ModuleRuntime ModuleRuntimeConflicts PackageDeprecationManager PackageStash PackageStashXS ParamsUtil SubExporter SubName TaskWeaken TryTiny ];
+    preConfigure = ''
+      export LD=$CC
+    '';
     meta = {
       homepage = http://moose.perl.org/;
       description = "A postmodern object system for Perl 5";
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index abd2de9ae405..11b9fd5e067d 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -17822,17 +17822,8 @@ in {
     '';
   });
 
-  python_simple_hipchat = buildPythonPackage rec {
-    name = "python-simple-hipchat-${version}";
-    version = "0.1";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/python-simple-hipchat/python-simple-hipchat-${version}.zip";
-      sha256 = "404e5ff7187abb09c2227f22063d06baf0fd525725e9c9ad280176bed1c94a3f";
-    };
-
-    buildInputs = [ pkgs.unzip ];
-  };
+  python-simple-hipchat = callPackage ../development/python-modules/python-simple-hipchat {};
+  python_simple_hipchat = self.python-simple-hipchat;
 
   python_keyczar = buildPythonPackage rec {
     name = "python-keyczar-0.71c";
@@ -24530,7 +24521,7 @@ EOF
     buildInputs = with self; [ nose mock ];
     propagatedBuildInputs = with self; [
       jinja2 pyyaml redis requests pagerduty
-      python_simple_hipchat pushbullet
+      python-simple-hipchat pushbullet
     ];
 
     patchPhase = "> requirements.txt";
@@ -27232,21 +27223,7 @@ EOF
   # We need "normal" libxml2 and not the python package by the same name.
   pywbem = callPackage ../development/python-modules/pywbem { libxml2 = pkgs.libxml2; };
 
-  unicorn = buildPythonPackage rec {
-    name  = "unicorn-${version}";
-    version = "1.0.1";
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/u/unicorn/${name}.tar.gz";
-      sha256 = "0a5b4vh734b3wfkgapzzf8x18rimpmzvwwkly56da84n27wfw9bg";
-    };
-    setupPyBuildFlags = [ "--plat-name" "linux" ];
-    meta = with pkgs.stdenv.lib; {
-      description = "Unicorn CPU emulator engine";
-      homepage = "http://www.unicorn-engine.org/";
-      license = [ licenses.gpl2 ];
-      maintainers = [ maintainers.bennofs ];
-    };
-  };
+  unicorn = callPackage ../development/python-modules/unicorn { };
 
   intervaltree = callPackage ../development/python-modules/intervaltree { };