summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/editors/geany/default.nix4
-rw-r--r--pkgs/applications/editors/zile/default.nix4
-rw-r--r--pkgs/applications/misc/getxbook/default.nix24
-rw-r--r--pkgs/applications/science/logic/coq/default.nix6
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix2
-rw-r--r--pkgs/development/haskell-modules/hackage-packages.nix962
-rw-r--r--pkgs/development/libraries/vulkan-loader/default.nix31
-rw-r--r--pkgs/development/libraries/vulkan-loader/use-xdg-paths.patch142
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/default.nix2
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/default.nix109
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0001-Find-correct-System.map.patch25
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch26
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0002-Fix-kernel-module-install-location.patch25
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch25
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0003-Add-Gentoo-as-build-option.patch30
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch204
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0004-Remove-extra-parameter-from-ttm_bo_reserve-for-4.7.0.patch28
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch42
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch48
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0005-Remove-first-param-from-drm_gem_object_lookup.patch196
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch29
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0006-Remove-vblank_disable_allowed-assignment.patch26
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0007-Fix-__drm_atomic_helper_connector_destroy_state-call.patch (renamed from pkgs/os-specific/linux/amdgpu-pro/patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch)15
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0008-Change-seq_printf-format-for-64-bit-context.patch30
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch25
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0009-Fix-vblank-calls.patch135
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0010-Fix-crtc_gamma-functions-for-4.8.0.patch163
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch112
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0011-Fix-drm_atomic_helper_swap_state-for-4.8.0.patch28
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0012-Add-extra-flag-to-ttm_bo_move_ttm-for-4.8.0-rc2.patch40
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0013-Remove-dependency-on-System.map.patch61
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0014-disable-dal-by-default.patch (renamed from pkgs/os-specific/linux/amdgpu-pro/patches/0009-disable-dal-by-default.patch)8
-rw-r--r--pkgs/os-specific/linux/kernel/linux-grsecurity.nix6
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix6
-rw-r--r--pkgs/servers/monitoring/telegraf/default.nix4
-rw-r--r--pkgs/servers/monitoring/telegraf/deps-1.1.1.nix (renamed from pkgs/servers/monitoring/telegraf/deps-1.0.1.nix)76
-rw-r--r--pkgs/tools/filesystems/btrfs-progs/default.nix4
-rw-r--r--pkgs/tools/misc/bmon/default.nix8
-rw-r--r--pkgs/tools/package-management/dpkg/default.nix11
-rw-r--r--pkgs/top-level/all-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix28
41 files changed, 1927 insertions, 825 deletions
diff --git a/pkgs/applications/editors/geany/default.nix b/pkgs/applications/editors/geany/default.nix
index 961c7ba04619..c0370229580b 100644
--- a/pkgs/applications/editors/geany/default.nix
+++ b/pkgs/applications/editors/geany/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, gtk2, which, pkgconfig, intltool, file }:
 
 let
-  version = "1.28";
+  version = "1.29";
 in
 
 stdenv.mkDerivation rec {
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://download.geany.org/${name}.tar.bz2";
-    sha256 = "0nha21rbdhl10vdpaq8d5v5fszvggl1xar555pvrnvm2y443ffpp";
+    sha256 = "394307596bc908419617e4c33e93eae8b5b733dfc8d01161677b8cbd3a4fb20f";
   };
 
   NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null;
diff --git a/pkgs/applications/editors/zile/default.nix b/pkgs/applications/editors/zile/default.nix
index 7282dc0ba202..58971b3199bf 100644
--- a/pkgs/applications/editors/zile/default.nix
+++ b/pkgs/applications/editors/zile/default.nix
@@ -1,11 +1,11 @@
 { fetchurl, stdenv, pkgconfig, ncurses, boehmgc, perl, help2man }:
 
 stdenv.mkDerivation rec {
-  name = "zile-2.4.11";
+  name = "zile-2.4.13";
 
   src = fetchurl {
     url = "mirror://gnu/zile/${name}.tar.gz";
-    sha256 = "1k593y1xzvlj52q0gyhcx2lllws4sg84b8r9pcginjb1vjypplhz";
+    sha256 = "03mcg0bxkzprlsx8y6h22w924pzx4a9zr7zm3g11j8j3x9lz75f7";
   };
 
   buildInputs = [ pkgconfig ncurses boehmgc ];
diff --git a/pkgs/applications/misc/getxbook/default.nix b/pkgs/applications/misc/getxbook/default.nix
new file mode 100644
index 000000000000..a77f87f6f1f1
--- /dev/null
+++ b/pkgs/applications/misc/getxbook/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, openssl }:
+
+stdenv.mkDerivation rec {
+  name    = "getxbook-${version}";
+  version = "1.2";
+
+  src = fetchurl {
+    url    = "https://njw.me.uk/getxbook/${name}.tar.xz";
+    sha256 = "0ihwrx4gspj8l7fc8vxch6dpjrw1lvv9z3c19f0wxnmnxhv1cjvs";
+  };
+
+  buildInputs = [ openssl ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with stdenv.lib; {
+    description = "A collection of tools to download books from Google Books";
+    homepage    = https://njw.me.uk/getxbook/;
+    license     = licenses.isc;
+    maintainers = with maintainers; [ obadz ];
+    platforms   = platforms.all;
+    inherit version;
+  };
+}
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix
index 6c4211178077..f162fe4a86ea 100644
--- a/pkgs/applications/science/logic/coq/default.nix
+++ b/pkgs/applications/science/logic/coq/default.nix
@@ -72,9 +72,9 @@ stdenv.mkDerivation {
       (when (fboundp 'get-coq-library-directory)
         (inherit-local-permanent coq-library-directory (get-coq-library-directory))
         (coq-prog-args))
-      ; Pass proof-general's coq flags to flycheck command (pretty ugly, should probably be part of PG)
-      (inherit-local-permanent flycheck-command-wrapper-function (lambda (cmd)
-        (append (funcall (default-value 'flycheck-command-wrapper-function) cmd) (coq-coqtop-prog-args coq-load-path))))
+      (mapc (lambda (arg)
+        (when (file-directory-p (concat arg "/lib/coq/${coq-version}/user-contrib"))
+          (setenv "COQPATH" (concat (getenv "COQPATH") ":" arg "/lib/coq/${coq-version}/user-contrib")))) '(${stdenv.lib.concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)}))
     '';
   };
 
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index e4ceff8e7819..37bc19a2b21e 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -43,7 +43,7 @@ self: super: {
     src = pkgs.fetchFromGitHub {
       owner = "joeyh";
       repo = "git-annex";
-      sha256 = "1np1v2x5n9dl39cbwlqbjap1j5120q4n8p18cm1884vdxidbkc01";
+      sha256 = "0bi4ynhjx265yaryx7yd5wmwf44hav8bmhkj0knwynb6kpl92qp8";
       rev = drv.version;
     };
   })).overrideScope (self: super: {
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index 728684fd028b..c835d85b97e4 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -1668,6 +1668,24 @@ self: {
        license = stdenv.lib.licenses.gpl3;
      }) {};
 
+  "BlastHTTP_1_2_1" = callPackage
+    ({ mkDerivation, base, biocore, biofasta, blastxml, bytestring
+     , conduit, HTTP, http-conduit, hxt, mtl, network, transformers
+     }:
+     mkDerivation {
+       pname = "BlastHTTP";
+       version = "1.2.1";
+       sha256 = "cee85e0fba0530aff57209b3d91a800db52b63c3f7e4a431a04e7a9cbd355bd5";
+       libraryHaskellDepends = [
+         base biocore biofasta blastxml bytestring conduit HTTP http-conduit
+         hxt mtl network transformers
+       ];
+       homepage = "https://github.com/eggzilla/BlastHTTP";
+       description = "Libary to interface with the NCBI blast REST interface";
+       license = stdenv.lib.licenses.gpl3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "Blobs" = callPackage
     ({ mkDerivation, base, containers, directory, HaXml, polyparse
      , pretty, wx, wxcore
@@ -4504,8 +4522,8 @@ self: {
      }:
      mkDerivation {
        pname = "EntrezHTTP";
-       version = "1.0.2";
-       sha256 = "547f087fcc10e85550775bb02c56b9eea6d2cd32d419cdbe0ab33ad28c0335e9";
+       version = "1.0.3";
+       sha256 = "395c438c8b5b68fc0826e1946483d252a8936d5a91a25bf928eef113b4f9a89b";
        libraryHaskellDepends = [
          base biocore bytestring conduit HTTP http-conduit hxt mtl network
          Taxonomy text transformers
@@ -5751,12 +5769,19 @@ self: {
      }) {};
 
   "GPipe-GLFW" = callPackage
-    ({ mkDerivation, base, GLFW-b, GPipe, transformers }:
+    ({ mkDerivation, base, exception-transformers, GLFW-b, GPipe
+     , transformers
+     }:
      mkDerivation {
        pname = "GPipe-GLFW";
-       version = "1.2.2";
-       sha256 = "b2c2764511504225550b7e03badba80ba6e264eb86bee3fcc2f7d54e2e11d652";
+       version = "1.2.3";
+       sha256 = "a6854b9e0a2790db5205d22035cfa6e68c8e2341918a875e851f22264a9b5c40";
+       isLibrary = true;
+       isExecutable = true;
        libraryHaskellDepends = [ base GLFW-b GPipe transformers ];
+       executableHaskellDepends = [
+         base exception-transformers GPipe transformers
+       ];
        homepage = "https://github.com/plredmond/GPipe-GLFW";
        description = "GLFW OpenGL context creation for GPipe";
        license = stdenv.lib.licenses.mit;
@@ -13686,10 +13711,10 @@ self: {
     ({ mkDerivation, base, containers, mtl, old-time, random }:
      mkDerivation {
        pname = "QIO";
-       version = "1.2";
-       sha256 = "a6c35c08c698137e2923a1e5d5877d0349f75711d6119fcb68eb395b72b1a0f2";
+       version = "1.3";
+       sha256 = "e81da8f965cc031009fd9005f5cc253b83466bc0a14a2857d73c2c902ab6aba7";
        libraryHaskellDepends = [ base containers mtl old-time random ];
-       homepage = "http://www.cs.nott.ac.uk/~asg/QIO/";
+       homepage = "https://github.com/alexandersgreen/qio-haskell";
        description = "The Quantum IO Monad is a library for defining quantum computations in Haskell";
        license = stdenv.lib.licenses.bsd3;
        hydraPlatforms = stdenv.lib.platforms.none;
@@ -14136,8 +14161,8 @@ self: {
      }:
      mkDerivation {
        pname = "RNAlien";
-       version = "1.2.5";
-       sha256 = "ab604c7e96b0801d9dc4fa7f30335e918b485dc433efdfb1e56f4c4dc38be6cd";
+       version = "1.2.6";
+       sha256 = "a3a0de2cde3813f9e7f87f27f8ebf306bcb6da8da6b818624a335c329e051874";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -17976,8 +18001,8 @@ self: {
      }:
      mkDerivation {
        pname = "XSaiga";
-       version = "1.3.0.1";
-       sha256 = "a913eac19f76759271bc331084773e04f4d6d16dd70190e10bd9403e51cdaad2";
+       version = "1.4.0.1";
+       sha256 = "f9eae0f1298cf4ab340b9a2761a1b4f80cffdf25a73ef8679c750008ba4316d2";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -32797,6 +32822,31 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "bitx-bitcoin_0_11_0_0" = callPackage
+    ({ mkDerivation, aeson, base, bytestring, deepseq, directory
+     , doctest, exceptions, hspec, http-client, http-client-tls
+     , http-types, microlens, microlens-th, network, QuickCheck, safe
+     , scientific, split, text, time
+     }:
+     mkDerivation {
+       pname = "bitx-bitcoin";
+       version = "0.11.0.0";
+       sha256 = "9f46782f5a9688b7c1681789d7165c9a21247dc5fc67807cf847bf526414ce20";
+       libraryHaskellDepends = [
+         aeson base bytestring deepseq exceptions http-client
+         http-client-tls http-types microlens microlens-th network
+         QuickCheck scientific split text time
+       ];
+       testHaskellDepends = [
+         aeson base bytestring directory doctest hspec http-client
+         http-types microlens safe text time
+       ];
+       homepage = "https://github.com/tebello-thejane/bitx.hs";
+       description = "A Haskell library for working with the BitX bitcoin exchange";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "bk-tree" = callPackage
     ({ mkDerivation, base, containers }:
      mkDerivation {
@@ -34410,8 +34460,8 @@ self: {
      }:
      mkDerivation {
        pname = "brick";
-       version = "0.13";
-       sha256 = "5e5687cdb05065e564140d1970d737f8c8a73f57b321fb522cc7b32c96765ee7";
+       version = "0.14";
+       sha256 = "5cccff3f432593ad50288e66a78a115c5e030bbb3aca37c332a914d6743bcc81";
        libraryHaskellDepends = [
          base containers contravariant data-default deepseq microlens
          microlens-mtl microlens-th template-haskell text text-zipper
@@ -34632,6 +34682,19 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "btrfs_0_1_2_1" = callPackage
+    ({ mkDerivation, base, bytestring, time, unix }:
+     mkDerivation {
+       pname = "btrfs";
+       version = "0.1.2.1";
+       sha256 = "85b28c30a369958cd86ab2d822aa874846950e2720d0b9cda5ef8cd225cf3ee0";
+       libraryHaskellDepends = [ base bytestring time unix ];
+       homepage = "https://github.com/redneb/hs-btrfs";
+       description = "Bindings to the btrfs API";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "buffer-builder" = callPackage
     ({ mkDerivation, aeson, attoparsec, base, bytestring, criterion
      , deepseq, HTF, mtl, quickcheck-instances, text
@@ -37951,6 +38014,31 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "cassava_0_4_5_1" = callPackage
+    ({ mkDerivation, array, attoparsec, base, blaze-builder, bytestring
+     , containers, deepseq, hashable, HUnit, QuickCheck, test-framework
+     , test-framework-hunit, test-framework-quickcheck2, text
+     , unordered-containers, vector
+     }:
+     mkDerivation {
+       pname = "cassava";
+       version = "0.4.5.1";
+       sha256 = "7c622ae9dc647508662a1cda3fe3f6d7032786e4e3d15f8488de9e9330cf9d9f";
+       libraryHaskellDepends = [
+         array attoparsec base blaze-builder bytestring containers deepseq
+         hashable text unordered-containers vector
+       ];
+       testHaskellDepends = [
+         attoparsec base bytestring hashable HUnit QuickCheck test-framework
+         test-framework-hunit test-framework-quickcheck2 text
+         unordered-containers vector
+       ];
+       homepage = "https://github.com/hvr/cassava";
+       description = "A CSV parsing and encoding library";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "cassava-conduit" = callPackage
     ({ mkDerivation, array, base, bifunctors, bytestring, cassava
      , conduit, conduit-extra, containers, mtl, QuickCheck, text
@@ -40387,6 +40475,17 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "classyplate" = callPackage
+    ({ mkDerivation, base, template-haskell, type-list }:
+     mkDerivation {
+       pname = "classyplate";
+       version = "0.1.0.0";
+       sha256 = "b10d14b679f41e41755013b18b11158310bf80ff415cb369444a8f82388f6fbc";
+       libraryHaskellDepends = [ base template-haskell type-list ];
+       description = "Fuseable type-class based generics";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "clay" = callPackage
     ({ mkDerivation, base, hspec, hspec-expectations, mtl, text }:
      mkDerivation {
@@ -41149,6 +41248,28 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "clustering_0_3_1" = callPackage
+    ({ mkDerivation, base, binary, containers, hierarchical-clustering
+     , matrices, mwc-random, parallel, primitive, Rlang-QQ, split, tasty
+     , tasty-hunit, tasty-quickcheck, unordered-containers, vector
+     }:
+     mkDerivation {
+       pname = "clustering";
+       version = "0.3.1";
+       sha256 = "bc69248083d4c7f7ed32b1f0971d18a52414fd0ee8bc1f05fea8e4538fe87f86";
+       libraryHaskellDepends = [
+         base binary containers matrices mwc-random parallel primitive
+         unordered-containers vector
+       ];
+       testHaskellDepends = [
+         base binary hierarchical-clustering matrices mwc-random Rlang-QQ
+         split tasty tasty-hunit tasty-quickcheck vector
+       ];
+       description = "High performance clustering algorithms";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "clustertools" = callPackage
     ({ mkDerivation, base, bio, bytestring, containers, QuickCheck
      , regex-compat, simpleargs
@@ -43452,7 +43573,7 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
-  "conduit-extra_1_1_14" = callPackage
+  "conduit-extra_1_1_15" = callPackage
     ({ mkDerivation, async, attoparsec, base, blaze-builder, bytestring
      , bytestring-builder, conduit, directory, exceptions, filepath
      , hspec, monad-control, network, primitive, process, QuickCheck
@@ -43461,8 +43582,8 @@ self: {
      }:
      mkDerivation {
        pname = "conduit-extra";
-       version = "1.1.14";
-       sha256 = "6f3abc94f28fb577fc03383ba477fe4f2635cb14fed2f90c7520e1331dc343c6";
+       version = "1.1.15";
+       sha256 = "7bef29eb0db59c236519b0c5cac82183ed7741a535a57e0772aac1158e90bb8d";
        libraryHaskellDepends = [
          async attoparsec base blaze-builder bytestring conduit directory
          exceptions filepath monad-control network primitive process
@@ -43470,7 +43591,7 @@ self: {
        ];
        testHaskellDepends = [
          async attoparsec base blaze-builder bytestring bytestring-builder
-         conduit exceptions hspec process QuickCheck resourcet stm
+         conduit directory exceptions hspec process QuickCheck resourcet stm
          streaming-commons text transformers transformers-base
        ];
        homepage = "http://github.com/snoyberg/conduit";
@@ -45923,8 +46044,8 @@ self: {
      }:
      mkDerivation {
        pname = "crawlchain";
-       version = "0.1.0.9";
-       sha256 = "12bd2f1f2f9dbe5abb67a77a85db087669917381f2ddcc2b28fb5d3aa1248238";
+       version = "0.1.1.4";
+       sha256 = "0754ba3c874648e6c6e84c17d2d729cc3427f3cad2f1d0f37fbbcb4841020917";
        libraryHaskellDepends = [
          base bytestring directory HTTP network-uri split tagsoup time
        ];
@@ -47404,8 +47525,8 @@ self: {
      }:
      mkDerivation {
        pname = "cubicbezier";
-       version = "0.4.0.2";
-       sha256 = "b3e87a3fa4000f44121b6278d1a0b258acc2c71425fe7bf9d565fa7c36581a17";
+       version = "0.5.0.0";
+       sha256 = "96c2792707bc80a45a428886af97c1b4c7524a2e9ba0be13fa60d7bac879e508";
        libraryHaskellDepends = [
          base containers integration matrices microlens microlens-mtl
          microlens-th mtl vector
@@ -50786,8 +50907,8 @@ self: {
      }:
      mkDerivation {
        pname = "debian";
-       version = "3.91.1";
-       sha256 = "0624b718aec8e1d28fdf4d471c1236a66099555ac22858dbe49a7ee00f9b25e6";
+       version = "3.91.2";
+       sha256 = "16b14ad562ef5895462b59790f42d591d977e1433c4c2763a3a6a34e052e0d56";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -52294,7 +52415,7 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "diagrams-contrib_1_4" = callPackage
+  "diagrams-contrib_1_4_0_1" = callPackage
     ({ mkDerivation, base, circle-packing, colour, containers
      , cubicbezier, data-default, data-default-class, diagrams-core
      , diagrams-lib, diagrams-solve, force-layout, hashable, HUnit, lens
@@ -52304,8 +52425,8 @@ self: {
      }:
      mkDerivation {
        pname = "diagrams-contrib";
-       version = "1.4";
-       sha256 = "1b06f7d5fb4ae77a851ef2c6e6f7193418e679198b757bbd75b81798c6f8dceb";
+       version = "1.4.0.1";
+       sha256 = "1194be9ab13c8660ef1c56c35b3a6578953db51e173de96eb8d49603e855750c";
        libraryHaskellDepends = [
          base circle-packing colour containers cubicbezier data-default
          data-default-class diagrams-core diagrams-lib diagrams-solve
@@ -55761,11 +55882,11 @@ self: {
     ({ mkDerivation, base, drmaa, inline-c, shelly, text }:
      mkDerivation {
        pname = "drmaa";
-       version = "0.1.0.1";
-       sha256 = "5cb530e4c7f8cde9e8b4520ef116a44e9c5cde8191ad7f91964ca270c69ae1e7";
+       version = "0.1.1";
+       sha256 = "66b095d3b94ed531e2a704fba319002e8d3b7b6f9b3f68102a4b4d0f7a048567";
        libraryHaskellDepends = [ base inline-c shelly text ];
        librarySystemDepends = [ drmaa ];
-       description = "A simple Haskell bindings to DRMAA C library";
+       description = "A minimal Haskell bindings to DRMAA C library";
        license = stdenv.lib.licenses.bsd3;
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {drmaa = null;};
@@ -58136,6 +58257,28 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "emailaddress_0_2_0_0" = callPackage
+    ({ mkDerivation, aeson, base, bifunctors, bytestring, doctest
+     , email-validate, Glob, http-api-data, opaleye, path-pieces
+     , persistent, postgresql-simple, product-profunctors, profunctors
+     , text
+     }:
+     mkDerivation {
+       pname = "emailaddress";
+       version = "0.2.0.0";
+       sha256 = "390b0aaf8fa2d3a694b812ad83fc0f26ed5c7172cc318a7d46c1fc3456d9c15c";
+       libraryHaskellDepends = [
+         aeson base bifunctors bytestring email-validate http-api-data
+         opaleye path-pieces persistent postgresql-simple
+         product-profunctors profunctors text
+       ];
+       testHaskellDepends = [ base doctest Glob ];
+       homepage = "https://github.com/cdepillabout/emailaddress#readme";
+       description = "Wrapper around email-validate library adding instances for common type classes";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "emailparse" = callPackage
     ({ mkDerivation, attoparsec, base, bytestring, either
      , either-unwrap, HUnit, mime, MissingH, mtl, QuickCheck, strptime
@@ -61463,8 +61606,8 @@ self: {
      }:
      mkDerivation {
        pname = "fbmessenger-api";
-       version = "0.1.2.0";
-       sha256 = "94bba7cff0abeb451ca841d30ef8237c9803331e1e988a9a5f6303eb4797ab2c";
+       version = "0.1.2.1";
+       sha256 = "9df807a7c6ecf9dc374a17cbda52433b2567aa60753797497c7e043ef6837237";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -68584,6 +68727,35 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "ghcid_0_6_6" = callPackage
+    ({ mkDerivation, ansi-terminal, base, cmdargs, containers
+     , directory, extra, filepath, fsnotify, process, tasty, tasty-hunit
+     , terminal-size, time, unix
+     }:
+     mkDerivation {
+       pname = "ghcid";
+       version = "0.6.6";
+       sha256 = "62f567852111da733b6feedbfb37ff561889e27af63d16df048f37a4bfeb6ab0";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         base cmdargs directory extra filepath process terminal-size time
+         unix
+       ];
+       executableHaskellDepends = [
+         ansi-terminal base cmdargs containers directory extra filepath
+         fsnotify process terminal-size time unix
+       ];
+       testHaskellDepends = [
+         ansi-terminal base cmdargs containers directory extra filepath
+         fsnotify process tasty tasty-hunit terminal-size time unix
+       ];
+       homepage = "https://github.com/ndmitchell/ghcid#readme";
+       description = "GHCi based bare bones IDE";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "ghcjs-ajax" = callPackage
     ({ mkDerivation, aeson, base, http-types, text }:
      mkDerivation {
@@ -68612,8 +68784,8 @@ self: {
     ({ mkDerivation, base, ghcjs-dom-jsaddle, text, transformers }:
      mkDerivation {
        pname = "ghcjs-dom";
-       version = "0.5.0.2";
-       sha256 = "78b95464b0101d3ffe9d23452c738bdb924c7a3737121e2a938fde863627bd8e";
+       version = "0.6.0.0";
+       sha256 = "35b859e5a09dd12ada9cea7c343dae75500f50cd7d5ff247d5a5868d419049d6";
        libraryHaskellDepends = [
          base ghcjs-dom-jsaddle text transformers
        ];
@@ -68642,8 +68814,8 @@ self: {
     ({ mkDerivation, jsaddle-dom }:
      mkDerivation {
        pname = "ghcjs-dom-jsaddle";
-       version = "0.5.0.0";
-       sha256 = "8886b7ee0f737b23139845d5dd5c56b79e891df15f632378a064f26d404bbda8";
+       version = "0.6.0.0";
+       sha256 = "92dea9556a700d8473b0657f80228868194984dd9edb3405cd11f58939d81e5a";
        libraryHaskellDepends = [ jsaddle-dom ];
        doHaddock = false;
        description = "DOM library that supports both GHCJS and GHC using jsaddle";
@@ -68655,8 +68827,8 @@ self: {
     ({ mkDerivation }:
      mkDerivation {
        pname = "ghcjs-dom-jsffi";
-       version = "0.5.0.2";
-       sha256 = "4e7042c09170af65a486a87a134d40519c1cecf663956349f26729490063d878";
+       version = "0.6.0.0";
+       sha256 = "cf65462c0b94e3d2b21efc78dd60e90e147767a0b9719a7542f4a040dc00e60d";
        isLibrary = false;
        isExecutable = false;
        description = "DOM library using JSFFI and GHCJS";
@@ -68706,6 +68878,19 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "ghcjs-promise" = callPackage
+    ({ mkDerivation, base, ghcjs-base, protolude }:
+     mkDerivation {
+       pname = "ghcjs-promise";
+       version = "0.1.0.3";
+       sha256 = "2395a17260e27ac252df2a5968de8ee5f0cf55d970c2fbe6fb27b2ccf01af81b";
+       libraryHaskellDepends = [ base ghcjs-base protolude ];
+       homepage = "https://github.com/vwwv/ghcjs-promise";
+       description = "Bidirectional bidings to javascript's promise";
+       license = stdenv.lib.licenses.bsd3;
+       broken = true;
+     }) {ghcjs-base = null;};
+
   "ghcjs-websockets" = callPackage
     ({ mkDerivation, base, base64-bytestring, binary, bytestring, text
      }:
@@ -69697,8 +69882,8 @@ self: {
      }:
      mkDerivation {
        pname = "ginger";
-       version = "0.3.7.0";
-       sha256 = "97918cba0952621a9bdb78718c824a6f43a0098f6e52335d35164a2f9c7d7afa";
+       version = "0.3.7.1";
+       sha256 = "6e30c1fff6bd5ebc5bea71307e3cc6e726d96487d1b66894e754dc90afe76831";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -69920,8 +70105,8 @@ self: {
      }:
      mkDerivation {
        pname = "git-annex";
-       version = "6.20161031";
-       sha256 = "6de3751f361d730e4a69106443b747a45e27aaeabf51ea999c41bd92fd2c71ce";
+       version = "6.20161111";
+       sha256 = "d6ea2566b5883fce8cdbd498d5b6fc22c4ed042de6514622b8b4a59ea4564f45";
        configureFlags = [
          "-fassistant" "-fcryptonite" "-fdbus" "-fdesktopnotify" "-fdns"
          "-ffeed" "-finotify" "-fpairing" "-fproduction" "-fquvi" "-fs3"
@@ -70147,17 +70332,22 @@ self: {
      }) {};
 
   "git-repair" = callPackage
-    ({ mkDerivation, async, base, bytestring, containers, directory
-     , exceptions, filepath, hslogger, IfElse, MissingH, mtl, network
-     , network-uri, optparse-applicative, process, QuickCheck, text
-     , time, transformers, unix, unix-compat, utf8-string
+    ({ mkDerivation, async, base, bytestring, Cabal, containers
+     , data-default, directory, exceptions, filepath, hslogger, IfElse
+     , MissingH, mtl, network, network-uri, optparse-applicative
+     , process, QuickCheck, text, time, transformers, unix, unix-compat
+     , utf8-string
      }:
      mkDerivation {
        pname = "git-repair";
-       version = "1.20151215";
-       sha256 = "e1e5756f7ffba86a36abcdc296e0730b2a74e0f5e7711b0b6b89a09eb6f10463";
+       version = "1.20161111";
+       sha256 = "4ce6447c2a2b678b7fd3f677aa29b8f1b018d5d11822bf5488df83e6c9cbaf54";
        isLibrary = false;
        isExecutable = true;
+       setupHaskellDepends = [
+         base bytestring Cabal data-default directory exceptions filepath
+         hslogger IfElse MissingH process unix unix-compat
+       ];
        executableHaskellDepends = [
          async base bytestring containers directory exceptions filepath
          hslogger IfElse MissingH mtl network network-uri
@@ -77980,25 +78170,27 @@ self: {
      }) {};
 
   "hackport" = callPackage
-    ({ mkDerivation, array, base, base64-bytestring, binary, bytestring
-     , containers, cryptohash, deepseq, directory, ed25519
-     , extensible-exceptions, filepath, ghc-prim, hashable, HTTP, HUnit
-     , MissingH, mtl, network, network-uri, old-locale, old-time, parsec
-     , pretty, process, random, regex-compat, split, stm, tar
-     , template-haskell, time, transformers, unix, xml, zlib
+    ({ mkDerivation, array, async, base, base16-bytestring
+     , base64-bytestring, binary, bytestring, containers, cryptohash
+     , deepseq, directory, ed25519, extensible-exceptions, filepath
+     , ghc-prim, hashable, HTTP, HUnit, MissingH, mtl, network
+     , network-uri, old-locale, old-time, parsec, pretty, process
+     , random, regex-compat, split, stm, tar, template-haskell, time
+     , transformers, unix, xml, zlib
      }:
      mkDerivation {
        pname = "hackport";
-       version = "0.5";
-       sha256 = "90594dc1ff022a8fd2779548835555576df134feaf875cadca24378ece7fd97f";
+       version = "0.5.1";
+       sha256 = "667af1dc76c2833dd1fec935c5e61cc331be3c7b20c77ff68206177f70eccdad";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
-         array base base64-bytestring binary bytestring containers
-         cryptohash deepseq directory ed25519 extensible-exceptions filepath
-         ghc-prim hashable HTTP MissingH mtl network network-uri old-locale
-         old-time parsec pretty process random regex-compat split stm tar
-         template-haskell time transformers unix xml zlib
+         array async base base16-bytestring base64-bytestring binary
+         bytestring containers cryptohash deepseq directory ed25519
+         extensible-exceptions filepath ghc-prim hashable HTTP MissingH mtl
+         network network-uri old-locale old-time parsec pretty process
+         random regex-compat split stm tar template-haskell time
+         transformers unix xml zlib
        ];
        testHaskellDepends = [
          base binary bytestring containers deepseq directory
@@ -78429,6 +78621,22 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "hailgun-simple" = callPackage
+    ({ mkDerivation, base, email-validate, hailgun, mtl, text
+     , transformers
+     }:
+     mkDerivation {
+       pname = "hailgun-simple";
+       version = "0.1.0.0";
+       sha256 = "30526e6b7ec6083b090e880ef6fe942cc8425d3b2700bac565e4fc6629ec2954";
+       libraryHaskellDepends = [
+         base email-validate hailgun mtl text transformers
+       ];
+       homepage = "https://github.com/cdepillabout/hailgun-simple";
+       description = "Easy-to-use wrapper for the hailgun package";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "hails" = callPackage
     ({ mkDerivation, authenticate, base, base64-bytestring, binary
      , blaze-builder, bson, bytestring, conduit, conduit-extra
@@ -85079,8 +85287,8 @@ self: {
      }:
      mkDerivation {
        pname = "heckle";
-       version = "2.0.1.1";
-       sha256 = "ba4defee459e282b1308ee66ed9148ea9bd936eae41136f82c6ffbb71981dd14";
+       version = "2.0.1.5";
+       sha256 = "64655fc2c10b00e31cbd8ba6ca6a339fdb184f580f56e24258ecf85605e7d97b";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -85281,6 +85489,8 @@ self: {
        pname = "heist";
        version = "1.0.1.0";
        sha256 = "fd4ff3c1bfc1473feb9e913a5cdecaf56bc9db022abc27a76768cb6345c68bcb";
+       revision = "1";
+       editedCabalFile = "35cc7972ed625260f5f5885852551b9151cea0fad1c9855af09c5d82e20ae830";
        libraryHaskellDepends = [
          aeson attoparsec base blaze-builder blaze-html bytestring
          containers directory directory-tree dlist filepath hashable
@@ -88752,6 +88962,24 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {inherit (pkgs) gsl;};
 
+  "hmatrix-gsl-stats_0_4_1_6" = callPackage
+    ({ mkDerivation, base, binary, gsl, hmatrix, storable-complex
+     , vector
+     }:
+     mkDerivation {
+       pname = "hmatrix-gsl-stats";
+       version = "0.4.1.6";
+       sha256 = "1bf5bb87312525256868872a5d51e43d851b75ef549a8834052263171b91cd71";
+       libraryHaskellDepends = [
+         base binary hmatrix storable-complex vector
+       ];
+       libraryPkgconfigDepends = [ gsl ];
+       homepage = "http://code.haskell.org/hmatrix-gsl-stats";
+       description = "GSL Statistics interface";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {inherit (pkgs) gsl;};
+
   "hmatrix-mmap" = callPackage
     ({ mkDerivation, base, hmatrix, mmap }:
      mkDerivation {
@@ -90097,7 +90325,7 @@ self: {
        description = "Haskell binding to libopencc";
        license = stdenv.lib.licenses.bsd3;
        hydraPlatforms = stdenv.lib.platforms.none;
-     }) {opencc = null;};
+     }) {inherit (pkgs) opencc;};
 
   "hopencl" = callPackage
     ({ mkDerivation, base, bytestring, c2hs, HUnit, OpenCL, QuickCheck
@@ -92243,8 +92471,8 @@ self: {
     ({ mkDerivation, base, containers, directory, filepath, process }:
      mkDerivation {
        pname = "hsc2hs";
-       version = "0.68";
-       sha256 = "13834608a7a768e4aeeefee0a79660b2fc7c91bb83e036f0c1cb7b0543c61fda";
+       version = "0.68.1";
+       sha256 = "507bf174c7ab14667d452efb6b539798a944f2a5fd4cd45120a1afb8551ebe75";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -92795,6 +93023,8 @@ self: {
        pname = "hsdev";
        version = "0.2.1.0";
        sha256 = "8d89f4cf2e67c2e55a94068538818e297efa07429a26b4009eff5d04724e7794";
+       revision = "1";
+       editedCabalFile = "2ed64491515bb9af5b43ee11a203925987797d5492a3c143a37ad6eae8a7c8f6";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -93153,6 +93383,28 @@ self: {
      }) {inherit (pkgs) blas; inherit (pkgs) gsl; 
          inherit (pkgs) liblapack;};
 
+  "hsignal_0_2_7_5" = callPackage
+    ({ mkDerivation, array, base, binary, blas, bytestring, gsl
+     , hmatrix, hmatrix-gsl, hmatrix-gsl-stats, hstatistics, liblapack
+     , mtl, storable-complex, vector
+     }:
+     mkDerivation {
+       pname = "hsignal";
+       version = "0.2.7.5";
+       sha256 = "0f61f820556c431c3811643cc40e49a6d6c68075da1be0b39298a41c1c7119ac";
+       libraryHaskellDepends = [
+         array base binary bytestring hmatrix hmatrix-gsl hmatrix-gsl-stats
+         hstatistics mtl storable-complex vector
+       ];
+       librarySystemDepends = [ blas liblapack ];
+       libraryPkgconfigDepends = [ gsl ];
+       homepage = "http://code.haskell.org/hsignal";
+       description = "Signal processing and EEG data analysis";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {inherit (pkgs) blas; inherit (pkgs) gsl; 
+         inherit (pkgs) liblapack;};
+
   "hsilop" = callPackage
     ({ mkDerivation, base, directory, filepath, haskeline, xdg-basedir
      }:
@@ -94861,6 +95113,23 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "hstatistics_0_2_5_4" = callPackage
+    ({ mkDerivation, array, base, hmatrix, hmatrix-gsl-stats, random
+     , vector
+     }:
+     mkDerivation {
+       pname = "hstatistics";
+       version = "0.2.5.4";
+       sha256 = "e657ac9bb672b502d5dec0e8920679a5833be5bfe0a8a981b7eccc0a99a0e47b";
+       libraryHaskellDepends = [
+         array base hmatrix hmatrix-gsl-stats random vector
+       ];
+       homepage = "http://code.haskell.org/hstatistics";
+       description = "Statistics";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "hstats" = callPackage
     ({ mkDerivation, base }:
      mkDerivation {
@@ -99378,6 +99647,19 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "ieee754_0_7_9" = callPackage
+    ({ mkDerivation, base }:
+     mkDerivation {
+       pname = "ieee754";
+       version = "0.7.9";
+       sha256 = "dc1860c545d7143ea8c7e53509ac535ca2932495f0f89b2801c960295cfcdd15";
+       libraryHaskellDepends = [ base ];
+       homepage = "http://github.com/patperry/hs-ieee754";
+       description = "Utilities for dealing with IEEE floating point numbers";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "ieee754-parser" = callPackage
     ({ mkDerivation, base, binary, bytestring }:
      mkDerivation {
@@ -104056,23 +104338,17 @@ self: {
      }) {};
 
   "jsaddle" = callPackage
-    ({ mkDerivation, aeson, base, bytestring, containers, doctest
-     , filepath, http-types, lens, primitive, process, QuickCheck
-     , ref-tf, stm, template-haskell, text, time, transformers, vector
-     , wai, wai-app-static, wai-websockets, warp, websockets
+    ({ mkDerivation, aeson, base, bytestring, containers, filepath
+     , http-types, lens, primitive, process, ref-tf, stm
+     , template-haskell, text, time, transformers
      }:
      mkDerivation {
        pname = "jsaddle";
-       version = "0.5.2.0";
-       sha256 = "216fe089de60352956df2aa3abcb1e28861e81d1943ae1a17ac7947aad18a4fb";
+       version = "0.6.0.1";
+       sha256 = "16bca9ea2c962ecaeb42961b9795de61504f1c214a20d189c3e3483cdbc557e1";
        libraryHaskellDepends = [
          aeson base bytestring containers filepath http-types lens primitive
-         process ref-tf stm template-haskell text time transformers wai
-         wai-app-static wai-websockets warp websockets
-       ];
-       testHaskellDepends = [
-         base bytestring doctest filepath http-types process QuickCheck text
-         vector wai wai-app-static wai-websockets warp websockets
+         process ref-tf stm template-haskell text time transformers
        ];
        description = "Interface for JavaScript that works with GHCJS and GHC";
        license = stdenv.lib.licenses.mit;
@@ -104085,8 +104361,8 @@ self: {
      }:
      mkDerivation {
        pname = "jsaddle-dom";
-       version = "0.5.0.1";
-       sha256 = "fb64e3a7924c6191e39f61845fec44acc14502b5d70e6ec3b8fd12dbadb9904a";
+       version = "0.6.0.0";
+       sha256 = "ef270104ea9a4eef9eca156bd2406f1ad453f1d7543e9dc3054d4549e8a85e37";
        libraryHaskellDepends = [
          base base-compat jsaddle lens text transformers
        ];
@@ -104110,6 +104386,39 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "jsaddle-warp" = callPackage
+    ({ mkDerivation, aeson, base, bytestring, containers, doctest
+     , filepath, http-types, jsaddle, lens, primitive, process
+     , QuickCheck, ref-tf, stm, text, time, transformers, wai
+     , wai-websockets, warp, websockets
+     }:
+     mkDerivation {
+       pname = "jsaddle-warp";
+       version = "0.6.0.1";
+       sha256 = "c91ba8f83df56044247ee8deadec3889346c640b069efed2b8035162e8c4cfc0";
+       libraryHaskellDepends = [
+         aeson base containers http-types jsaddle stm text time transformers
+         wai wai-websockets warp websockets
+       ];
+       testHaskellDepends = [
+         base bytestring doctest filepath jsaddle lens primitive process
+         QuickCheck ref-tf
+       ];
+       description = "Interface for JavaScript that works with GHCJS and GHC";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
+  "jsaddle-wkwebview" = callPackage
+    ({ mkDerivation, aeson, base, bytestring, jsaddle }:
+     mkDerivation {
+       pname = "jsaddle-wkwebview";
+       version = "0.6.0.0";
+       sha256 = "cedc6b826bc2b07841aed149ecf3ad3c39f5ed75964f3ea49e0ee3c445b5373c";
+       libraryHaskellDepends = [ aeson base bytestring jsaddle ];
+       description = "Interface for JavaScript that works with GHCJS and GHC";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "jsc" = callPackage
     ({ mkDerivation, base, jmacro, lens, template-haskell, text
      , transformers, webkitgtk3, webkitgtk3-javascriptcore
@@ -104323,8 +104632,8 @@ self: {
      }:
      mkDerivation {
        pname = "json-bytes-builder";
-       version = "0.4";
-       sha256 = "f4f6084ee679640c97a62e0bf108fc7526fab7d69e786c881281c94e416e2e97";
+       version = "0.5";
+       sha256 = "b2c1114ef0a164fdf6b5c0899790fd5c91fa98b66b4a65475ba82829a5efa3ad";
        libraryHaskellDepends = [
          base base-prelude bytestring scientific semigroups text
        ];
@@ -113044,6 +113353,8 @@ self: {
        pname = "logging-facade";
        version = "0.1.1";
        sha256 = "60f9f29d54e9756825400f281101872ed87de55271e87571068838a7b3d98da2";
+       revision = "1";
+       editedCabalFile = "fc89005336a9b64c524183154716ebf8a26c27f8fa5730225f818f0128c2a2b2";
        libraryHaskellDepends = [ base template-haskell transformers ];
        testHaskellDepends = [ base hspec ];
        description = "Simple logging abstraction that allows multiple back-ends";
@@ -113590,8 +113901,8 @@ self: {
      }:
      mkDerivation {
        pname = "lp-diagrams";
-       version = "2.0.0";
-       sha256 = "8ff64960d7874d4a34867d8834eac9c535b73175f0abe8743b50dfd886aabf50";
+       version = "2.1.0";
+       sha256 = "289129d3581ea5276c3e9a829322bc1ce38ca62094390706a5fa2c6f176c37be";
        libraryHaskellDepends = [
          base containers gasp graphviz labeled-tree lens mtl parsek
          polynomials-bernstein process reflection text typography-geometry
@@ -115727,27 +116038,25 @@ self: {
      }) {};
 
   "marxup" = callPackage
-    ({ mkDerivation, base, configurator, containers, cubicbezier
-     , directory, dlist, filepath, glpk-hs, graphviz, labeled-tree, lens
-     , mtl, parsek, polynomials-bernstein, pretty, process, text
-     , typography-geometry, vector
+    ({ mkDerivation, base, configurator, containers, directory, dlist
+     , filepath, haskell-src-exts, labeled-tree, lens, lp-diagrams, mtl
+     , parsek, pretty, process, text
      }:
      mkDerivation {
        pname = "marxup";
-       version = "3.0.0.1";
-       sha256 = "1675a378317ff0b1b3e2500ae8b4e62555dc85c4ab8d8f72c0d3cc227c4edf07";
+       version = "3.1.0.0";
+       sha256 = "21dded8147b7eed7ae4ae5a1ba10648467f77334e01351d1dff754fc59585f2f";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
-         base containers cubicbezier directory filepath glpk-hs graphviz
-         labeled-tree lens mtl polynomials-bernstein process text
-         typography-geometry vector
+         base containers directory filepath haskell-src-exts labeled-tree
+         lens lp-diagrams mtl process text
        ];
        executableHaskellDepends = [
          base configurator dlist parsek pretty
        ];
        description = "Markup language preprocessor for Haskell";
-       license = "GPL";
+       license = stdenv.lib.licenses.gpl2;
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
@@ -118472,15 +118781,15 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "modify-fasta_0_8_2_2" = callPackage
+  "modify-fasta_0_8_2_3" = callPackage
     ({ mkDerivation, base, containers, fasta, mtl, optparse-applicative
-     , pipes, pipes-text, regex-tdfa, regex-tdfa-text, split, text
-     , text-show
+     , pipes, pipes-text, regex-tdfa, regex-tdfa-text, semigroups, split
+     , text, text-show
      }:
      mkDerivation {
        pname = "modify-fasta";
-       version = "0.8.2.2";
-       sha256 = "76d72306f18d23ef72ec8dada391483136689f3b0a2f074ec79506759908100f";
+       version = "0.8.2.3";
+       sha256 = "dcee07de4f97b10c557cc3a18aee35d75caf8ef65bdc104bcd6785bfabc7465e";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -118489,7 +118798,7 @@ self: {
        ];
        executableHaskellDepends = [
          base containers fasta mtl optparse-applicative pipes pipes-text
-         split text
+         semigroups split text
        ];
        homepage = "https://github.com/GregorySchwartz/modify-fasta";
        description = "Modify fasta (and CLIP) files in several optional ways";
@@ -120036,6 +120345,8 @@ self: {
        pname = "monky";
        version = "2.1.0.0";
        sha256 = "044ea050aa7be67209652fb1a8cca97ad017a2effcdd41432c959a1b840439d0";
+       revision = "1";
+       editedCabalFile = "8dac5d11177a4374041712a519d50cb6b1fd41fffe201e77eff44f103257c446";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -120981,12 +121292,12 @@ self: {
      }) {};
 
   "mtl-c" = callPackage
-    ({ mkDerivation, base, mtl }:
+    ({ mkDerivation, base, mtl, transformers }:
      mkDerivation {
        pname = "mtl-c";
-       version = "0.1";
-       sha256 = "eb852379c1710af26179c148114b5269f568e3b8317b1a5716f2a07d00942159";
-       libraryHaskellDepends = [ base mtl ];
+       version = "0.1.1";
+       sha256 = "2dd7da3c2ed207aa2e4bb5b49aa09e537cfe8c2cae241d026bc52cd091f6ea8b";
+       libraryHaskellDepends = [ base mtl transformers ];
        homepage = "https://github.com/fumieval/mtl-c";
        description = "Very strict CPS'd transformers";
        license = stdenv.lib.licenses.bsd3;
@@ -122019,6 +122330,37 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "mustache_2_1_2" = callPackage
+    ({ mkDerivation, aeson, base, base-unicode-symbols, bytestring
+     , cmdargs, containers, directory, either, filepath, hspec, lens
+     , mtl, parsec, process, scientific, tar, template-haskell
+     , temporary, text, th-lift, unordered-containers, vector, wreq
+     , yaml, zlib
+     }:
+     mkDerivation {
+       pname = "mustache";
+       version = "2.1.2";
+       sha256 = "383305b302400070f0b4f6d95f28d5b6b9ffc5d6d660421bb18d122351880f80";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         aeson base bytestring containers directory either filepath mtl
+         parsec scientific template-haskell text th-lift
+         unordered-containers vector
+       ];
+       executableHaskellDepends = [
+         aeson base bytestring cmdargs filepath text yaml
+       ];
+       testHaskellDepends = [
+         aeson base base-unicode-symbols bytestring directory filepath hspec
+         lens process tar temporary text unordered-containers wreq yaml zlib
+       ];
+       homepage = "https://github.com/JustusAdam/mustache";
+       description = "A mustache template parser library";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "mustache-haskell" = callPackage
     ({ mkDerivation, aeson, base, bytestring, directory
      , optparse-applicative, parsec, pretty-show, scientific, text
@@ -122809,15 +123151,16 @@ self: {
      }) {};
 
   "nanovg" = callPackage
-    ({ mkDerivation, base, bytestring, containers, freeglut, GLEW
+    ({ mkDerivation, base, bytestring, c2hs, containers, freeglut, GLEW
      , hspec, inline-c, mesa, QuickCheck, text, vector
      }:
      mkDerivation {
        pname = "nanovg";
-       version = "0.5.0.0";
-       sha256 = "26fae2bd7cc430b5fa46200ae0100779f481cde5c236d33f87a78feca3678f6e";
+       version = "0.5.1.0";
+       sha256 = "2e76eaf2b3814d5651a6c13bea84c561d416d0138303cd3826ed89a399c6e437";
        libraryHaskellDepends = [ base bytestring containers text vector ];
        librarySystemDepends = [ freeglut GLEW mesa ];
+       libraryToolDepends = [ c2hs ];
        testHaskellDepends = [ base containers hspec inline-c QuickCheck ];
        homepage = "https://github.com/cocreature/nanovg-hs";
        description = "Haskell bindings for nanovg";
@@ -124886,6 +125229,8 @@ self: {
        pname = "ngx-export";
        version = "0.2.4.2";
        sha256 = "547a786039d88cbb0aa6ba355c8930245232121a06b63bbf005f725bc8f93ffa";
+       revision = "1";
+       editedCabalFile = "d02abcd1d1c9458ec03f8966a90143cd4353a41ed4e4d42f2f55f194abc01305";
        libraryHaskellDepends = [
          async base bytestring template-haskell unix
        ];
@@ -125042,13 +125387,14 @@ self: {
      }) {};
 
   "nix-eval" = callPackage
-    ({ mkDerivation, base, process, QuickCheck, tasty, tasty-quickcheck
+    ({ mkDerivation, base, hindent, process, QuickCheck, strict, tasty
+     , tasty-quickcheck
      }:
      mkDerivation {
        pname = "nix-eval";
-       version = "0.1.0.2";
-       sha256 = "f603ce62cd8abaab8cf09c8cf3f8b17332b0490658310eadea5242826b2ef419";
-       libraryHaskellDepends = [ base process ];
+       version = "0.3.3.0";
+       sha256 = "4bf250e5a866b4cdfc9d9feaf6c186bfdd45ea04dcfa30dcb1131aa38d7910b1";
+       libraryHaskellDepends = [ base hindent process strict ];
        testHaskellDepends = [ base QuickCheck tasty tasty-quickcheck ];
        homepage = "http://chriswarbo.net/git/nix-eval";
        description = "Evaluate Haskell expressions using Nix to get packages";
@@ -126735,15 +127081,14 @@ self: {
 
   "ombra" = callPackage
     ({ mkDerivation, base, gl, hashable, hashtables, transformers
-     , unordered-containers, vect, vector
+     , unordered-containers, vect
      }:
      mkDerivation {
        pname = "ombra";
-       version = "0.1.1.0";
-       sha256 = "d23a834bfd3195eadc37e9f8b443dfec9b2d223bec8ab1e7eecfb1278055de72";
+       version = "0.2.0.0";
+       sha256 = "d2b256d023b9124176fc132860ba2338556ad6757ad2703bcc853d0c8bc318d9";
        libraryHaskellDepends = [
          base gl hashable hashtables transformers unordered-containers vect
-         vector
        ];
        homepage = "https://github.com/ziocroc/Ombra";
        description = "Render engine";
@@ -129184,8 +129529,8 @@ self: {
      }:
      mkDerivation {
        pname = "pandoc-citeproc-preamble";
-       version = "1.1.0";
-       sha256 = "2200bed5ca32cb6fd74b53dec3e913c0298ada8434154f97c34991a1e9fe568f";
+       version = "1.2.1";
+       sha256 = "99e0988741a8b820ca951b2aabc35d251119c84e0a8245bf0c9b55cbe0e22121";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -132346,8 +132691,8 @@ self: {
      }:
      mkDerivation {
        pname = "pgdl";
-       version = "10.2";
-       sha256 = "8b27c1af6318c385027b1fa89c7459a0cbb274383148ec1d434c16cf8111216a";
+       version = "10.4";
+       sha256 = "333f39cc5317bd188435e001b3dfbe44d5b2afbc536b59e76b86fa23d827e9f7";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -135149,12 +135494,12 @@ self: {
      }) {};
 
   "pong-server" = callPackage
-    ({ mkDerivation, base, hspec, network, QuickCheck }:
+    ({ mkDerivation, base, data-default, hspec, network, QuickCheck }:
      mkDerivation {
        pname = "pong-server";
-       version = "0.0.2.0";
-       sha256 = "2964703036c52a24afc15522f3ad0a5eee5ee14f3153dd35a9e3ddd7501761ad";
-       libraryHaskellDepends = [ base network ];
+       version = "0.0.2.1";
+       sha256 = "145242c8ad672f358eb83f503ba5f92478040d943236b25010d343085f42779a";
+       libraryHaskellDepends = [ base data-default network ];
        testHaskellDepends = [ base hspec network QuickCheck ];
        homepage = "http://github.com/RobertFischer/pong-server#readme";
        description = "A simple embedded pingable server that runs in the background";
@@ -137911,8 +138256,8 @@ self: {
      }:
      mkDerivation {
        pname = "propellor";
-       version = "3.2.1";
-       sha256 = "757188dbf42e595e3b2eee8df4b30076ae929df636e83750ae99777612cc0cf2";
+       version = "3.2.2";
+       sha256 = "255082b7c52f4892e2e7aa4b5f68ffe0da897025b59e3cbcd6b8e3f3f20354fe";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -141442,24 +141787,22 @@ self: {
   "rattletrap" = callPackage
     ({ mkDerivation, aeson, aeson-casing, base, bimap, binary
      , binary-bits, bytestring, containers, data-binary-ieee754
-     , filepath, hlint, tasty, tasty-hspec, template-haskell, text
+     , filepath, tasty, tasty-hspec, template-haskell, temporary, text
      , vector
      }:
      mkDerivation {
        pname = "rattletrap";
-       version = "0.2.0";
-       sha256 = "874bb97133deed106534ab4a8b387d3bb14a7ad89504a9e2767301491bc3c077";
+       version = "1.0.0";
+       sha256 = "faba10702e6e41b73ab6b30d3232c1dfdf648ab5131392bdf24da81fc0f34e49";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
-         base bimap binary binary-bits bytestring containers
-         data-binary-ieee754 text vector
-       ];
-       executableHaskellDepends = [
-         aeson aeson-casing base binary bytestring template-haskell
+         aeson aeson-casing base bimap binary binary-bits bytestring
+         containers data-binary-ieee754 template-haskell text vector
        ];
+       executableHaskellDepends = [ base ];
        testHaskellDepends = [
-         base binary bytestring filepath hlint tasty tasty-hspec
+         base bytestring filepath tasty tasty-hspec temporary
        ];
        homepage = "https://github.com/tfausak/rattletrap#readme";
        description = "Parse and generate Rocket League replays";
@@ -142701,6 +143044,32 @@ self: {
        license = stdenv.lib.licenses.publicDomain;
      }) {};
 
+  "reduce-equations" = callPackage
+    ({ mkDerivation, aeson, base, bytestring, containers, directory
+     , haskell-src-exts, MissingH, mtl, QuickCheck, quickspec
+     , stringable, tasty, tasty-quickcheck, text, transformers
+     }:
+     mkDerivation {
+       pname = "reduce-equations";
+       version = "0.1.1.0";
+       sha256 = "255b5757a180d042c96d55a4fc165796801b83217cebb4237a30685b68ab57ad";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         aeson base bytestring containers haskell-src-exts mtl QuickCheck
+         quickspec stringable text transformers
+       ];
+       executableHaskellDepends = [ aeson base ];
+       testHaskellDepends = [
+         aeson base bytestring containers directory haskell-src-exts
+         MissingH QuickCheck quickspec stringable tasty tasty-quickcheck
+         text
+       ];
+       homepage = "http://chriswarbo.net/projects/repos/reduce-equations.html";
+       description = "Simplify a set of equations by removing redundancies";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "reducers" = callPackage
     ({ mkDerivation, array, base, bytestring, containers, fingertree
      , hashable, semigroupoids, semigroups, text, transformers
@@ -143351,8 +143720,8 @@ self: {
      }:
      mkDerivation {
        pname = "regex-do";
-       version = "2.2";
-       sha256 = "3da54464f6cac1c8410b04ddeb6152908377adc9b9f94fc2190c69988e5d1f7b";
+       version = "2.6.1";
+       sha256 = "bb10301f247b92037562e7fe263e0f443c7076ca03044fe7e938e20136d6533e";
        libraryHaskellDepends = [
          array base bytestring regex-base regex-pcre stringsearch text
        ];
@@ -144913,6 +145282,26 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "req-conduit" = callPackage
+    ({ mkDerivation, base, bytestring, conduit, conduit-extra, hspec
+     , http-client, req, resourcet, temporary, transformers
+     }:
+     mkDerivation {
+       pname = "req-conduit";
+       version = "0.1.0";
+       sha256 = "689a8592555b39859ab0d2e50b111217112d51077553dc7103d84afc865ca447";
+       libraryHaskellDepends = [
+         base bytestring conduit http-client req resourcet transformers
+       ];
+       testHaskellDepends = [
+         base bytestring conduit conduit-extra hspec req resourcet temporary
+         transformers
+       ];
+       homepage = "https://github.com/mrkkrp/req-conduit";
+       description = "Conduit helpers for the req HTTP client library";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "reqcatcher" = callPackage
     ({ mkDerivation, base, http-client, http-types, HUnit, lens
      , network, tasty, tasty-hunit, text, wai, warp, wreq
@@ -147386,6 +147775,18 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "runtime-arbitrary" = callPackage
+    ({ mkDerivation, base, ifcxt, QuickCheck, template-haskell }:
+     mkDerivation {
+       pname = "runtime-arbitrary";
+       version = "0.1.0.6";
+       sha256 = "012e31cb21f0a057aa8a08c71834d0a5fff52c9742064fea956cd54d4e6069d1";
+       libraryHaskellDepends = [ base ifcxt QuickCheck template-haskell ];
+       homepage = "http://chriswarbo.net/projects/repos/runtime-arbitrary.html";
+       description = "Runtime generation of Arbitrary values";
+       license = stdenv.lib.licenses.publicDomain;
+     }) {};
+
   "rvar" = callPackage
     ({ mkDerivation, base, MonadPrompt, mtl, random-source
      , transformers
@@ -153479,6 +153880,19 @@ self: {
        license = "GPL";
      }) {};
 
+  "show-prettyprint" = callPackage
+    ({ mkDerivation, ansi-wl-pprint, base, doctest, trifecta }:
+     mkDerivation {
+       pname = "show-prettyprint";
+       version = "0.1.0.2";
+       sha256 = "212012543071bd0d983b003c107dbf551f44331d94ff3429cd53a51815c58c22";
+       libraryHaskellDepends = [ ansi-wl-pprint base trifecta ];
+       testHaskellDepends = [ base doctest ];
+       homepage = "https://github.com/quchen/show-prettyprint#readme";
+       description = "Robust prettyprinter for output of auto-generated Show instances";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "show-type" = callPackage
     ({ mkDerivation, base }:
      mkDerivation {
@@ -153573,6 +153987,30 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "shunya-library" = callPackage
+    ({ mkDerivation, base }:
+     mkDerivation {
+       pname = "shunya-library";
+       version = "0.1.0.4";
+       sha256 = "a497607995efa72ded74f07eb4305afc1bfe9c9df0c70f9334fa062d6f6db1c6";
+       libraryHaskellDepends = [ base ];
+       homepage = "https://github.com/githubuser/shunya-library#readme";
+       description = "Initial project template from stack";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
+  "shunyalib" = callPackage
+    ({ mkDerivation, base }:
+     mkDerivation {
+       pname = "shunyalib";
+       version = "0.1.0.1";
+       sha256 = "ea423c1b87c14dea651bbb6fbbaa6b6c186c7c8014e8308e176071091deb06fa";
+       libraryHaskellDepends = [ base ];
+       homepage = "https://github.com/penguinshunya/shunyalib";
+       description = "Initial project template from stack";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "sibe" = callPackage
     ({ mkDerivation, base, Chart, Chart-cairo, containers
      , data-default-class, deepseq, directory, hmatrix, JuicyPixels
@@ -153965,8 +154403,8 @@ self: {
      }:
      mkDerivation {
        pname = "simple-effects";
-       version = "0.6.0.0";
-       sha256 = "f448eb1750229b71894a9f482981de64439093ddd72abe5a8672fbaaae135189";
+       version = "0.6.0.1";
+       sha256 = "df8de9fae3ee9c2226565af8f8c4171d1b79678de37e3b280cda3ca013b52944";
        libraryHaskellDepends = [
          base ghc-prim interlude-l lens list-t monad-control mtl
          transformers transformers-base
@@ -155746,6 +156184,8 @@ self: {
        pname = "snap";
        version = "1.0.0.1";
        sha256 = "293f16c1404793121d3d85abb6287bbb32f5dc1d82b12146d4bb650052322db8";
+       revision = "1";
+       editedCabalFile = "81129d186348ab67fda4278bb6c8575ee7a7caed3e6069e0045f464a4ed911ab";
        libraryHaskellDepends = [
          aeson attoparsec base bytestring cereal clientsession configurator
          containers directory directory-tree dlist filepath hashable heist
@@ -155886,6 +156326,40 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "snap-core_1_0_1_0" = callPackage
+    ({ mkDerivation, attoparsec, base, bytestring, bytestring-builder
+     , case-insensitive, containers, deepseq, directory, filepath
+     , hashable, HUnit, io-streams, lifted-base, monad-control, mtl
+     , old-locale, parallel, QuickCheck, random, readable, regex-posix
+     , test-framework, test-framework-hunit, test-framework-quickcheck2
+     , text, time, transformers, transformers-base, unix-compat
+     , unordered-containers, vector, zlib
+     }:
+     mkDerivation {
+       pname = "snap-core";
+       version = "1.0.1.0";
+       sha256 = "f5d2a8b690e77b03626e7bd1856011fc2a13b286939176bde7b61c064aafa37c";
+       libraryHaskellDepends = [
+         attoparsec base bytestring bytestring-builder case-insensitive
+         containers directory filepath HUnit io-streams lifted-base
+         monad-control mtl old-locale random readable regex-posix text time
+         transformers transformers-base unix-compat unordered-containers
+         vector
+       ];
+       testHaskellDepends = [
+         attoparsec base bytestring bytestring-builder case-insensitive
+         containers deepseq directory filepath hashable HUnit io-streams
+         lifted-base monad-control mtl old-locale parallel QuickCheck random
+         readable regex-posix test-framework test-framework-hunit
+         test-framework-quickcheck2 text time transformers transformers-base
+         unix-compat unordered-containers vector zlib
+       ];
+       homepage = "http://snapframework.com/";
+       description = "Snap: A Haskell Web Framework (core interfaces and types)";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "snap-cors" = callPackage
     ({ mkDerivation, attoparsec, base, bytestring, case-insensitive
      , hashable, network, network-uri, snap, text, transformers
@@ -157351,14 +157825,14 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
-  "socket_0_6_2_0" = callPackage
+  "socket_0_7_0_0" = callPackage
     ({ mkDerivation, async, base, bytestring, QuickCheck, tasty
      , tasty-hunit, tasty-quickcheck
      }:
      mkDerivation {
        pname = "socket";
-       version = "0.6.2.0";
-       sha256 = "c7aed50b213c56c03f22a537acfd794e99564f50f412ec2dcaee6dd9cd9bad1c";
+       version = "0.7.0.0";
+       sha256 = "84dad156fe2d792194e86c4496db648e5fe0bbb55db2070b93058d6aa5f08962";
        libraryHaskellDepends = [ base bytestring ];
        testHaskellDepends = [
          async base bytestring QuickCheck tasty tasty-hunit tasty-quickcheck
@@ -158099,8 +158573,8 @@ self: {
      }:
      mkDerivation {
        pname = "spatial-math";
-       version = "0.3.1.0";
-       sha256 = "0b3ab1617e6c5eb74aacdc156d5b74fd1c1ed8d416d793f7b6e2d279773573da";
+       version = "0.4.0.0";
+       sha256 = "e54b9ecf64ca50aea8b7d4e152bbb462672ac74518d844617bfccbf5c584c5e3";
        libraryHaskellDepends = [
          base binary cereal ghc-prim lens linear TypeCompose
        ];
@@ -161893,6 +162367,21 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {stripe-tests = null;};
 
+  "strips" = callPackage
+    ({ mkDerivation, base, containers, hspec, mtl }:
+     mkDerivation {
+       pname = "strips";
+       version = "0.1.0.0";
+       sha256 = "6235efbdbf6505b9579266f047020240f642d1f3ee20e8b07480a638e0f71dce";
+       revision = "1";
+       editedCabalFile = "7bd62d7118703833b341b9e596a402ab58e339fe925cfc8b2650b2491fe57ae1";
+       libraryHaskellDepends = [ base containers mtl ];
+       testHaskellDepends = [ base containers hspec mtl ];
+       homepage = "https://github.com/y-kamiya/strips-haskell#readme";
+       description = "resolver using strips algorithm";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "strive" = callPackage
     ({ mkDerivation, aeson, base, bytestring, data-default, gpolyline
      , http-client, http-client-tls, http-types, markdown-unlit
@@ -165042,8 +165531,8 @@ self: {
      }:
      mkDerivation {
        pname = "tasty-discover";
-       version = "1.0.0";
-       sha256 = "a4c4a3fcf1a3908ebd8f3dbbf1714b2dd50026285f4ba73bc868f79533c0e0a0";
+       version = "1.0.1";
+       sha256 = "d64eb1d6f2d21de2e55fc21cb666423a35d79c4732cc7a0931d6995bbd58adbd";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -165053,8 +165542,8 @@ self: {
        executableHaskellDepends = [ base directory filepath tasty-th ];
        testHaskellDepends = [ base ];
        homepage = "https://github.com/lwm/tasty-discover/";
-       description = "Automatically discover and run Tasty framework tests";
-       license = "GPL";
+       description = "Test discovery for the tasty framework";
+       license = stdenv.lib.licenses.gpl3;
      }) {};
 
   "tasty-expected-failure" = callPackage
@@ -167504,8 +167993,8 @@ self: {
     ({ mkDerivation, base, deepseq, text, vector }:
      mkDerivation {
        pname = "text-zipper";
-       version = "0.8.3";
-       sha256 = "3baf7623d26dc96f19e30c1c54e3be19607b8bd7917ea62e8d35a2b233e4e09f";
+       version = "0.9";
+       sha256 = "4601bf9bc703a85a5053f507474b8d0227c3391b4ce95ef0d22f9affa0dfd9b6";
        libraryHaskellDepends = [ base deepseq text vector ];
        homepage = "https://github.com/jtdaugherty/text-zipper/";
        description = "A text editor zipper library";
@@ -167824,6 +168313,19 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "th-expand-syns_0_4_1_0" = callPackage
+    ({ mkDerivation, base, containers, syb, template-haskell }:
+     mkDerivation {
+       pname = "th-expand-syns";
+       version = "0.4.1.0";
+       sha256 = "c198f592cc5cd644da97209f1aca0decd10e0847dd676195cb5dcb6abbbe48ea";
+       libraryHaskellDepends = [ base containers syb template-haskell ];
+       testHaskellDepends = [ base template-haskell ];
+       description = "Expands type synonyms in Template Haskell ASTs";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "th-extras" = callPackage
     ({ mkDerivation, base, syb, template-haskell }:
      mkDerivation {
@@ -170182,8 +170684,8 @@ self: {
      }:
      mkDerivation {
        pname = "torrent";
-       version = "10000.0.0";
-       sha256 = "5914bc8b4c32c10dc82bfe373ba73745e1e785424a052b0ede5352802aa1140c";
+       version = "10000.0.1";
+       sha256 = "ba7c9565f5397f7603b924a67537abe6738cdc20649ff3fb510b5731d1e18725";
        libraryHaskellDepends = [
          base bencode binary bytestring containers filepath syb
        ];
@@ -174510,12 +175012,12 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "unix_2_7_2_0" = callPackage
+  "unix_2_7_2_1" = callPackage
     ({ mkDerivation, base, bytestring, time }:
      mkDerivation {
        pname = "unix";
-       version = "2.7.2.0";
-       sha256 = "9444ea785b9f3547d3e04d2d42ead6bc3c2e0129390d9d41a655b18b0c322bf0";
+       version = "2.7.2.1";
+       sha256 = "fc05365594367779122465eee132162267c319c3679ff801f050ed30d18d099c";
        libraryHaskellDepends = [ base bytestring time ];
        homepage = "https://github.com/haskell/unix";
        description = "POSIX functionality";
@@ -176696,6 +177198,20 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "vector-binary-instances_0_2_3_3" = callPackage
+    ({ mkDerivation, base, binary, tasty, tasty-quickcheck, vector }:
+     mkDerivation {
+       pname = "vector-binary-instances";
+       version = "0.2.3.3";
+       sha256 = "20158b1ab2fb8dd1bad57896fa3f75bb7fbc5354020c5715e997972b6ffb9f5c";
+       libraryHaskellDepends = [ base binary vector ];
+       testHaskellDepends = [ base binary tasty tasty-quickcheck vector ];
+       homepage = "https://github.com/bos/vector-binary-instances";
+       description = "Instances of Data.Binary and Data.Serialize for vector";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "vector-buffer" = callPackage
     ({ mkDerivation, base, deepseq, vector }:
      mkDerivation {
@@ -176911,8 +177427,8 @@ self: {
     ({ mkDerivation, base, deepseq, vector }:
      mkDerivation {
        pname = "vector-sized";
-       version = "0.4.0.0";
-       sha256 = "4f13d24329b6a60eebfe4d31026cf3b489c622b8afad4f30650f6664f61f1061";
+       version = "0.4.0.1";
+       sha256 = "88880ec1fafecf2ef3ab545c43ff3256a32dc7dd854eec4aaa0d6bd4afd7b008";
        libraryHaskellDepends = [ base deepseq vector ];
        homepage = "http://github.com/expipiplus1/vector-sized#readme";
        description = "Size tagged vectors";
@@ -177756,6 +178272,43 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "vty_5_12" = callPackage
+    ({ mkDerivation, base, blaze-builder, bytestring, Cabal, containers
+     , data-default, deepseq, directory, filepath, hashable, HUnit
+     , microlens, microlens-mtl, microlens-th, mtl, parallel, parsec
+     , QuickCheck, quickcheck-assertions, random, smallcheck, stm
+     , string-qq, terminfo, test-framework, test-framework-hunit
+     , test-framework-smallcheck, text, transformers, unix, utf8-string
+     , vector
+     }:
+     mkDerivation {
+       pname = "vty";
+       version = "5.12";
+       sha256 = "999cc0c66a6e08cada8810f91b0f08e33282361cc01182ea3774e96b13642a56";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         base blaze-builder bytestring containers data-default deepseq
+         directory filepath hashable microlens microlens-mtl microlens-th
+         mtl parallel parsec stm terminfo text transformers unix utf8-string
+         vector
+       ];
+       executableHaskellDepends = [
+         base containers data-default microlens microlens-mtl mtl
+       ];
+       testHaskellDepends = [
+         base blaze-builder bytestring Cabal containers data-default deepseq
+         HUnit microlens microlens-mtl mtl QuickCheck quickcheck-assertions
+         random smallcheck stm string-qq terminfo test-framework
+         test-framework-hunit test-framework-smallcheck text unix
+         utf8-string vector
+       ];
+       homepage = "https://github.com/coreyoconnor/vty";
+       description = "A simple terminal UI library";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "vty-examples" = callPackage
     ({ mkDerivation, array, base, bytestring, Cabal, containers
      , data-default, deepseq, lens, mtl, parallel, parsec, QuickCheck
@@ -179350,8 +179903,10 @@ self: {
      }:
      mkDerivation {
        pname = "warc";
-       version = "0.3.0";
-       sha256 = "f1a2d1f51ec16ccf21b5fd0a74a5e485d3bc207deda8ba0e6944971688b19dfc";
+       version = "0.3.1";
+       sha256 = "2b8752553865feee48aa41d9940bc752e8d22dd866d1ba3e901fb3f7f9dd9510";
+       revision = "1";
+       editedCabalFile = "194f11d8f498f829f3f9dfd4ac145d1afbf6fdde1394fa4564377bcc47acbc76";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -181210,8 +181765,8 @@ self: {
      }:
      mkDerivation {
        pname = "wolf";
-       version = "0.2.12";
-       sha256 = "fabd09aa41a108a0d10fbb2611c3a7c0faf123103809428e235d2dbfa8080ade";
+       version = "0.2.13";
+       sha256 = "3c6ab5d67238b760d883c3943c3131720d0f07f4edb037c6531b9a827529f7d7";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -181350,6 +181905,30 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "wordpass_1_0_0_7" = callPackage
+    ({ mkDerivation, base, containers, deepseq, directory, filepath
+     , hflags, random-fu, random-source, text, unix-compat, vector
+     }:
+     mkDerivation {
+       pname = "wordpass";
+       version = "1.0.0.7";
+       sha256 = "2283d16807261457c54022ca028e3c3a7fec1df6b66b9074ddbf0f14e721d9d8";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         base containers deepseq directory filepath random-fu random-source
+         text unix-compat vector
+       ];
+       executableHaskellDepends = [
+         base containers deepseq directory filepath hflags random-fu
+         random-source text unix-compat vector
+       ];
+       homepage = "https://github.com/mgajda/wordpass";
+       description = "Dictionary-based password generator";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "words" = callPackage
     ({ mkDerivation, base, directory, text }:
      mkDerivation {
@@ -184666,6 +185245,33 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "yesod_1_4_3_1" = callPackage
+    ({ mkDerivation, aeson, base, blaze-html, blaze-markup, bytestring
+     , conduit, conduit-extra, data-default, directory, fast-logger
+     , monad-control, monad-logger, resourcet, safe, semigroups
+     , shakespeare, streaming-commons, template-haskell, text
+     , transformers, unix, unordered-containers, wai, wai-extra
+     , wai-logger, warp, yaml, yesod-auth, yesod-core, yesod-form
+     , yesod-persistent
+     }:
+     mkDerivation {
+       pname = "yesod";
+       version = "1.4.3.1";
+       sha256 = "8ad23252817780afc10aee5cf1bd862b3cf46e08aabb884477e874caa351ab21";
+       libraryHaskellDepends = [
+         aeson base blaze-html blaze-markup bytestring conduit conduit-extra
+         data-default directory fast-logger monad-control monad-logger
+         resourcet safe semigroups shakespeare streaming-commons
+         template-haskell text transformers unix unordered-containers wai
+         wai-extra wai-logger warp yaml yesod-auth yesod-core yesod-form
+         yesod-persistent
+       ];
+       homepage = "http://www.yesodweb.com/";
+       description = "Creation of type-safe, RESTful web applications";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "yesod-angular" = callPackage
     ({ mkDerivation, aeson, base, containers, shakespeare
      , template-haskell, text, transformers, yesod
@@ -185409,6 +186015,17 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "yesod-elements" = callPackage
+    ({ mkDerivation, base, blaze-html, yesod-core }:
+     mkDerivation {
+       pname = "yesod-elements";
+       version = "1.0";
+       sha256 = "d4a0cf90675bb146acf2e7fa6e743501f20b8efc7b9beac53e6081e9c1851134";
+       libraryHaskellDepends = [ base blaze-html yesod-core ];
+       description = "Non template haskell markup building function in the spirit of lucid";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "yesod-eventsource" = callPackage
     ({ mkDerivation, base, blaze-builder, conduit, transformers, wai
      , wai-eventsource, wai-extra, yesod-core
@@ -185510,6 +186127,31 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "yesod-form_1_4_9" = callPackage
+    ({ mkDerivation, aeson, attoparsec, base, blaze-builder, blaze-html
+     , blaze-markup, byteable, bytestring, containers, data-default
+     , email-validate, hspec, network-uri, persistent, resourcet
+     , semigroups, shakespeare, template-haskell, text, time
+     , transformers, wai, xss-sanitize, yesod-core, yesod-persistent
+     }:
+     mkDerivation {
+       pname = "yesod-form";
+       version = "1.4.9";
+       sha256 = "bd53f12d97a89e93b15fc6b06e63fbe041301635508f933203596f349a74110d";
+       libraryHaskellDepends = [
+         aeson attoparsec base blaze-builder blaze-html blaze-markup
+         byteable bytestring containers data-default email-validate
+         network-uri persistent resourcet semigroups shakespeare
+         template-haskell text time transformers wai xss-sanitize yesod-core
+         yesod-persistent
+       ];
+       testHaskellDepends = [ base hspec text time ];
+       homepage = "http://www.yesodweb.com/";
+       description = "Form handling support for Yesod Web Framework";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "yesod-form-json" = callPackage
     ({ mkDerivation, aeson, base, bytestring, containers, text
      , unordered-containers, yesod-core, yesod-form
diff --git a/pkgs/development/libraries/vulkan-loader/default.nix b/pkgs/development/libraries/vulkan-loader/default.nix
index 4c00bb861425..622d027c60bc 100644
--- a/pkgs/development/libraries/vulkan-loader/default.nix
+++ b/pkgs/development/libraries/vulkan-loader/default.nix
@@ -1,8 +1,6 @@
 { stdenv, fetchgit, fetchFromGitHub, cmake, pkgconfig, git, python3,
   python3Packages, glslang, spirv-tools, x11, libxcb, wayland }:
 
-assert stdenv.system == "x86_64-linux";
-
 let
   version = "1.0.26.0";
   src = fetchFromGitHub {
@@ -11,7 +9,6 @@ let
     rev = "sdk-${version}";
     sha256 = "157m746hc76xrxd3qq0f44f5dy7pjbz8cx74ykqrlbc7rmpjpk58";
   };
-  getRev = name: builtins.substring 0 40 (builtins.readFile "${src}/${name}_revision");
 in
 
 stdenv.mkDerivation rec {
@@ -37,12 +34,32 @@ stdenv.mkDerivation rec {
     "-DBUILD_WSI_WAYLAND_SUPPORT=ON" # XLIB/XCB supported by default
   ];
 
+  patches = [ ./use-xdg-paths.patch ];
+
+  outputs = [ "out" "dev" "demos" ];
+
+  preConfigure = ''
+    checkRev() {
+      [ "$2" = $(cat "$1_revision") ] || (echo "ERROR: dependency $1 is revision $2 but should be revision" $(cat "$1_revision") && exit 1)
+    }
+    checkRev spirv-tools "${spirv-tools.src.rev}"
+    checkRev spirv-headers "${spirv-tools.headers.rev}"
+    checkRev glslang "${glslang.src.rev}"
+  '';
+
   installPhase = ''
-    mkdir -p $out/lib
-    mkdir -p $out/bin
-    cp loader/libvulkan.so* $out/lib
+    mkdir -p $out/lib $out/bin
+    cp -d loader/libvulkan.so* $out/lib
     cp demos/vulkaninfo $out/bin
-  '';
+    mkdir -p $out/lib $out/share/vulkan/explicit_layer.d
+    cp -d layers/*.so $out/lib/
+    cp -d layers/*.json $out/share/vulkan/explicit_layer.d/
+    sed -i "s:\\./lib:$out/lib/lib:g" "$out/share/vulkan/"*/*.json
+    mkdir -p $dev/include
+    cp -rv ../include $dev/
+    mkdir -p $demos/bin
+    cp demos/smoketest demos/tri demos/cube demos/*.spv demos/*.ppm $demos/bin
+   '';
 
   meta = with stdenv.lib; {
     description = "LunarG Vulkan loader";
diff --git a/pkgs/development/libraries/vulkan-loader/use-xdg-paths.patch b/pkgs/development/libraries/vulkan-loader/use-xdg-paths.patch
new file mode 100644
index 000000000000..1ae0f20889fc
--- /dev/null
+++ b/pkgs/development/libraries/vulkan-loader/use-xdg-paths.patch
@@ -0,0 +1,142 @@
+diff --git a/loader/loader.c b/loader/loader.c
+index a950ea1..9462d05 100644
+--- a/loader/loader.c
++++ b/loader/loader.c
+@@ -2671,6 +2671,94 @@ static VkResult loader_get_manifest_files(
+         }
+     }
+ 
++#if !defined(_WIN32)
++    if (home_location && override == NULL) {
++        char *xdgconfdirs = secure_getenv("XDG_CONFIG_DIRS");
++        char *xdgdatadirs = secure_getenv("XDG_DATA_DIRS");
++        char *cur, *src = loc;
++        size_t src_size = strlen(src), rel_size = strlen(home_location);
++        size_t size = 0;
++
++        if (src_size > 0)
++            size += src_size + 1;
++
++        if (xdgconfdirs == NULL)
++            xdgconfdirs = "/etc/xdg";
++        if (xdgdatadirs == NULL)
++            xdgdatadirs = "/usr/local/share:/usr/share";
++
++        for (char *x = xdgconfdirs; *x; ++x)
++            if (*x == PATH_SEPERATOR) size += rel_size;
++        size += strlen(xdgconfdirs) + rel_size + 1;
++        for (char *x = xdgdatadirs; *x; ++x)
++            if (*x == PATH_SEPERATOR) size += rel_size;
++        size += strlen(xdgdatadirs) + rel_size + 1;
++
++#if defined(LOCALPREFIX)
++        size += strlen(LOCALPREFIX "/" SYSCONFDIR) + rel_size + 1;
++        size += strlen(LOCALPREFIX "/" DATADIR) + rel_size + 1;
++#endif
++
++        loc = cur = loader_stack_alloc(size);
++        if (cur == NULL) {
++            loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
++                        "Out of memory can't get manifest files");
++            res = VK_ERROR_OUT_OF_HOST_MEMORY;
++            goto out;
++        }
++
++        if (src_size > 0) {
++          memcpy(cur, src, src_size);
++          cur += src_size;
++          *cur++ = PATH_SEPERATOR;
++        }
++
++        src = xdgconfdirs;
++        for (char *x = src;; ++x) {
++            if (*x == PATH_SEPERATOR || *x == 0) {
++                size_t s = x - src;
++                memcpy(cur, src, s); cur += s;
++                memcpy(cur, home_location, rel_size); cur += rel_size;
++                *cur++ = PATH_SEPERATOR;
++                if (*x == 0)
++                    break;
++                src = ++x;
++            }
++        }
++
++#if defined(LOCALPREFIX)
++        strcpy(cur, LOCALPREFIX "/" SYSCONFDIR);
++        cur += strlen(cur);
++        memcpy(cur, home_location, rel_size); cur += rel_size;
++        *cur++ = PATH_SEPERATOR;
++#endif
++
++        src = xdgdatadirs;
++        for (char *x = src;; ++x) {
++            if (*x == PATH_SEPERATOR || *x == 0) {
++                size_t s = x - src;
++                memcpy(cur, src, s); cur += s;
++                memcpy(cur, home_location, rel_size); cur += rel_size;
++                *cur++ = PATH_SEPERATOR;
++                if (*x == 0)
++                    break;
++                src = ++x;
++            }
++        }
++
++#if defined(LOCALPREFIX)
++        strcpy(cur, LOCALPREFIX "/" DATADIR);
++        cur += strlen(cur);
++        memcpy(cur, home_location, rel_size); cur += rel_size;
++        *cur++ = PATH_SEPERATOR;
++#endif
++
++        loc[size - 1] = 0;
++        assert(cur == loc + size);
++        list_is_dirs = true;
++    }
++#endif
++
+     // Print out the paths being searched if debugging is enabled
+     loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0,
+                "Searching the following paths for manifest files: %s\n", loc);
+diff --git a/loader/vk_loader_platform.h b/loader/vk_loader_platform.h
+index 3a02640..70a2652 100644
+--- a/loader/vk_loader_platform.h
++++ b/loader/vk_loader_platform.h
+@@ -57,35 +57,10 @@
+ #define VULKAN_ILAYERCONF_DIR "implicit_layer.d"
+ #define VULKAN_LAYER_DIR      "layer"
+ 
+-#if defined(LOCALPREFIX)
+-#define LOCAL_DRIVERS_INFO                                                     \
+-    LOCALPREFIX "/" SYSCONFDIR VULKAN_DIR VULKAN_ICDCONF_DIR ":"               \
+-    LOCALPREFIX "/" DATADIR    VULKAN_DIR VULKAN_ICDCONF_DIR ":"
+-#define LOCAL_ELAYERS_INFO                                                     \
+-    LOCALPREFIX "/" SYSCONFDIR VULKAN_DIR VULKAN_ELAYERCONF_DIR ":"            \
+-    LOCALPREFIX "/" DATADIR    VULKAN_DIR VULKAN_ELAYERCONF_DIR ":"
+-#define LOCAL_ILAYERS_INFO                                                     \
+-    LOCALPREFIX "/" SYSCONFDIR VULKAN_DIR VULKAN_ILAYERCONF_DIR ":"            \
+-    LOCALPREFIX "/" DATADIR    VULKAN_DIR VULKAN_ILAYERCONF_DIR ":"
+-#else
+-#define LOCAL_DRIVERS_INFO
+-#define LOCAL_ELAYERS_INFO
+-#define LOCAL_ILAYERS_INFO
+-#endif
+-
+-#define DEFAULT_VK_DRIVERS_INFO                                                \
+-    LOCAL_DRIVERS_INFO                                                         \
+-    "/"  SYSCONFDIR VULKAN_DIR VULKAN_ICDCONF_DIR ":"                          \
+-    "/usr/" DATADIR VULKAN_DIR VULKAN_ICDCONF_DIR
++#define DEFAULT_VK_DRIVERS_INFO ""
+ #define DEFAULT_VK_DRIVERS_PATH ""
+-#define DEFAULT_VK_ELAYERS_INFO                                                \
+-    LOCAL_ELAYERS_INFO                                                         \
+-    "/"  SYSCONFDIR VULKAN_DIR VULKAN_ELAYERCONF_DIR ":"                       \
+-    "/usr/" DATADIR VULKAN_DIR VULKAN_ELAYERCONF_DIR
+-#define DEFAULT_VK_ILAYERS_INFO                                                \
+-    LOCAL_ILAYERS_INFO                                                         \
+-    "/"  SYSCONFDIR VULKAN_DIR VULKAN_ILAYERCONF_DIR ":"                       \
+-    "/usr/" DATADIR VULKAN_DIR VULKAN_ILAYERCONF_DIR
++#define DEFAULT_VK_ELAYERS_INFO ""
++#define DEFAULT_VK_ILAYERS_INFO ""
+ #define DEFAULT_VK_LAYERS_PATH ""
+ #if !defined(LAYERS_SOURCE_PATH)
+ #define LAYERS_SOURCE_PATH NULL
diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix
index 8625ac72c104..c66096c2fedc 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix
@@ -213,7 +213,7 @@ let
     ppp             = applePackage "ppp"               "osx-10.11.6"     "1dql6r1v0vbcs04958nn2i6p31yfsxyy51jca63bm5mf0gxalk3f" {};
     removefile      = applePackage "removefile"        "osx-10.11.6"     "1b6r74ry3k01kypvlaclf33fha15pcm0kzx9zrymlg66wg0s0i3r" {};
     Security        = applePackage "Security"          "osx-10.9.5"      "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {};
-    xnu             = applePackage "xnu"               "osx-10.11.6"     "0yhziq4dqqcbjpf6vyqn8xhwva2zb525gndkx8cp8alzwp76jnr9" {};
+    xnu             = applePackage "xnu"               "osx-10.11.6"     "1vij2q5bpvp1sd2maf154mjk9g5z5hxyzcg5wcd4z7i8j5h36xnv" {};
 
     libsecurity_apple_csp      = libsecPackage "libsecurity_apple_csp"      "osx-10.7.5" "1ngyn1ik27n4x981px3kfd1z1n8zx7r5w812b6qfjpy5nw4h746w" {};
     libsecurity_apple_cspdl    = libsecPackage "libsecurity_apple_cspdl"    "osx-10.7.5" "1svqa5fhw7p7njzf8bzg7zgc5776aqjhdbnlhpwmr5hmz5i0x8r7" {};
diff --git a/pkgs/os-specific/linux/amdgpu-pro/default.nix b/pkgs/os-specific/linux/amdgpu-pro/default.nix
index 17a066640410..4a0527242c7f 100644
--- a/pkgs/os-specific/linux/amdgpu-pro/default.nix
+++ b/pkgs/os-specific/linux/amdgpu-pro/default.nix
@@ -1,6 +1,7 @@
 { stdenv, fetchurl, elfutils, mesa_noglu
 , xorg, patchelf, openssl, libdrm, libudev
 , libxcb, libxshmfence, epoxy, perl, zlib
+, fetchFromGitHub, ncurses
 , libsOnly ? false, kernel ? null
 }:
 
@@ -25,11 +26,13 @@ let
 
   libReplaceDir = "/usr/lib/${libArch}";
 
+  ncurses5 = ncurses.override { abiVersion = "5"; };
+
 in stdenv.mkDerivation rec {
 
-  version = "16.30";
+  version = "16.40";
   pname = "amdgpu-pro";
-  build = "16.30.3-315407";
+  build = "16.40-348864";
 
   libCompatDir = "/run/lib/${libArch}";
 
@@ -37,9 +40,9 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url =
-    "https://www2.ati.com/drivers/linux/amdgpu-pro_${build}.tar.xz";
-    sha256 = "97d6fb64617cf2cefe780e5fb83b29d8ee4e3e7886b71fe3d92b0113847b2354";
-    curlOpts = "--referer http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Beta-Driver-for-Vulkan-Release-Notes.aspx";
+    "https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-${build}.tar.xz";
+    sha256 = "1c06lx07irmlpmbmgb3qcgpzj6q6rimszrbbdrgz8kqnfpcv3mjr";
+    curlOpts = "--referer http://support.amd.com/en-us/kb-articles/Pages/AMD-Radeon-GPU-PRO-Linux-Beta-Driver%e2%80%93Release-Notes.aspx";
   };
 
   hardeningDisable = [ "pic" "format" ];
@@ -50,26 +53,34 @@ in stdenv.mkDerivation rec {
     cd $sourceRoot
     mkdir root
     cd root
-    for deb in ../*.deb; do echo $deb; ar p $deb data.tar.xz | tar -xJ; done
+    for deb in ../*_all.deb ../*_i386.deb '' + optionalString stdenv.is64bit "../*_amd64.deb" + ''; do echo $deb; ar p $deb data.tar.xz | tar -xJ; done
     sourceRoot=.
   '';
 
   modulePatches = [
-    ./patches/0001-add-OS-detection-for-arch.patch
-    ./patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch
-    ./patches/0003-add-kcl_drm_gem_object_lookup.patch
-    ./patches/0004-paging-changes-for-linux-4.6.patch
-    ./patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch
-    ./patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch
-    ./patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch
-    ./patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch
-    ./patches/0009-disable-dal-by-default.patch
-    ./patches/0010-remove-dependency-on-System.map.patch
+    ./patches/0001-Find-correct-System.map.patch
+    ./patches/0002-Fix-kernel-module-install-location.patch
+    ./patches/0003-Add-Gentoo-as-build-option.patch
+    ./patches/0004-Remove-extra-parameter-from-ttm_bo_reserve-for-4.7.0.patch
+    ./patches/0005-Remove-first-param-from-drm_gem_object_lookup.patch
+    ./patches/0006-Remove-vblank_disable_allowed-assignment.patch
+    ./patches/0007-Fix-__drm_atomic_helper_connector_destroy_state-call.patch
+    ./patches/0008-Change-seq_printf-format-for-64-bit-context.patch
+    ./patches/0009-Fix-vblank-calls.patch
+    ./patches/0010-Fix-crtc_gamma-functions-for-4.8.0.patch
+    ./patches/0011-Fix-drm_atomic_helper_swap_state-for-4.8.0.patch
+    ./patches/0012-Add-extra-flag-to-ttm_bo_move_ttm-for-4.8.0-rc2.patch
+    ./patches/0013-Remove-dependency-on-System.map.patch
+    ./patches/0014-disable-dal-by-default.patch
   ];
 
   patchPhase = optionalString (!libsOnly) ''
     pushd usr/src/amdgpu-pro-${build}
-    for patch in $modulePatches; do echo $patch; patch -p1 < $patch; done
+    for patch in $modulePatches
+    do
+      echo $patch
+      patch -f -p1 < $patch || true
+    done
     popd
   '';
 
@@ -86,54 +97,60 @@ in stdenv.mkDerivation rec {
 
   depLibPath = makeLibraryPath [
     stdenv.cc.cc.lib xorg.libXext xorg.libX11 xorg.libXdamage xorg.libXfixes zlib
-    xorg.libXxf86vm libxcb libxshmfence epoxy openssl libdrm elfutils libudev
+    xorg.libXxf86vm libxcb libxshmfence epoxy openssl libdrm elfutils libudev ncurses5
   ];
 
   installPhase = ''
     mkdir -p $out
-    cp -r usr/bin $out/bin
+
     cp -r etc $out/etc
-    cp -r usr/include $out/include
-    cp -r usr/lib/${libArch} $out/lib
-    mv $out/lib/amdgpu-pro/* $out/lib/
-    rmdir $out/lib/amdgpu-pro
-    cp -r usr/share $out/share
+    cp -r lib $out/lib
+
+    pushd usr
+    cp -r lib/${libArch}/* $out/lib
+  '' + optionalString (!libsOnly) ''
+    cp -r src/amdgpu-pro-${build}/firmware $out/lib/firmware
+  '' + ''
+    cp -r share $out/share
+    popd
+
+    pushd opt/amdgpu-pro
+  '' + optionalString (!stdenv.is64bit) ''
+    cp -r bin $out/bin
+  '' + ''
+    cp -r include $out/include
+    cp -r lib/${libArch}/* $out/lib
+  '' + optionalString (!libsOnly) ''
+    mv lib/xorg $out/lib/xorg
+  '' + ''
+    popd
+
   '' + optionalString (!libsOnly) ''
-    if [ -d $out/lib/xorg ]; then
-      rm $out/lib/xorg
-      mv $out/lib/1.18 $out/lib/xorg
-      rm -r $out/lib/1.*
-    fi
-    cp -r lib/firmware $out/lib/firmware
     mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko.xz
     cp usr/src/amdgpu-pro-${build}/amd/amdgpu/amdgpu.ko.xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko.xz
   '' + ''
+    mv $out/etc/vulkan $out/share
     interpreter="$(cat $NIX_CC/nix-support/dynamic-linker)"
     libPath="$out/lib:$out/lib/gbm:$depLibPath"
-    echo patching with $interpreter $libPath
-    for prog in "$out"/bin/*; do
-      echo patching program $prog
-      patchelf --interpreter "$interpreter" --set-rpath "$libPath" "$prog"
-    done
-    for lib in `find "$out/lib/" -name '*.so*'`; do
-      echo patching library $lib
-      patchelf --set-rpath "$libPath" "$lib"
+  '' + optionalString (!stdenv.is64bit) ''
+    for prog in clinfo modetest vbltest kms-universal-planes kms-steal-crtc modeprint amdgpu_test kmstest proptest; do
+      patchelf --interpreter "$interpreter" --set-rpath "$libPath" "$out/bin/$prog"
     done
+  '' + ''
+    ln -s libgbm.so.1.0.0 $out/lib/libgbm.so.1
+    ln -s ${makeLibraryPath [ncurses5]}/libncursesw.so.5 $out/lib/libtinfo.so.5
   '';
 
+  # we'll just set the full rpath on everything to avoid having to track down dlopen problems
   postFixup = assert (stringLength libReplaceDir == stringLength libCompatDir); ''
     libPath="$out/lib:$out/lib/gbm:$depLibPath"
-    for lib in libgbm.so.1.0.0 ${optionalString (!libsOnly) "xorg/modules/drivers/amdgpu_drv.so"} amdvlk${bitness}.so vdpau/libvdpau_amdgpu.so; do
-      if [ -e "$out/lib/$lib" ]; then
-        patchelf --set-rpath "$libPath" "$out/lib/$lib"
-      fi
+    for lib in `find "$out/lib/" -name '*.so*' -type f`; do
+      patchelf --set-rpath "$libPath" "$lib"
     done
     for lib in libEGL.so.1 libGL.so.1.2 ${optionalString (!libsOnly) "xorg/modules/extensions/libglx.so"} dri/amdgpu_dri.so; do
-      if [ -e "$out/lib/$lib" ]; then
-        perl -pi -e 's:${libReplaceDir}:${libCompatDir}:g' "$out/lib/$lib"
-      fi
+      perl -pi -e 's:${libReplaceDir}:${libCompatDir}:g' "$out/lib/$lib"
     done
-    substituteInPlace "$out/etc/vulkan/icd.d/amd_icd${bitness}.json" --replace "/usr/lib/${libArch}" "$out/lib"
+    substituteInPlace "$out/share/vulkan/icd.d/amd_icd${bitness}.json" --replace "/opt/amdgpu-pro/lib/${libArch}" "$out/lib"
   '';
 
   buildInputs = [
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0001-Find-correct-System.map.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0001-Find-correct-System.map.patch
new file mode 100644
index 000000000000..2a086cf37bc9
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0001-Find-correct-System.map.patch
@@ -0,0 +1,25 @@
+From 4243cf67bcdf8c3865efbfe19dc8841c88ab2daa Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Sun, 25 Sep 2016 15:30:26 +0100
+Subject: [PATCH 01/14] Find correct System.map
+
+---
+ pre-build.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pre-build.sh b/pre-build.sh
+index 95457bd..169ccf0 100755
+--- a/pre-build.sh
++++ b/pre-build.sh
+@@ -27,7 +27,7 @@ source amd/backport/symbols
+ 
+ echo '// auto generated by DKMS pre-build.sh' > amd/backport/symbols.c
+ for sym in $SYMS; do
+-    addr=$(grep $sym /boot/System.map-$KERNELVER | awk -F' ' '{print $1}')
++    addr=$(grep $sym /boot/System.map*-$KERNELVER | awk -F' ' '{print $1}')
+     echo "void *$sym = (void *)0x$addr;" >> amd/backport/symbols.c
+ done
+ 
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch
deleted file mode 100644
index 46302ae0ea89..000000000000
--- a/pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From e78ede724fff53fc0220999f6381242142ce8c33 Mon Sep 17 00:00:00 2001
-From: David McFarland <corngood@gmail.com>
-Date: Sun, 21 Aug 2016 16:30:25 -0300
-Subject: [PATCH 1/8] add OS detection for arch
-
----
- amd/backport/Makefile | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/amd/backport/Makefile b/amd/backport/Makefile
-index 0c285ef..6447a15 100644
---- a/amd/backport/Makefile
-+++ b/amd/backport/Makefile
-@@ -17,6 +17,9 @@ else ifeq ("ubuntu",$(OS_NAME))
- ccflags-y += -DOS_NAME_UBUNTU
- else ifeq ("steamos",$(OS_NAME))
- ccflags-y += -DOS_NAME_STEAMOS
-+else ifeq ("arch",$(OS_NAME))
-+ccflags-y += -DOS_NAME_ARCH
-+OS_VERSION = "0.0"
- else
- ccflags-y += -DOS_NAME_UNKNOWN
- endif
--- 
-2.9.3
-
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0002-Fix-kernel-module-install-location.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0002-Fix-kernel-module-install-location.patch
new file mode 100644
index 000000000000..be8868835563
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0002-Fix-kernel-module-install-location.patch
@@ -0,0 +1,25 @@
+From c1860b4e8c2ebb784a07d6ba067c510950e67d24 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Sun, 25 Sep 2016 15:31:13 +0100
+Subject: [PATCH 02/14] Fix kernel module install location
+
+---
+ dkms.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dkms.conf b/dkms.conf
+index d1a5e1d..0e03f08 100644
+--- a/dkms.conf
++++ b/dkms.conf
+@@ -2,7 +2,7 @@ PACKAGE_NAME="amdgpu-pro"
+ PACKAGE_VERSION="16.40-348864"
+ BUILT_MODULE_NAME[0]="amdgpu"
+ BUILT_MODULE_LOCATION[0]="amd/amdgpu"
+-DEST_MODULE_LOCATION[0]="/extra"
++DEST_MODULE_LOCATION[0]="/kernel/drivers/gpu/drm/amd/amdgpu"
+ AUTOINSTALL="yes"
+ PRE_BUILD="pre-build.sh $kernelver"
+ REMAKE_INITRD="yes"
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch
deleted file mode 100644
index 4101662a4ebe..000000000000
--- a/pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From d84bd62a10308efb6a414e8f6582a7b1e9860638 Mon Sep 17 00:00:00 2001
-From: David McFarland <corngood@gmail.com>
-Date: Sun, 21 Aug 2016 16:31:12 -0300
-Subject: [PATCH 2/8] update kcl_ttm_bo_reserve for linux-4.7
-
----
- amd/backport/include/kcl/kcl_ttm.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/amd/backport/include/kcl/kcl_ttm.h b/amd/backport/include/kcl/kcl_ttm.h
-index 3575004..0d1560d 100644
---- a/amd/backport/include/kcl/kcl_ttm.h
-+++ b/amd/backport/include/kcl/kcl_ttm.h
-@@ -84,7 +84,7 @@ static inline int kcl_ttm_bo_reserve(struct ttm_buffer_object *bo,
- 				 bool interruptible, bool no_wait,
- 				 struct ww_acquire_ctx *ticket)
- {
--#if defined(BUILD_AS_DKMS)
-+#if defined(BUILD_AS_DKMS) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)
- 	return ttm_bo_reserve(bo, interruptible, no_wait, false, ticket);
- #else
- 	return ttm_bo_reserve(bo, interruptible, no_wait, ticket);
--- 
-2.9.3
-
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0003-Add-Gentoo-as-build-option.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0003-Add-Gentoo-as-build-option.patch
new file mode 100644
index 000000000000..d8b0f289d849
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0003-Add-Gentoo-as-build-option.patch
@@ -0,0 +1,30 @@
+From c26c7670869e02c39c0d0f6dee9094a621f42252 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Sun, 25 Sep 2016 15:31:49 +0100
+Subject: [PATCH 03/14] Add Gentoo as build option
+
+---
+ amd/backport/Makefile | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/amd/backport/Makefile b/amd/backport/Makefile
+index 0c285ef..dcc94d5 100644
+--- a/amd/backport/Makefile
++++ b/amd/backport/Makefile
+@@ -17,8 +17,13 @@ else ifeq ("ubuntu",$(OS_NAME))
+ ccflags-y += -DOS_NAME_UBUNTU
+ else ifeq ("steamos",$(OS_NAME))
+ ccflags-y += -DOS_NAME_STEAMOS
++else ifeq ("gentoo",$(OS_NAME))
++ccflags-y += -DOS_NAME_GENTOO
++# We don't have a version inside /etc/os-release.
++OS_VERSION = "0.0"
+ else
+ ccflags-y += -DOS_NAME_UNKNOWN
++OS_VERSION = "0.0"
+ endif
+ 
+ ccflags-y += \
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch
deleted file mode 100644
index 214b8effd9d3..000000000000
--- a/pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-From 2637dfe990e4c277bc724f6ba48e6661506805ec Mon Sep 17 00:00:00 2001
-From: David McFarland <corngood@gmail.com>
-Date: Sun, 21 Aug 2016 16:37:34 -0300
-Subject: [PATCH 3/8] add kcl_drm_gem_object_lookup
-
----
- amd/amdgpu/amdgpu_atpx_handler.c    |  4 ++++
- amd/amdgpu/amdgpu_bo_list.c         |  2 +-
- amd/amdgpu/amdgpu_cs.c              |  2 +-
- amd/amdgpu/amdgpu_display.c         |  2 +-
- amd/amdgpu/amdgpu_gem.c             | 10 +++++-----
- amd/amdgpu/dce_v10_0.c              |  2 +-
- amd/amdgpu/dce_v11_0.c              |  2 +-
- amd/amdgpu/dce_v8_0.c               |  2 +-
- amd/backport/include/kcl/kcl_drm.h  | 11 +++++++++++
- amd/dal/amdgpu_dm/amdgpu_dm_types.c |  2 +-
- 10 files changed, 27 insertions(+), 12 deletions(-)
-
-diff --git a/amd/amdgpu/amdgpu_atpx_handler.c b/amd/amdgpu/amdgpu_atpx_handler.c
-index cc9b998..7e47478 100644
---- a/amd/amdgpu/amdgpu_atpx_handler.c
-+++ b/amd/amdgpu/amdgpu_atpx_handler.c
-@@ -565,7 +565,11 @@ void amdgpu_register_atpx_handler(void)
- 	if (!r)
- 		return;
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
-+	vga_switcheroo_register_handler(&amdgpu_atpx_handler, 0);
-+#else
- 	vga_switcheroo_register_handler(&amdgpu_atpx_handler);
-+#endif
- }
- 
- /**
-diff --git a/amd/amdgpu/amdgpu_bo_list.c b/amd/amdgpu/amdgpu_bo_list.c
-index 35d0856..1d163ec 100644
---- a/amd/amdgpu/amdgpu_bo_list.c
-+++ b/amd/amdgpu/amdgpu_bo_list.c
-@@ -106,7 +106,7 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev,
- 		struct amdgpu_bo *bo;
- 		struct mm_struct *usermm;
- 
--		gobj = drm_gem_object_lookup(adev->ddev, filp, info[i].bo_handle);
-+		gobj = kcl_drm_gem_object_lookup(adev->ddev, filp, info[i].bo_handle);
- 		if (!gobj) {
- 			r = -ENOENT;
- 			goto error_free;
-diff --git a/amd/amdgpu/amdgpu_cs.c b/amd/amdgpu/amdgpu_cs.c
-index d16ed26..b0390b5 100644
---- a/amd/amdgpu/amdgpu_cs.c
-+++ b/amd/amdgpu/amdgpu_cs.c
-@@ -92,7 +92,7 @@ static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p,
- {
- 	struct drm_gem_object *gobj;
- 
--	gobj = drm_gem_object_lookup(p->adev->ddev, p->filp,
-+	gobj = kcl_drm_gem_object_lookup(p->adev->ddev, p->filp,
- 				     data->handle);
- 	if (gobj == NULL)
- 		return -EINVAL;
-diff --git a/amd/amdgpu/amdgpu_display.c b/amd/amdgpu/amdgpu_display.c
-index 46326b3..9b5441f 100644
---- a/amd/amdgpu/amdgpu_display.c
-+++ b/amd/amdgpu/amdgpu_display.c
-@@ -594,7 +594,7 @@ amdgpu_user_framebuffer_create(struct drm_device *dev,
- 	struct amdgpu_framebuffer *amdgpu_fb;
- 	int ret;
- 
--	obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
-+	obj = kcl_drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
- 	if (obj ==  NULL) {
- 		dev_err(&dev->pdev->dev, "No GEM object associated to handle 0x%08X, "
- 			"can't create framebuffer\n", mode_cmd->handles[0]);
-diff --git a/amd/amdgpu/amdgpu_gem.c b/amd/amdgpu/amdgpu_gem.c
-index 0069aec..d10c282 100644
---- a/amd/amdgpu/amdgpu_gem.c
-+++ b/amd/amdgpu/amdgpu_gem.c
-@@ -397,7 +397,7 @@ int amdgpu_mode_dumb_mmap(struct drm_file *filp,
- 	struct drm_gem_object *gobj;
- 	struct amdgpu_bo *robj;
- 
--	gobj = drm_gem_object_lookup(dev, filp, handle);
-+	gobj = kcl_drm_gem_object_lookup(dev, filp, handle);
- 	if (gobj == NULL) {
- 		return -ENOENT;
- 	}
-@@ -461,7 +461,7 @@ int amdgpu_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
- 	int r = 0;
- 	long ret;
- 
--	gobj = drm_gem_object_lookup(dev, filp, handle);
-+	gobj = kcl_drm_gem_object_lookup(dev, filp, handle);
- 	if (gobj == NULL) {
- 		return -ENOENT;
- 	}
-@@ -495,7 +495,7 @@ int amdgpu_gem_metadata_ioctl(struct drm_device *dev, void *data,
- 	int r = -1;
- 
- 	DRM_DEBUG("%d \n", args->handle);
--	gobj = drm_gem_object_lookup(dev, filp, args->handle);
-+	gobj = kcl_drm_gem_object_lookup(dev, filp, args->handle);
- 	if (gobj == NULL)
- 		return -ENOENT;
- 	robj = gem_to_amdgpu_bo(gobj);
-@@ -643,7 +643,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
- 		return -EINVAL;
- 	}
- 
--	gobj = drm_gem_object_lookup(dev, filp, args->handle);
-+	gobj = kcl_drm_gem_object_lookup(dev, filp, args->handle);
- 	if (gobj == NULL)
- 		return -ENOENT;
- 	rbo = gem_to_amdgpu_bo(gobj);
-@@ -705,7 +705,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
- 	struct amdgpu_bo *robj;
- 	int r;
- 
--	gobj = drm_gem_object_lookup(dev, filp, args->handle);
-+	gobj = kcl_drm_gem_object_lookup(dev, filp, args->handle);
- 	if (gobj == NULL) {
- 		return -ENOENT;
- 	}
-diff --git a/amd/amdgpu/dce_v10_0.c b/amd/amdgpu/dce_v10_0.c
-index 7554dd7..6d38754 100644
---- a/amd/amdgpu/dce_v10_0.c
-+++ b/amd/amdgpu/dce_v10_0.c
-@@ -2594,7 +2594,7 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,
- 		return -EINVAL;
- 	}
- 
--	obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
-+	obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
- 	if (!obj) {
- 		DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
- 		return -ENOENT;
-diff --git a/amd/amdgpu/dce_v11_0.c b/amd/amdgpu/dce_v11_0.c
-index d9c9b88..93dbc1a 100644
---- a/amd/amdgpu/dce_v11_0.c
-+++ b/amd/amdgpu/dce_v11_0.c
-@@ -2604,7 +2604,7 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc,
- 		return -EINVAL;
- 	}
- 
--	obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
-+	obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
- 	if (!obj) {
- 		DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
- 		return -ENOENT;
-diff --git a/amd/amdgpu/dce_v8_0.c b/amd/amdgpu/dce_v8_0.c
-index 7a027ce..c56a298 100644
---- a/amd/amdgpu/dce_v8_0.c
-+++ b/amd/amdgpu/dce_v8_0.c
-@@ -2501,7 +2501,7 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,
- 		return -EINVAL;
- 	}
- 
--	obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
-+	obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
- 	if (!obj) {
- 		DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
- 		return -ENOENT;
-diff --git a/amd/backport/include/kcl/kcl_drm.h b/amd/backport/include/kcl/kcl_drm.h
-index a65ee25..5a8a7b3 100644
---- a/amd/backport/include/kcl/kcl_drm.h
-+++ b/amd/backport/include/kcl/kcl_drm.h
-@@ -3,6 +3,7 @@
- 
- #include <linux/version.h>
- #include <drm/drmP.h>
-+#include <drm/drm_gem.h>
- 
- #if defined(BUILD_AS_DKMS)
- extern int drm_pcie_get_max_link_width(struct drm_device *dev, u32 *mlw);
-@@ -123,4 +124,14 @@ static inline int kcl_drm_universal_plane_init(struct drm_device *dev, struct dr
- #endif
- }
- 
-+static inline struct drm_gem_object *kcl_drm_gem_object_lookup(struct drm_device *dev,
-+                                 struct drm_file *filp,
-+                                 u32 handle) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
-+    return drm_gem_object_lookup(filp, handle);
-+#else
-+    return drm_gem_object_lookup(dev, filp, handle);
-+#endif
-+}
-+
- #endif /* AMDGPU_BACKPORT_KCL_DRM_H */
-diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
-index 3f357a5..2e2d2e6 100644
---- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
-+++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
-@@ -152,7 +152,7 @@ static int dm_crtc_pin_cursor_bo_new(
- 
- 		amdgpu_crtc = to_amdgpu_crtc(crtc);
- 
--		obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
-+		obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
- 
- 		if (!obj) {
- 			DRM_ERROR(
--- 
-2.9.3
-
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0004-Remove-extra-parameter-from-ttm_bo_reserve-for-4.7.0.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0004-Remove-extra-parameter-from-ttm_bo_reserve-for-4.7.0.patch
new file mode 100644
index 000000000000..794da9b5fb71
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0004-Remove-extra-parameter-from-ttm_bo_reserve-for-4.7.0.patch
@@ -0,0 +1,28 @@
+From d21e811c6f26674a0e1c2398dce6d247a1dd4918 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Sun, 25 Sep 2016 15:46:58 +0100
+Subject: [PATCH 04/14] Remove extra parameter from ttm_bo_reserve for 4.7.0
+
+---
+ amd/backport/include/kcl/kcl_ttm.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/amd/backport/include/kcl/kcl_ttm.h b/amd/backport/include/kcl/kcl_ttm.h
+index 05c444b..c5a602c 100644
+--- a/amd/backport/include/kcl/kcl_ttm.h
++++ b/amd/backport/include/kcl/kcl_ttm.h
+@@ -106,7 +106,11 @@ static inline int kcl_ttm_bo_reserve(struct ttm_buffer_object *bo,
+ 				 struct ww_acquire_ctx *ticket)
+ {
+ #if defined(BUILD_AS_DKMS)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	return ttm_bo_reserve(bo, interruptible, no_wait, ticket);
++#else
+ 	return ttm_bo_reserve(bo, interruptible, no_wait, false, ticket);
++#endif
+ #else
+ 	return ttm_bo_reserve(bo, interruptible, no_wait, ticket);
+ #endif
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch
deleted file mode 100644
index 54394b7879be..000000000000
--- a/pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 2bd83488ccea22bb9e399986c171cccc3b6beb93 Mon Sep 17 00:00:00 2001
-From: David McFarland <corngood@gmail.com>
-Date: Sun, 21 Aug 2016 16:40:32 -0300
-Subject: [PATCH 4/8] paging changes for linux-4.6
-
----
- amd/amdgpu/amdgpu_ttm.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/amd/amdgpu/amdgpu_ttm.c b/amd/amdgpu/amdgpu_ttm.c
-index 7bdebde..8b676c2 100644
---- a/amd/amdgpu/amdgpu_ttm.c
-+++ b/amd/amdgpu/amdgpu_ttm.c
-@@ -548,8 +548,12 @@ int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
- 		list_add(&guptask.list, &gtt->guptasks);
- 		spin_unlock(&gtt->guptasklock);
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
-+		r = get_user_pages(userptr, num_pages, write, 0, p, NULL);
-+#else
- 		r = get_user_pages(current, current->mm, userptr, num_pages,
--				   write, 0, p, NULL);
-+			write, 0, p, NULL);
-+#endif
- 
- 		spin_lock(&gtt->guptasklock);
- 		list_del(&guptask.list);
-@@ -625,7 +629,11 @@ static void amdgpu_ttm_tt_unpin_userptr(struct ttm_tt *ttm)
- 			set_page_dirty(page);
- 
- 		mark_page_accessed(page);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
-+		put_page(page);
-+#else
- 		page_cache_release(page);
-+#endif
- 	}
- 
- 	sg_free_table(ttm->sg);
--- 
-2.9.3
-
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch
deleted file mode 100644
index 6da3e46a3ee6..000000000000
--- a/pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From c41c15fa04e363c41272e7b5d767710170691347 Mon Sep 17 00:00:00 2001
-From: "Luke A. Guest" <laguest@archeia.com>
-Date: Mon, 4 Jul 2016 19:19:45 +0100
-Subject: [PATCH 5/8] LRU stuff isn't available until >= 4.7.x
-
----
- amd/amdgpu/amdgpu_ttm.c | 4 ++--
- amd/backport/kcl_ttm.c  | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/amd/amdgpu/amdgpu_ttm.c b/amd/amdgpu/amdgpu_ttm.c
-index 8b676c2..752d065 100644
---- a/amd/amdgpu/amdgpu_ttm.c
-+++ b/amd/amdgpu/amdgpu_ttm.c
-@@ -907,7 +907,7 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm,
- 	return flags;
- }
- 
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
- 
- static void amdgpu_ttm_lru_removal(struct ttm_buffer_object *tbo)
- {
-@@ -969,7 +969,7 @@ static struct ttm_bo_driver amdgpu_bo_driver = {
- 	.fault_reserve_notify = &amdgpu_bo_fault_reserve_notify,
- 	.io_mem_reserve = &amdgpu_ttm_io_mem_reserve,
- 	.io_mem_free = &amdgpu_ttm_io_mem_free,
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
- 	.lru_removal = &amdgpu_ttm_lru_removal,
- 	.lru_tail = &amdgpu_ttm_lru_tail,
- 	.swap_lru_tail = &amdgpu_ttm_swap_lru_tail,
-diff --git a/amd/backport/kcl_ttm.c b/amd/backport/kcl_ttm.c
-index 24f7a83..1a2cb7b 100644
---- a/amd/backport/kcl_ttm.c
-+++ b/amd/backport/kcl_ttm.c
-@@ -7,7 +7,7 @@ static int _kcl_ttm_bo_del_from_lru(struct ttm_buffer_object *bo)
- {
- 	int put_count = 0;
- 
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
- 	struct ttm_bo_device *bdev = bo->bdev;
- 
- 	if (bdev->driver->lru_removal)
--- 
-2.9.3
-
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0005-Remove-first-param-from-drm_gem_object_lookup.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0005-Remove-first-param-from-drm_gem_object_lookup.patch
new file mode 100644
index 000000000000..94cb3e72ed56
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0005-Remove-first-param-from-drm_gem_object_lookup.patch
@@ -0,0 +1,196 @@
+From 4ac701dce0a4139e89c80237fc4eaa65f48c6f07 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Sun, 25 Sep 2016 15:53:50 +0100
+Subject: [PATCH 05/14] Remove first param from drm_gem_object_lookup
+
+---
+ amd/amdgpu/amdgpu_bo_list.c         |  4 ++++
+ amd/amdgpu/amdgpu_cs.c              |  4 ++++
+ amd/amdgpu/amdgpu_display.c         |  4 ++++
+ amd/amdgpu/amdgpu_gem.c             | 20 ++++++++++++++++++++
+ amd/amdgpu/dce_v10_0.c              |  4 ++++
+ amd/amdgpu/dce_v11_0.c              |  4 ++++
+ amd/amdgpu/dce_v8_0.c               |  4 ++++
+ amd/dal/amdgpu_dm/amdgpu_dm_types.c |  4 ++++
+ 8 files changed, 48 insertions(+)
+
+diff --git a/amd/amdgpu/amdgpu_bo_list.c b/amd/amdgpu/amdgpu_bo_list.c
+index 844214d..7ae09cf 100644
+--- a/amd/amdgpu/amdgpu_bo_list.c
++++ b/amd/amdgpu/amdgpu_bo_list.c
+@@ -107,7 +107,11 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev,
+ 		struct amdgpu_bo *bo;
+ 		struct mm_struct *usermm;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++		gobj = drm_gem_object_lookup(filp, info[i].bo_handle);
++#else
+ 		gobj = drm_gem_object_lookup(adev->ddev, filp, info[i].bo_handle);
++#endif
+ 		if (!gobj) {
+ 			r = -ENOENT;
+ 			goto error_free;
+diff --git a/amd/amdgpu/amdgpu_cs.c b/amd/amdgpu/amdgpu_cs.c
+index 20f6ab2..22363ab 100644
+--- a/amd/amdgpu/amdgpu_cs.c
++++ b/amd/amdgpu/amdgpu_cs.c
+@@ -92,8 +92,12 @@ static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p,
+ {
+ 	struct drm_gem_object *gobj;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	gobj = drm_gem_object_lookup(p->filp, data->handle);
++#else
+ 	gobj = drm_gem_object_lookup(p->adev->ddev, p->filp,
+ 				     data->handle);
++#endif
+ 	if (gobj == NULL)
+ 		return -EINVAL;
+ 
+diff --git a/amd/amdgpu/amdgpu_display.c b/amd/amdgpu/amdgpu_display.c
+index 96c4fa5..862611c 100644
+--- a/amd/amdgpu/amdgpu_display.c
++++ b/amd/amdgpu/amdgpu_display.c
+@@ -601,7 +601,11 @@ amdgpu_user_framebuffer_create(struct drm_device *dev,
+ 	struct amdgpu_framebuffer *amdgpu_fb;
+ 	int ret;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]);
++#else
+ 	obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
++#endif
+ 	if (obj ==  NULL) {
+ 		dev_err(&dev->pdev->dev, "No GEM object associated to handle 0x%08X, "
+ 			"can't create framebuffer\n", mode_cmd->handles[0]);
+diff --git a/amd/amdgpu/amdgpu_gem.c b/amd/amdgpu/amdgpu_gem.c
+index 0069aec..6da025b 100644
+--- a/amd/amdgpu/amdgpu_gem.c
++++ b/amd/amdgpu/amdgpu_gem.c
+@@ -397,7 +397,11 @@ int amdgpu_mode_dumb_mmap(struct drm_file *filp,
+ 	struct drm_gem_object *gobj;
+ 	struct amdgpu_bo *robj;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	gobj = drm_gem_object_lookup(filp, handle);
++#else
+ 	gobj = drm_gem_object_lookup(dev, filp, handle);
++#endif
+ 	if (gobj == NULL) {
+ 		return -ENOENT;
+ 	}
+@@ -461,7 +465,11 @@ int amdgpu_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
+ 	int r = 0;
+ 	long ret;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	gobj = drm_gem_object_lookup(filp, handle);
++#else
+ 	gobj = drm_gem_object_lookup(dev, filp, handle);
++#endif
+ 	if (gobj == NULL) {
+ 		return -ENOENT;
+ 	}
+@@ -495,7 +503,11 @@ int amdgpu_gem_metadata_ioctl(struct drm_device *dev, void *data,
+ 	int r = -1;
+ 
+ 	DRM_DEBUG("%d \n", args->handle);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	gobj = drm_gem_object_lookup(filp, args->handle);
++#else
+ 	gobj = drm_gem_object_lookup(dev, filp, args->handle);
++#endif
+ 	if (gobj == NULL)
+ 		return -ENOENT;
+ 	robj = gem_to_amdgpu_bo(gobj);
+@@ -643,7 +655,11 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
+ 		return -EINVAL;
+ 	}
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	gobj = drm_gem_object_lookup(filp, args->handle);
++#else
+ 	gobj = drm_gem_object_lookup(dev, filp, args->handle);
++#endif
+ 	if (gobj == NULL)
+ 		return -ENOENT;
+ 	rbo = gem_to_amdgpu_bo(gobj);
+@@ -705,7 +721,11 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
+ 	struct amdgpu_bo *robj;
+ 	int r;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	gobj = drm_gem_object_lookup(filp, args->handle);
++#else
+ 	gobj = drm_gem_object_lookup(dev, filp, args->handle);
++#endif
+ 	if (gobj == NULL) {
+ 		return -ENOENT;
+ 	}
+diff --git a/amd/amdgpu/dce_v10_0.c b/amd/amdgpu/dce_v10_0.c
+index 3fae88d..0fd1e4f 100644
+--- a/amd/amdgpu/dce_v10_0.c
++++ b/amd/amdgpu/dce_v10_0.c
+@@ -2594,7 +2594,11 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,
+ 		return -EINVAL;
+ 	}
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	obj = drm_gem_object_lookup(file_priv, handle);
++#else
+ 	obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++#endif
+ 	if (!obj) {
+ 		DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
+ 		return -ENOENT;
+diff --git a/amd/amdgpu/dce_v11_0.c b/amd/amdgpu/dce_v11_0.c
+index fe87795..a85eb5f 100644
+--- a/amd/amdgpu/dce_v11_0.c
++++ b/amd/amdgpu/dce_v11_0.c
+@@ -2604,7 +2604,11 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc,
+ 		return -EINVAL;
+ 	}
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	obj = drm_gem_object_lookup(file_priv, handle);
++#else
+ 	obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++#endif
+ 	if (!obj) {
+ 		DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
+ 		return -ENOENT;
+diff --git a/amd/amdgpu/dce_v8_0.c b/amd/amdgpu/dce_v8_0.c
+index 1f5959b..308f5e4 100644
+--- a/amd/amdgpu/dce_v8_0.c
++++ b/amd/amdgpu/dce_v8_0.c
+@@ -2448,7 +2448,11 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,
+ 		return -EINVAL;
+ 	}
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	obj = drm_gem_object_lookup(file_priv, handle);
++#else
+ 	obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++#endif
+ 	if (!obj) {
+ 		DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
+ 		return -ENOENT;
+diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+index d14c96f..a9de2e5 100644
+--- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
++++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+@@ -156,7 +156,11 @@ static int dm_crtc_pin_cursor_bo_new(
+ 
+ 		amdgpu_crtc = to_amdgpu_crtc(crtc);
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++		obj = drm_gem_object_lookup(file_priv, handle);
++#else
+ 		obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++#endif
+ 
+ 		if (!obj) {
+ 			DRM_ERROR(
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch
deleted file mode 100644
index 5be5acad00d6..000000000000
--- a/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 5b90b8d8ab44637c707623b25ee98aa4ebded308 Mon Sep 17 00:00:00 2001
-From: "Luke A. Guest" <laguest@archeia.com>
-Date: Mon, 4 Jul 2016 19:30:08 +0100
-Subject: [PATCH 6/8] Change name of vblank_disable_allowed to
- vblank_disable_immediate under 4.7.x.
-
----
- amd/amdgpu/amdgpu_irq.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/amd/amdgpu/amdgpu_irq.c b/amd/amdgpu/amdgpu_irq.c
-index d13865a..5cfa69f 100644
---- a/amd/amdgpu/amdgpu_irq.c
-+++ b/amd/amdgpu/amdgpu_irq.c
-@@ -240,7 +240,11 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
- 		INIT_WORK(&adev->hotplug_work,
- 				amdgpu_hotplug_work_func);
- 	}
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
-+	adev->ddev->vblank_disable_immediate = true;
-+#else
- 	adev->ddev->vblank_disable_allowed = true;
-+#endif
- 
- 	INIT_WORK(&adev->reset_work, amdgpu_irq_reset_work_func);
- 
--- 
-2.9.3
-
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Remove-vblank_disable_allowed-assignment.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Remove-vblank_disable_allowed-assignment.patch
new file mode 100644
index 000000000000..dc35fe4c96af
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Remove-vblank_disable_allowed-assignment.patch
@@ -0,0 +1,26 @@
+From d4a070e6d68ff7ce8ac49c6135acc759c9a1cf6e Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Sun, 25 Sep 2016 16:01:43 +0100
+Subject: [PATCH 06/14] Remove vblank_disable_allowed assignment
+
+---
+ amd/amdgpu/amdgpu_irq.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/amd/amdgpu/amdgpu_irq.c b/amd/amdgpu/amdgpu_irq.c
+index 6e85e69..71358c9 100644
+--- a/amd/amdgpu/amdgpu_irq.c
++++ b/amd/amdgpu/amdgpu_irq.c
+@@ -240,7 +240,9 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
+ 		INIT_WORK(&adev->hotplug_work,
+ 				amdgpu_hotplug_work_func);
+ 	}
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)
+ 	adev->ddev->vblank_disable_allowed = true;
++#endif
+ 
+ 	INIT_WORK(&adev->reset_work, amdgpu_irq_reset_work_func);
+ 
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0007-Fix-__drm_atomic_helper_connector_destroy_state-call.patch
index 13d4a282ac82..9e8749a31ca6 100644
--- a/pkgs/os-specific/linux/amdgpu-pro/patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0007-Fix-__drm_atomic_helper_connector_destroy_state-call.patch
@@ -1,23 +1,22 @@
-From 27ef2ce0d4d8eeb3bca32ddeae503f0a334832aa Mon Sep 17 00:00:00 2001
+From 406bb3a83b51b2bcf61a972721aa116e69c0a771 Mon Sep 17 00:00:00 2001
 From: "Luke A. Guest" <laguest@archeia.com>
-Date: Mon, 4 Jul 2016 19:41:08 +0100
-Subject: [PATCH 7/8] Remove connector parameter from
- __drm_atomic_helper_connector_destroy_state for 4.7.x kernels.
+Date: Sun, 25 Sep 2016 16:10:27 +0100
+Subject: [PATCH 07/14] Fix __drm_atomic_helper_connector_destroy_state call
 
 ---
  amd/dal/amdgpu_dm/amdgpu_dm_types.c | 4 ++++
  1 file changed, 4 insertions(+)
 
 diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
-index 2e2d2e6..cd34607 100644
+index a9de2e5..fedf490 100644
 --- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
 +++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
-@@ -1205,7 +1205,11 @@ void amdgpu_dm_connector_atomic_destroy_state(
+@@ -1224,7 +1224,11 @@ void amdgpu_dm_connector_atomic_destroy_state(
  	struct dm_connector_state *dm_state =
  		to_dm_connector_state(state);
  
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
-+	__drm_atomic_helper_connector_destroy_state(state);
++	__drm_atomic_helper_connector_destroy_state(connector->state);
 +#else
  	__drm_atomic_helper_connector_destroy_state(connector, state);
 +#endif
@@ -25,5 +24,5 @@ index 2e2d2e6..cd34607 100644
  	kfree(dm_state);
  }
 -- 
-2.9.3
+2.10.1
 
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0008-Change-seq_printf-format-for-64-bit-context.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0008-Change-seq_printf-format-for-64-bit-context.patch
new file mode 100644
index 000000000000..827237a5f9ad
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0008-Change-seq_printf-format-for-64-bit-context.patch
@@ -0,0 +1,30 @@
+From f268e7fa537fd8e12f4023803df795b2e29747e7 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Sun, 25 Sep 2016 16:46:39 +0100
+Subject: [PATCH 08/14] Change seq_printf format for 64 bit context
+
+---
+ amd/amdgpu/amdgpu_sa.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/amd/amdgpu/amdgpu_sa.c b/amd/amdgpu/amdgpu_sa.c
+index 768a265..51d118e 100644
+--- a/amd/amdgpu/amdgpu_sa.c
++++ b/amd/amdgpu/amdgpu_sa.c
+@@ -428,8 +428,13 @@ void amdgpu_sa_bo_dump_debug_info(struct amdgpu_sa_manager *sa_manager,
+ 			   soffset, eoffset, eoffset - soffset);
+ 
+ 		if (i->fence)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++			seq_printf(m, " protected by 0x%08x on context %llu",
++				   i->fence->seqno, i->fence->context);
++#else
+ 			seq_printf(m, " protected by 0x%08x on context %d",
+ 				   i->fence->seqno, i->fence->context);
++#endif
+ 
+ 		seq_printf(m, "\n");
+ 	}
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch
deleted file mode 100644
index 693ad8b2f40d..000000000000
--- a/pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From c9f2501131da0d9173e21f7e8ff5741a7fcfedb6 Mon Sep 17 00:00:00 2001
-From: David McFarland <corngood@gmail.com>
-Date: Sun, 21 Aug 2016 16:58:45 -0300
-Subject: [PATCH 8/8] fix apparent typo in bandwidth_calcs causing array error
-
----
- amd/dal/dc/calcs/bandwidth_calcs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/amd/dal/dc/calcs/bandwidth_calcs.c b/amd/dal/dc/calcs/bandwidth_calcs.c
-index 8a19139..c4ededd 100644
---- a/amd/dal/dc/calcs/bandwidth_calcs.c
-+++ b/amd/dal/dc/calcs/bandwidth_calcs.c
-@@ -3181,7 +3181,7 @@ static void calculate_bandwidth(
- 																	bw_int_to_fixed(
- 																		2),
- 																	vbios->mcifwrmc_urgent_latency),
--																results->dmif_burst_time[i][j]),
-+																results->dmif_burst_time[results->y_clk_level][results->sclk_level]),
- 															results->mcifwr_burst_time[results->y_clk_level][results->sclk_level])),
- 														results->dispclk),
- 													bw_int_to_fixed(
--- 
-2.9.3
-
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0009-Fix-vblank-calls.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0009-Fix-vblank-calls.patch
new file mode 100644
index 000000000000..82db5905a459
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0009-Fix-vblank-calls.patch
@@ -0,0 +1,135 @@
+From 9da98ec93816277a2d4e93d3205da044bace08bc Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Sun, 25 Sep 2016 16:49:09 +0100
+Subject: [PATCH 09/14] Fix vblank calls
+
+---
+ amd/amdgpu/amdgpu_display.c   | 8 ++++++++
+ amd/amdgpu/dce_v10_0.c        | 8 ++++++++
+ amd/amdgpu/dce_v11_0.c        | 8 ++++++++
+ amd/amdgpu/dce_v8_0.c         | 8 ++++++++
+ amd/dal/amdgpu_dm/amdgpu_dm.c | 4 ++++
+ 5 files changed, 36 insertions(+)
+
+diff --git a/amd/amdgpu/amdgpu_display.c b/amd/amdgpu/amdgpu_display.c
+index 862611c..267c65f 100644
+--- a/amd/amdgpu/amdgpu_display.c
++++ b/amd/amdgpu/amdgpu_display.c
+@@ -268,7 +268,11 @@ int amdgpu_crtc_page_flip(struct drm_crtc *crtc,
+ 
+ 	work->base = base;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++	r = drm_crtc_vblank_get(crtc);
++#else
+ 	r = drm_vblank_get(crtc->dev, amdgpu_crtc->crtc_id);
++#endif
+ 	if (r) {
+ 		DRM_ERROR("failed to get vblank before flip\n");
+ 		goto pflip_cleanup;
+@@ -296,7 +300,11 @@ int amdgpu_crtc_page_flip(struct drm_crtc *crtc,
+ 	return 0;
+ 
+ vblank_cleanup:
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++	drm_crtc_vblank_put(&amdgpu_crtc->base);
++#else
+ 	drm_vblank_put(crtc->dev, amdgpu_crtc->crtc_id);
++#endif
+ 
+ pflip_cleanup:
+ 	if (unlikely(amdgpu_bo_reserve(new_rbo, false) != 0)) {
+diff --git a/amd/amdgpu/dce_v10_0.c b/amd/amdgpu/dce_v10_0.c
+index 0fd1e4f..5f0044c 100644
+--- a/amd/amdgpu/dce_v10_0.c
++++ b/amd/amdgpu/dce_v10_0.c
+@@ -3372,11 +3372,19 @@ static int dce_v10_0_pageflip_irq(struct amdgpu_device *adev,
+ 
+ 	/* wakeup usersapce */
+ 	if (works->event)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
++#else
+ 		drm_send_vblank_event(adev->ddev, crtc_id, works->event);
++#endif
+ 
+ 	spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++	drm_crtc_vblank_put(&amdgpu_crtc->base);
++#else
+ 	drm_vblank_put(adev->ddev, amdgpu_crtc->crtc_id);
++#endif
+ 	schedule_work(&works->unpin_work);
+ 
+ 	return 0;
+diff --git a/amd/amdgpu/dce_v11_0.c b/amd/amdgpu/dce_v11_0.c
+index a85eb5f..8edc670 100644
+--- a/amd/amdgpu/dce_v11_0.c
++++ b/amd/amdgpu/dce_v11_0.c
+@@ -3432,11 +3432,19 @@ static int dce_v11_0_pageflip_irq(struct amdgpu_device *adev,
+ 
+ 	/* wakeup usersapce */
+ 	if(works->event)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
++#else
+ 		drm_send_vblank_event(adev->ddev, crtc_id, works->event);
++#endif
+ 
+ 	spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++	drm_crtc_vblank_put(&amdgpu_crtc->base);
++#else
+ 	drm_vblank_put(adev->ddev, amdgpu_crtc->crtc_id);
++#endif
+ 	schedule_work(&works->unpin_work);
+ 
+ 	return 0;
+diff --git a/amd/amdgpu/dce_v8_0.c b/amd/amdgpu/dce_v8_0.c
+index 308f5e4..57e8014 100644
+--- a/amd/amdgpu/dce_v8_0.c
++++ b/amd/amdgpu/dce_v8_0.c
+@@ -3323,11 +3323,19 @@ static int dce_v8_0_pageflip_irq(struct amdgpu_device *adev,
+ 
+ 	/* wakeup usersapce */
+ 	if (works->event)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
++#else
+ 		drm_send_vblank_event(adev->ddev, crtc_id, works->event);
++#endif
+ 
+ 	spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++	drm_crtc_vblank_put(&amdgpu_crtc->base);
++#else
+ 	drm_vblank_put(adev->ddev, amdgpu_crtc->crtc_id);
++#endif
+ 	schedule_work(&works->unpin_work);
+ 
+ 	return 0;
+diff --git a/amd/dal/amdgpu_dm/amdgpu_dm.c b/amd/dal/amdgpu_dm/amdgpu_dm.c
+index 30865ec..f49999b 100644
+--- a/amd/dal/amdgpu_dm/amdgpu_dm.c
++++ b/amd/dal/amdgpu_dm/amdgpu_dm.c
+@@ -196,10 +196,14 @@ static void dm_pflip_high_irq(void *interrupt_params)
+ 
+ 	/* wakeup usersapce */
+ 	if(works->event)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
++#else
+ 		drm_send_vblank_event(
+ 			adev->ddev,
+ 			amdgpu_crtc->crtc_id,
+ 			works->event);
++#endif
+ 
+ 	spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
+ 
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0010-Fix-crtc_gamma-functions-for-4.8.0.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0010-Fix-crtc_gamma-functions-for-4.8.0.patch
new file mode 100644
index 000000000000..b11ab3e557e2
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0010-Fix-crtc_gamma-functions-for-4.8.0.patch
@@ -0,0 +1,163 @@
+From b41eafa282a003cde9729e2ff486f55dc54f12c6 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Sun, 25 Sep 2016 16:56:47 +0100
+Subject: [PATCH 10/14] Fix crtc_gamma functions for 4.8.0
+
+---
+ amd/amdgpu/dce_v10_0.c              | 19 +++++++++++++++++++
+ amd/amdgpu/dce_v11_0.c              | 19 +++++++++++++++++++
+ amd/amdgpu/dce_v8_0.c               | 19 +++++++++++++++++++
+ amd/dal/amdgpu_dm/amdgpu_dm_types.c | 12 ++++++++++++
+ 4 files changed, 69 insertions(+)
+
+diff --git a/amd/amdgpu/dce_v10_0.c b/amd/amdgpu/dce_v10_0.c
+index 5f0044c..85378aa 100644
+--- a/amd/amdgpu/dce_v10_0.c
++++ b/amd/amdgpu/dce_v10_0.c
+@@ -2671,6 +2671,24 @@ static void dce_v10_0_cursor_reset(struct drm_crtc *crtc)
+ 	}
+ }
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++static int dce_v10_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
++				    u16 *blue, uint32_t size)
++{
++	struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
++	int i;
++
++	/* userspace palettes are always correct as is */
++	for (i = 0; i < size; i++) {
++		amdgpu_crtc->lut_r[i] = red[i] >> 6;
++		amdgpu_crtc->lut_g[i] = green[i] >> 6;
++		amdgpu_crtc->lut_b[i] = blue[i] >> 6;
++	}
++	dce_v10_0_crtc_load_lut(crtc);
++
++	return 0;
++}
++#else
+ static void dce_v10_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
+ 				    u16 *blue, uint32_t start, uint32_t size)
+ {
+@@ -2685,6 +2703,7 @@ static void dce_v10_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green
+ 	}
+ 	dce_v10_0_crtc_load_lut(crtc);
+ }
++#endif
+ 
+ static void dce_v10_0_crtc_destroy(struct drm_crtc *crtc)
+ {
+diff --git a/amd/amdgpu/dce_v11_0.c b/amd/amdgpu/dce_v11_0.c
+index 8edc670..0129543 100644
+--- a/amd/amdgpu/dce_v11_0.c
++++ b/amd/amdgpu/dce_v11_0.c
+@@ -2681,6 +2681,24 @@ static void dce_v11_0_cursor_reset(struct drm_crtc *crtc)
+ 	}
+ }
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++static int dce_v11_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
++				    u16 *blue, uint32_t size)
++{
++	struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
++	int i;
++
++	/* userspace palettes are always correct as is */
++	for (i = 0; i < size; i++) {
++		amdgpu_crtc->lut_r[i] = red[i] >> 6;
++		amdgpu_crtc->lut_g[i] = green[i] >> 6;
++		amdgpu_crtc->lut_b[i] = blue[i] >> 6;
++	}
++	dce_v11_0_crtc_load_lut(crtc);
++
++	return 0;
++}
++#else
+ static void dce_v11_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
+ 				    u16 *blue, uint32_t start, uint32_t size)
+ {
+@@ -2695,6 +2713,7 @@ static void dce_v11_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green
+ 	}
+ 	dce_v11_0_crtc_load_lut(crtc);
+ }
++#endif
+ 
+ static void dce_v11_0_crtc_destroy(struct drm_crtc *crtc)
+ {
+diff --git a/amd/amdgpu/dce_v8_0.c b/amd/amdgpu/dce_v8_0.c
+index 57e8014..d0d9267 100644
+--- a/amd/amdgpu/dce_v8_0.c
++++ b/amd/amdgpu/dce_v8_0.c
+@@ -2525,6 +2525,24 @@ static void dce_v8_0_cursor_reset(struct drm_crtc *crtc)
+ 	}
+ }
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++static int dce_v8_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
++				    u16 *blue, uint32_t size)
++{
++	struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
++	int i;
++
++	/* userspace palettes are always correct as is */
++	for (i = 0; i < size; i++) {
++		amdgpu_crtc->lut_r[i] = red[i] >> 6;
++		amdgpu_crtc->lut_g[i] = green[i] >> 6;
++		amdgpu_crtc->lut_b[i] = blue[i] >> 6;
++	}
++	dce_v8_0_crtc_load_lut(crtc);
++
++	return 0;
++}
++#else
+ static void dce_v8_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
+ 				    u16 *blue, uint32_t start, uint32_t size)
+ {
+@@ -2539,6 +2557,7 @@ static void dce_v8_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
+ 	}
+ 	dce_v8_0_crtc_load_lut(crtc);
+ }
++#endif
+ 
+ static void dce_v8_0_crtc_destroy(struct drm_crtc *crtc)
+ {
+diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+index fedf490..c1f3c27 100644
+--- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
++++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+@@ -995,6 +995,13 @@ void amdgpu_dm_crtc_destroy(struct drm_crtc *crtc)
+ 	kfree(crtc);
+ }
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++static int amdgpu_dm_atomic_crtc_gamma_set(struct drm_crtc *crtc,
++					   u16 *red,
++					   u16 *green,
++					   u16 *blue,
++					   uint32_t size)
++#else
+ static void amdgpu_dm_atomic_crtc_gamma_set(
+ 		struct drm_crtc *crtc,
+ 		u16 *red,
+@@ -1002,6 +1009,7 @@ static void amdgpu_dm_atomic_crtc_gamma_set(
+ 		u16 *blue,
+ 		uint32_t start,
+ 		uint32_t size)
++#endif
+ {
+ 	struct drm_device *dev = crtc->dev;
+ 	struct drm_property *prop = dev->mode_config.prop_crtc_id;
+@@ -1009,6 +1017,10 @@ static void amdgpu_dm_atomic_crtc_gamma_set(
+ 	crtc->state->mode.private_flags |= AMDGPU_CRTC_MODE_PRIVATE_FLAGS_GAMMASET;
+ 
+ 	drm_atomic_helper_crtc_set_property(crtc, prop, 0);
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++	return 0;
++#endif
+ }
+ 
+ static int dm_crtc_funcs_atomic_set_property(
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch
deleted file mode 100644
index ec8f2c5a5999..000000000000
--- a/pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From fbc0d704f47526ca38f518b60237962cc6b08305 Mon Sep 17 00:00:00 2001
-From: David McFarland <corngood@gmail.com>
-Date: Thu, 25 Aug 2016 23:08:02 -0300
-Subject: [PATCH] remove dependency on System.map
-
----
- amd/backport/Makefile    |  3 +--
- amd/backport/kcl_fence.c | 10 ++++++++--
- amd/backport/symbols     |  3 ---
- dkms.conf                |  1 -
- pre-build.sh             | 32 --------------------------------
- 5 files changed, 9 insertions(+), 40 deletions(-)
- delete mode 100644 amd/backport/symbols
- delete mode 100755 pre-build.sh
-
-diff --git a/amd/backport/Makefile b/amd/backport/Makefile
-index 6447a15..4682e0f 100644
---- a/amd/backport/Makefile
-+++ b/amd/backport/Makefile
-@@ -53,10 +53,9 @@ ccflags-y += -DOS_NAME_RHEL_7
- endif
- endif
- 
--BACKPORT_OBJS = symbols.o
- endif
- 
--BACKPORT_OBJS += kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
-+BACKPORT_OBJS = kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
- 
- amdgpu-y += $(addprefix ../backport/,$(BACKPORT_OBJS))
- 
-diff --git a/amd/backport/kcl_fence.c b/amd/backport/kcl_fence.c
-index 2141eef..ceef1fe 100644
---- a/amd/backport/kcl_fence.c
-+++ b/amd/backport/kcl_fence.c
-@@ -22,8 +22,14 @@ struct default_wait_cb {
- 	struct task_struct *task;
- };
- 
--extern void
--(*fence_default_wait_cb)(struct fence *fence, struct fence_cb *cb);
-+static void
-+fence_default_wait_cb(struct fence *fence, struct fence_cb *cb)
-+{
-+	struct default_wait_cb *wait =
-+		container_of(cb, struct default_wait_cb, base);
-+
-+	wake_up_process(wait->task);
-+}
- 
- signed long
- _kcl_fence_wait_any_timeout(struct fence **fences, uint32_t count,
-diff --git a/amd/backport/symbols b/amd/backport/symbols
-deleted file mode 100644
-index 2d3f2ee..0000000
---- a/amd/backport/symbols
-+++ /dev/null
-@@ -1,3 +0,0 @@
--SYMS=""
--
--SYMS+="fence_default_wait_cb"
-diff --git a/dkms.conf b/dkms.conf
-index 9ca148e..36be480 100644
---- a/dkms.conf
-+++ b/dkms.conf
-@@ -4,4 +4,3 @@ BUILT_MODULE_NAME[0]="amdgpu"
- BUILT_MODULE_LOCATION[0]="amd/amdgpu"
- DEST_MODULE_LOCATION[0]="/extra"
- AUTOINSTALL="yes"
--PRE_BUILD="pre-build.sh $kernelver"
-\ No newline at end of file
-diff --git a/pre-build.sh b/pre-build.sh
-deleted file mode 100755
-index 88ec680..0000000
---- a/pre-build.sh
-+++ /dev/null
-@@ -1,32 +0,0 @@
--#!/bin/bash
--
--KERNELVER=$1
--KERNELVER_BASE=${KERNELVER%%-*}
--
--version_lt () {
--    newest=$((echo "$1"; echo "$2") | sort -V | tail -n1)
--    [ "$1" != "$newest" ]
--}
--
--version_ge () {
--    newest=$((echo "$1"; echo "$2") | sort -V | tail -n1)
--    [ "$1" = "$newest" ]
--}
--
--version_gt () {
--    oldest=$((echo "$1"; echo "$2") | sort -V | head -n1)
--    [ "$1" != "$oldest" ]
--}
--
--version_le () {
--    oldest=$((echo "$1"; echo "$2") | sort -V | head -n1)
--    [ "$1" = "$oldest" ]
--}
--
--source amd/backport/symbols
--
--echo '// auto generated by DKMS pre-build.sh' > amd/backport/symbols.c
--for sym in $SYMS; do
--    addr=$(grep $sym /boot/System.map-$KERNELVER | awk -F' ' '{print $1}')
--    echo "void *$sym = (void *)0x$addr;" >> amd/backport/symbols.c
--done
--- 
-2.9.3
-
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0011-Fix-drm_atomic_helper_swap_state-for-4.8.0.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0011-Fix-drm_atomic_helper_swap_state-for-4.8.0.patch
new file mode 100644
index 000000000000..d205fc3189ce
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0011-Fix-drm_atomic_helper_swap_state-for-4.8.0.patch
@@ -0,0 +1,28 @@
+From 32422de1ddaf539d284b32de5fe43d07b7553499 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Sun, 25 Sep 2016 17:00:32 +0100
+Subject: [PATCH 11/14] Fix drm_atomic_helper_swap_state for 4.8.0
+
+---
+ amd/dal/amdgpu_dm/amdgpu_dm_types.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+index c1f3c27..60cba1a 100644
+--- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
++++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+@@ -2331,7 +2331,11 @@ int amdgpu_dm_atomic_commit(
+ 	 * the software side now.
+ 	 */
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++	drm_atomic_helper_swap_state(state, true);
++#else
+ 	drm_atomic_helper_swap_state(dev, state);
++#endif
+ 
+ 	/*
+ 	 * From this point state become old state really. New state is
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0012-Add-extra-flag-to-ttm_bo_move_ttm-for-4.8.0-rc2.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0012-Add-extra-flag-to-ttm_bo_move_ttm-for-4.8.0-rc2.patch
new file mode 100644
index 000000000000..77b0cf796401
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0012-Add-extra-flag-to-ttm_bo_move_ttm-for-4.8.0-rc2.patch
@@ -0,0 +1,40 @@
+From 69207f061e13e6f02418d5706d230135abcc1a72 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Sun, 25 Sep 2016 19:19:45 +0100
+Subject: [PATCH 12/14] Add extra flag to ttm_bo_move_ttm for >=4.8.0-rc2
+
+---
+ amd/amdgpu/amdgpu_ttm.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/amd/amdgpu/amdgpu_ttm.c b/amd/amdgpu/amdgpu_ttm.c
+index 145732a..dd691fa 100644
+--- a/amd/amdgpu/amdgpu_ttm.c
++++ b/amd/amdgpu/amdgpu_ttm.c
+@@ -344,7 +344,11 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo,
+ 	if (unlikely(r)) {
+ 		goto out_cleanup;
+ 	}
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++	r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, new_mem);
++#else
+ 	r = ttm_bo_move_ttm(bo, true, no_wait_gpu, new_mem);
++#endif
+ out_cleanup:
+ 	ttm_bo_mem_put(bo, &tmp_mem);
+ 	return r;
+@@ -377,7 +381,11 @@ static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo,
+ 	if (unlikely(r)) {
+ 		return r;
+ 	}
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++	r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, &tmp_mem);
++#else
+ 	r = ttm_bo_move_ttm(bo, true, no_wait_gpu, &tmp_mem);
++#endif
+ 	if (unlikely(r)) {
+ 		goto out_cleanup;
+ 	}
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0013-Remove-dependency-on-System.map.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0013-Remove-dependency-on-System.map.patch
new file mode 100644
index 000000000000..23a648e0d522
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0013-Remove-dependency-on-System.map.patch
@@ -0,0 +1,61 @@
+From 115cdb5a06b112674d9652ef44d7f19583ff0136 Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Wed, 26 Oct 2016 22:26:39 -0300
+Subject: [PATCH 13/14] Remove dependency on System.map
+
+---
+ amd/backport/Makefile    |  3 +--
+ amd/backport/kcl_fence.c | 10 ++++++++--
+ amd/backport/symbols     |  3 ---
+ 3 files changed, 9 insertions(+), 7 deletions(-)
+ delete mode 100644 amd/backport/symbols
+
+diff --git a/amd/backport/Makefile b/amd/backport/Makefile
+index dcc94d5..ef27e94 100644
+--- a/amd/backport/Makefile
++++ b/amd/backport/Makefile
+@@ -55,10 +55,9 @@ ccflags-y += -DOS_NAME_RHEL_7
+ endif
+ endif
+ 
+-BACKPORT_OBJS = symbols.o
+ endif
+ 
+-BACKPORT_OBJS += kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
++BACKPORT_OBJS = kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
+ 
+ amdgpu-y += $(addprefix ../backport/,$(BACKPORT_OBJS))
+ 
+diff --git a/amd/backport/kcl_fence.c b/amd/backport/kcl_fence.c
+index 8c697aa..85d96d3 100644
+--- a/amd/backport/kcl_fence.c
++++ b/amd/backport/kcl_fence.c
+@@ -25,8 +25,14 @@ struct default_wait_cb {
+ 	struct task_struct *task;
+ };
+ 
+-extern void
+-(*fence_default_wait_cb)(struct fence *fence, struct fence_cb *cb);
++static void
++fence_default_wait_cb(struct fence *fence, struct fence_cb *cb)
++{
++	struct default_wait_cb *wait =
++		container_of(cb, struct default_wait_cb, base);
++
++	wake_up_process(wait->task);
++}
+ 
+ signed long
+ _kcl_fence_wait_any_timeout(struct fence **fences, uint32_t count,
+diff --git a/amd/backport/symbols b/amd/backport/symbols
+deleted file mode 100644
+index 2d3f2ee..0000000
+--- a/amd/backport/symbols
++++ /dev/null
+@@ -1,3 +0,0 @@
+-SYMS=""
+-
+-SYMS+="fence_default_wait_cb"
+-- 
+2.10.1
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0009-disable-dal-by-default.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0014-disable-dal-by-default.patch
index 05bcbf8bd061..693985ec2a2d 100644
--- a/pkgs/os-specific/linux/amdgpu-pro/patches/0009-disable-dal-by-default.patch
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0014-disable-dal-by-default.patch
@@ -1,14 +1,14 @@
-From 49d45957ddaafe13a9cc7bacd1b9665fe9c517ac Mon Sep 17 00:00:00 2001
+From 942064886eae63ed7aa0a63c07e9f175898dddf7 Mon Sep 17 00:00:00 2001
 From: David McFarland <corngood@gmail.com>
 Date: Thu, 25 Aug 2016 22:17:06 -0300
-Subject: [PATCH] disable dal by default
+Subject: [PATCH 14/14] disable dal by default
 
 ---
  amd/amdgpu/amdgpu_drv.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/amd/amdgpu/amdgpu_drv.c b/amd/amdgpu/amdgpu_drv.c
-index 793528b..9a4dfcc 100644
+index 66f3242..df62815 100644
 --- a/amd/amdgpu/amdgpu_drv.c
 +++ b/amd/amdgpu/amdgpu_drv.c
 @@ -79,7 +79,7 @@ int amdgpu_vm_block_size = -1;
@@ -21,5 +21,5 @@ index 793528b..9a4dfcc 100644
  int amdgpu_sched_hw_submission = 2;
  int amdgpu_powerplay = -1;
 -- 
-2.9.3
+2.10.1
 
diff --git a/pkgs/os-specific/linux/kernel/linux-grsecurity.nix b/pkgs/os-specific/linux/kernel/linux-grsecurity.nix
index eda2dd26163e..a1f5230ac002 100644
--- a/pkgs/os-specific/linux/kernel/linux-grsecurity.nix
+++ b/pkgs/os-specific/linux/kernel/linux-grsecurity.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, perl, buildLinux, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "4.7.10";
-  extraMeta.branch = "4.7";
+  version = "4.8.7";
+  extraMeta.branch = "4.8";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1p2r5d0jcrak9gxp0339g9z198x9laf09h08ck4jllhhaajrnicj";
+    sha256 = "03qgqqy1kxdqpb844g2yfyq45xy77110hrz8ddqy0rlkia8kzx8m";
   };
 
   kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 6bba248374ba..3d4ba5d2b58d 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -86,9 +86,9 @@ rec {
   };
 
   grsecurity_testing = grsecPatch
-    { kver   = "4.7.10";
-      grrev  = "201611011946";
-      sha256 = "0nva1007r4shlcxzflbxvd88yzvb98si2kjlgnhdqphyz1c0qhql";
+    { kver   = "4.8.7";
+      grrev  = "201611102210";
+      sha256 = "1n7avhvzy4njf9wky38l99i18v1rr05bgspivnp440j8d6nh60nh";
     };
 
   # This patch relaxes grsec constraints on the location of usermode helpers,
diff --git a/pkgs/servers/monitoring/telegraf/default.nix b/pkgs/servers/monitoring/telegraf/default.nix
index 40f580ffddf5..51d242d9ee3c 100644
--- a/pkgs/servers/monitoring/telegraf/default.nix
+++ b/pkgs/servers/monitoring/telegraf/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "telegraf-${version}";
-  version = "1.0.1";
+  version = "1.1.1";
 
   goPackagePath = "github.com/influxdata/telegraf";
 
@@ -12,7 +12,7 @@ buildGoPackage rec {
     owner = "influxdata";
     repo = "telegraf";
     rev = "${version}";
-    sha256 = "1qn90rybdb2ybdyfk2f2yqpsgrya95bgiglmxnf2x1fapjpm7434";
+    sha256 = "02sldgbsxifd7s3awjj0a4wf7rrcz2xin02b6ygyqxyhj1kqj8i6";
   };
 
   goDeps = ./. + builtins.toPath "/deps-${version}.nix";
diff --git a/pkgs/servers/monitoring/telegraf/deps-1.0.1.nix b/pkgs/servers/monitoring/telegraf/deps-1.1.1.nix
index 29652a200f1e..c7c2468f9a11 100644
--- a/pkgs/servers/monitoring/telegraf/deps-1.0.1.nix
+++ b/pkgs/servers/monitoring/telegraf/deps-1.1.1.nix
@@ -23,8 +23,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/aerospike/aerospike-client-go";
-      rev = "45863b7fd8640dc12f7fdd397104d97e1986f25a";
-      sha256 = "0cnsq8waah9m8m6y6cjz2sppac38aq8gsykw6d8zps0w4rjgf1aw";
+      rev = "7f3a312c3b2a60ac083ec6da296091c52c795c63";
+      sha256 = "05ancqplckvni9xp6xd4bv2pgkfa4v23svfcg27m8xinzi4ry219";
     };
   }
   {
@@ -194,8 +194,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/golang/snappy";
-      rev = "427fb6fc07997f43afa32f35e850833760e489a7";
-      sha256 = "1hgk9zhkfdvxrz13k0glqwlz414803zkrzd01mv6fjhpsjmcx53b";
+      rev = "d9eb7a3d35ec988b8585d4a0068e462c27d28380";
+      sha256 = "0wynarlr1y8sm9y9l29pm9dgflxriiialpwn01066snzjxnpmbyn";
     };
   }
   {
@@ -266,17 +266,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/influxdata/influxdb";
-      rev = "e094138084855d444195b252314dfee9eae34cab";
-      sha256 = "0vv243lqwl4rwgg1zaxlw42zfjjad4vcafaiisvvkyamnndzlkla";
-    };
-  }
-  {
-    goPackagePath = "github.com/influxdata/telegraf";
-    fetch = {
-      type = "git";
-      url = "https://github.com/influxdata/telegraf";
-      rev = "215f1b57d06845708e0867b11b9c853a56b00d81";
-      sha256 = "1qn90rybdb2ybdyfk2f2yqpsgrya95bgiglmxnf2x1fapjpm7434";
+      rev = "fc57c0f7c635df3873f3d64f0ed2100ddc94d5ae";
+      sha256 = "07cv1gryp4a84a2acgc8k8alr7jw4jwphf12cby8jjy1br35jrbq";
     };
   }
   {
@@ -289,12 +280,12 @@
     };
   }
   {
-    goPackagePath = "github.com/jmespath/go-jmespath";
+    goPackagePath = "github.com/influxdata/wlog";
     fetch = {
       type = "git";
-      url = "https://github.com/jmespath/go-jmespath";
-      rev = "bd40a432e4c76585ef6b72d3fd96fb9b6dc7b68d";
-      sha256 = "1kgzwiyqn24ba9kgpjxlq1h746gnyby0psbjj9mp2yx0h1i0kc4z";
+      url = "https://github.com/influxdata/wlog";
+      rev = "7c63b0a71ef8300adc255344d275e10e5c3a71ec";
+      sha256 = "04kw4kivxvr3kkmghj3427b1xyhzbhnfr971qfn3lv2vvhs8kpfl";
     };
   }
   {
@@ -374,8 +365,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/nats-io/nats";
-      rev = "b13fc9d12b0b123ebc374e6b808c6228ae4234a3";
-      sha256 = "08cj053v0v7i9k7pn7c54hn3pm1c8g53gjhiv969hf4mk2h75q1i";
+      rev = "ea8b4fd12ebb823073c0004b9f09ac8748f4f165";
+      sha256 = "0i5f6n9k0d2vzdy20sqygmss5j45y72irxsi80grjsh7qkxa6vn1";
     };
   }
   {
@@ -383,8 +374,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/nats-io/nuid";
-      rev = "4f84f5f3b2786224e336af2e13dba0a0a80b76fa";
-      sha256 = "18ckzxmlg6ihjqd3r6ds8blgga58zibk52xp3lz5c7kv0hf6xa8y";
+      rev = "a5152d67cf63cbfb5d992a395458722a45194715";
+      sha256 = "0fphar5bz735wwa7549j31nxnm5a9dyw472gs9zafz0cv7g8np40";
     };
   }
   {
@@ -406,15 +397,6 @@
     };
   }
   {
-    goPackagePath = "github.com/pmezard/go-difflib";
-    fetch = {
-      type = "git";
-      url = "https://github.com/pmezard/go-difflib";
-      rev = "792786c7400a136282c1664665ae0a8db921c6c2";
-      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
-    };
-  }
-  {
     goPackagePath = "github.com/prometheus/client_golang";
     fetch = {
       type = "git";
@@ -464,8 +446,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/shirou/gopsutil";
-      rev = "4d0c402af66c78735c5ccf820dc2ca7de5e4ff08";
-      sha256 = "1wkp7chzpz6brq2y0k2mvsf0iaknns279wfsjn5gm6gvih49lqni";
+      rev = "1516eb9ddc5e61ba58874047a98f8b44b5e585e8";
+      sha256 = "1pnl1g2l1y5vmnraq97rbm0nirprqvfzxsp6h4xacn1429jdl5bv";
     };
   }
   {
@@ -473,17 +455,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/soniah/gosnmp";
-      rev = "eb32571c2410868d85849ad67d1e51d01273eb84";
-      sha256 = "0f6r3q2lhnjz506blygml6mfnp22fjy586zwiixrzch0jbwl4yf6";
-    };
-  }
-  {
-    goPackagePath = "github.com/sparrc/aerospike-client-go";
-    fetch = {
-      type = "git";
-      url = "https://github.com/sparrc/aerospike-client-go";
-      rev = "d4bb42d2c2d39dae68e054116f4538af189e05d5";
-      sha256 = "0z2d3k1k6qh60aq81dr9g8y2mb19wwlx5isy0nqg0gzx3jb7v7xz";
+      rev = "3fe3beb30fa9700988893c56a63b1df8e1b68c26";
+      sha256 = "0a0vlxx1plqj9fi863wd8ajbzl705wgma4qk75v949azgn1yx9ib";
     };
   }
   {
@@ -554,8 +527,8 @@
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/crypto";
-      rev = "5dc8cb4b8a8eb076cbb5a06bc3b8682c15bdbbd3";
-      sha256 = "18c1vpqlj10z1id66hglgnv51d9gwphgsdvxgghc6mcm01f1g5xj";
+      rev = "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6";
+      sha256 = "1y2bbghi594m8p4pcm9pwrzql06179xj6zvhaghwcc6y0l48rbgp";
     };
   }
   {
@@ -568,15 +541,6 @@
     };
   }
   {
-    goPackagePath = "golang.org/x/sys";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/sys";
-      rev = "8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9";
-      sha256 = "04va4pqygfzr89fx873k44bmivk7nybqalybi6q96lnn45h2scbr";
-    };
-  }
-  {
     goPackagePath = "golang.org/x/text";
     fetch = {
       type = "git";
diff --git a/pkgs/tools/filesystems/btrfs-progs/default.nix b/pkgs/tools/filesystems/btrfs-progs/default.nix
index 525aa2fec28a..0e7e6fbcdec2 100644
--- a/pkgs/tools/filesystems/btrfs-progs/default.nix
+++ b/pkgs/tools/filesystems/btrfs-progs/default.nix
@@ -2,14 +2,14 @@
 , asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt
 }:
 
-let version = "4.8.2"; in
+let version = "4.8.3"; in
 
 stdenv.mkDerivation rec {
   name = "btrfs-progs-${version}";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz";
-    sha256 = "0pswcfmdnfc586770h74abp67gn2xv8fd46vxlimnmn837sj7h41";
+    sha256 = "1wlflrygnpndppil9g12pk184f75g9qx1lkr0x1gijigglqhr9n1";
   };
 
   buildInputs = [
diff --git a/pkgs/tools/misc/bmon/default.nix b/pkgs/tools/misc/bmon/default.nix
index 1bbabcf5523f..30412016e507 100644
--- a/pkgs/tools/misc/bmon/default.nix
+++ b/pkgs/tools/misc/bmon/default.nix
@@ -3,16 +3,18 @@
 
 stdenv.mkDerivation rec {
   name = "bmon-${version}";
-  version = "3.8";
+  version = "3.9";
 
   src = fetchFromGitHub {
     owner = "tgraf";
     repo = "bmon";
     rev = "v${version}";
-    sha256 = "19jv14r9j9n54bqhidw3z11z3wys1v2cagqpsxn0kjga1gkg87xs";
+    sha256 = "1a4sj8pf02392zghr9wa1dc8x38fj093d4hg1fcakzrdjvrg1p2h";
   };
 
-  buildInputs = [ autoconf automake pkgconfig ncurses confuse libnl ];
+  nativeBuildInputs = [ autoconf automake pkgconfig ];
+
+  buildInputs = [ ncurses confuse libnl ];
 
   preConfigure = "sh ./autogen.sh";
 
diff --git a/pkgs/tools/package-management/dpkg/default.nix b/pkgs/tools/package-management/dpkg/default.nix
index ce7208982555..c1d4cd319b8f 100644
--- a/pkgs/tools/package-management/dpkg/default.nix
+++ b/pkgs/tools/package-management/dpkg/default.nix
@@ -2,20 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "dpkg-${version}";
-  version = "1.18.10";
+  version = "1.18.14";
 
   src = fetchurl {
     url = "mirror://debian/pool/main/d/dpkg/dpkg_${version}.tar.xz";
-    sha256 = "1ibdidmc8nfiigadfpl3xrccrxw6hvmqiqqizy1v265s87d28m82";
+    sha256 = "0njd8pdq1vx70sjlgymi79lijg05fmd8vxnqndzhjjb0a8cf920p";
   };
 
-  postPatch = ''
-    # dpkg tries to force some dependents like debian-devscripts to use
-    # -fstack-protector-strong - not (yet?) a good idea. Disable for now:
-    substituteInPlace scripts/Dpkg/Vendor/Debian.pm \
-      --replace "stackprotectorstrong => 1" "stackprotectorstrong => 0"
-  '';
-
   configureFlags = [
     "--disable-dselect"
     "--with-admindir=/var/lib/dpkg"
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 1cee25320760..b3a881fc9ad2 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -12994,6 +12994,8 @@ in
 
   get_iplayer = callPackage ../applications/misc/get_iplayer {};
 
+  getxbook = callPackage ../applications/misc/getxbook {};
+
   gimp_2_8 = callPackage ../applications/graphics/gimp/2.8.nix {
     inherit (gnome2) libart_lgpl;
     webkit = null;
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 59dfde790ae0..b4537e1222a8 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -18963,10 +18963,10 @@ in {
 
   prompt_toolkit = buildPythonPackage rec {
     name = "prompt_toolkit-${version}";
-    version = "1.0.3";
+    version = "1.0.9";
 
     src = pkgs.fetchurl {
-      sha256 = "18lbmmkyjf509klc3217lq0x863pfzix779zx5kp9lms1iph4pl0";
+      sha256 = "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd";
       url = "mirror://pypi/p/prompt_toolkit/${name}.tar.gz";
     };
     checkPhase = ''
@@ -31258,4 +31258,28 @@ in {
       maintainers = with maintainers; [ mikefaille ];
     };
   };
+
+  stripe = buildPythonPackage rec {
+    name = "${pname}-${version}";
+    pname = "stripe";
+    version = "1.41.1";
+
+    # Tests require network connectivity and there's no easy way to disable
+    # them. ~ C.
+    doCheck = false;
+
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/s/${pname}/${name}.tar.gz";
+      sha256 = "0zvffvq933ia5w5ll6xhx2zgvppgc6zc2mxhc6f0kypw5g2fxvz5";
+    };
+
+    buildInputs = with self; [ unittest2 mock ];
+    propagatedBuildInputs = with self; [ requests ];
+
+    meta = {
+      homepage = "https://github.com/stripe/stripe-python";
+      description = "Stripe Python bindings";
+      license = licenses.mit;
+    };
+  };
 }