about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/audio/cadence/default.nix2
-rw-r--r--pkgs/applications/audio/lollypop/default.nix4
-rw-r--r--pkgs/applications/audio/mopidy/iris.nix4
-rw-r--r--pkgs/applications/audio/picard/default.nix4
-rw-r--r--pkgs/applications/editors/neovim/default.nix3
-rw-r--r--pkgs/applications/graphics/digikam/default.nix5
-rw-r--r--pkgs/applications/graphics/k3d/default.nix4
-rw-r--r--pkgs/applications/misc/calibre/default.nix4
-rw-r--r--pkgs/applications/misc/cherrytree/default.nix4
-rw-r--r--pkgs/applications/misc/cool-retro-term/default.nix4
-rw-r--r--pkgs/applications/misc/gramps/default.nix4
-rw-r--r--pkgs/applications/misc/hyper/default.nix4
-rw-r--r--pkgs/applications/misc/mupdf/default.nix11
-rw-r--r--pkgs/applications/misc/octoprint/plugins.nix22
-rw-r--r--pkgs/applications/misc/polybar/default.nix12
-rw-r--r--pkgs/applications/misc/qlcplus/default.nix4
-rw-r--r--pkgs/applications/misc/rescuetime/default.nix10
-rw-r--r--pkgs/applications/misc/sweethome3d/default.nix13
-rw-r--r--pkgs/applications/networking/browsers/luakit/default.nix5
-rw-r--r--pkgs/applications/networking/browsers/qutebrowser/default.nix7
-rw-r--r--pkgs/applications/networking/dropbox/default.nix2
-rw-r--r--pkgs/applications/networking/feedreaders/newsboat/default.nix29
-rw-r--r--pkgs/applications/networking/instant-messengers/blink/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-hangouts/default.nix14
-rw-r--r--pkgs/applications/networking/instant-messengers/scudcloud/default.nix2
-rw-r--r--pkgs/applications/networking/irc/quassel/default.nix17
-rw-r--r--pkgs/applications/networking/irc/quassel/qt5_11.patch72
-rw-r--r--pkgs/applications/networking/irc/quassel/source.nix9
-rw-r--r--pkgs/applications/networking/mailreaders/claws-mail/default.nix4
-rw-r--r--pkgs/applications/networking/mailreaders/claws-mail/mime.patch29
-rw-r--r--pkgs/applications/networking/p2p/synapse-bt/default.nix8
-rw-r--r--pkgs/applications/networking/sync/desync/default.nix6
-rw-r--r--pkgs/applications/networking/sync/desync/deps.nix233
-rw-r--r--pkgs/applications/science/electronics/verilog/default.nix6
-rw-r--r--pkgs/applications/science/logic/why3/default.nix10
-rw-r--r--pkgs/applications/science/math/gap/default.nix92
-rw-r--r--pkgs/applications/science/math/sage/default.nix15
-rw-r--r--pkgs/applications/science/math/sage/patches/dont-test-guess-gaproot.patch13
-rw-r--r--pkgs/applications/science/math/sage/patches/numpy-1.15.1.patch911
-rw-r--r--pkgs/applications/science/math/sage/sage-env.nix1
-rw-r--r--pkgs/applications/science/math/sage/sage-src.nix30
-rw-r--r--pkgs/applications/science/math/sage/sage-tests.nix12
-rw-r--r--pkgs/applications/science/math/sage/sage.nix1
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-cola/default.nix1
-rw-r--r--pkgs/applications/version-management/git-and-tools/hub/default.nix6
-rw-r--r--pkgs/applications/version-management/peru/default.nix8
-rw-r--r--pkgs/applications/video/openshot-qt/default.nix2
-rw-r--r--pkgs/applications/virtualization/looking-glass-client/default.nix12
-rw-r--r--pkgs/applications/virtualization/virt-manager/qt.nix6
-rw-r--r--pkgs/applications/window-managers/dwm/dwm-status.nix18
50 files changed, 477 insertions, 1224 deletions
diff --git a/pkgs/applications/audio/cadence/default.nix b/pkgs/applications/audio/cadence/default.nix
index f7fa9dbd8615..ef7eeab4b60c 100644
--- a/pkgs/applications/audio/cadence/default.nix
+++ b/pkgs/applications/audio/cadence/default.nix
@@ -25,7 +25,7 @@
     DESTDIR=$(out)
   '';
 
-  propagatedBuildInputs = with python3Packages; [ pyqt5 ];
+  propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit ];
 
   postInstall = ''
     # replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise
diff --git a/pkgs/applications/audio/lollypop/default.nix b/pkgs/applications/audio/lollypop/default.nix
index 29edf818ce70..6a065b0d9afb 100644
--- a/pkgs/applications/audio/lollypop/default.nix
+++ b/pkgs/applications/audio/lollypop/default.nix
@@ -5,7 +5,7 @@
 
 python3.pkgs.buildPythonApplication rec  {
   pname = "lollypop";
-  version = "0.9.906";
+  version = "0.9.908";
 
   format = "other";
   doCheck = false;
@@ -14,7 +14,7 @@ python3.pkgs.buildPythonApplication rec  {
     url = "https://gitlab.gnome.org/World/lollypop";
     rev = "refs/tags/${version}";
     fetchSubmodules = true;
-    sha256 = "1blfq3vdzs3ji3sr1z6dn5c2f8w93zv2k7aa5xpfpfnds4zfd3q6";
+    sha256 = "0sjhp0lw41qdp5jah9shq69ga43rkxi3vijm57x8w147nj87ch7c";
   };
 
   nativeBuildInputs = with python3.pkgs; [
diff --git a/pkgs/applications/audio/mopidy/iris.nix b/pkgs/applications/audio/mopidy/iris.nix
index 26cef8dc5ec7..211e5db43c73 100644
--- a/pkgs/applications/audio/mopidy/iris.nix
+++ b/pkgs/applications/audio/mopidy/iris.nix
@@ -2,11 +2,11 @@
 
 pythonPackages.buildPythonApplication rec {
   pname = "Mopidy-Iris";
-  version = "3.31.3";
+  version = "3.31.7";
 
   src = pythonPackages.fetchPypi {
     inherit pname version;
-    sha256 = "060kvwlch2jgiriafly8y03fp8gpbw9xiwhq8ncdij390a03iz8n";
+    sha256 = "0z3lqjncczlddfwdsfqninh2i8dz0kis8lhqfpdzdxhhmxlgmi20";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/applications/audio/picard/default.nix b/pkgs/applications/audio/picard/default.nix
index 3dae0ca5d7c4..e7c2c2e36347 100644
--- a/pkgs/applications/audio/picard/default.nix
+++ b/pkgs/applications/audio/picard/default.nix
@@ -4,11 +4,11 @@ let
   pythonPackages = python3Packages;
 in pythonPackages.buildPythonApplication rec {
   pname = "picard";
-  version = "2.0.4";
+  version = "2.1";
 
   src = fetchurl {
     url = "http://ftp.musicbrainz.org/pub/musicbrainz/picard/picard-${version}.tar.gz";
-    sha256 = "0ds3ylpqn717fnzcjrfn05v5xram01bj6n3hwn9igmkd1jgf8vhc";
+    sha256 = "054a37q5828q59jzml4npkyczsp891d89kawgsif9kwpi0dxa06c";
   };
 
   buildInputs = [ gettext ];
diff --git a/pkgs/applications/editors/neovim/default.nix b/pkgs/applications/editors/neovim/default.nix
index 6690e4c9c1b9..26fc44cc6b11 100644
--- a/pkgs/applications/editors/neovim/default.nix
+++ b/pkgs/applications/editors/neovim/default.nix
@@ -86,6 +86,9 @@ let
       license = with licenses; [ asl20 vim ];
       maintainers = with maintainers; [ manveru garbas rvolosatovs ];
       platforms   = platforms.unix;
+      # `lua: bad light userdata pointer`
+      # https://nix-cache.s3.amazonaws.com/log/9ahcb52905d9d417zsskjpc331iailpq-neovim-unwrapped-0.2.2.drv
+      broken = stdenv.isAarch64;
     };
   };
 
diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix
index fb99d3e38322..e7621414b06f 100644
--- a/pkgs/applications/graphics/digikam/default.nix
+++ b/pkgs/applications/graphics/digikam/default.nix
@@ -6,7 +6,7 @@
 , qtbase
 , qtxmlpatterns
 , qtsvg
-, qtwebkit
+, qtwebengine
 
 , kcalcore
 , kconfigwidgets
@@ -84,7 +84,7 @@ mkDerivation rec {
     qtbase
     qtxmlpatterns
     qtsvg
-    qtwebkit
+    qtwebengine
 
     kcalcore
     kconfigwidgets
@@ -105,6 +105,7 @@ mkDerivation rec {
     "-DENABLE_MYSQLSUPPORT=1"
     "-DENABLE_INTERNALMYSQL=1"
     "-DENABLE_MEDIAPLAYER=1"
+    "-DENABLE_QWEBENGINE=on"
   ];
 
   preFixup = ''
diff --git a/pkgs/applications/graphics/k3d/default.nix b/pkgs/applications/graphics/k3d/default.nix
index a4b509704a7f..301dc902dce9 100644
--- a/pkgs/applications/graphics/k3d/default.nix
+++ b/pkgs/applications/graphics/k3d/default.nix
@@ -39,6 +39,10 @@ stdenv.mkDerivation rec {
 
   #doCheck = false;
 
+  NIX_CFLAGS_COMPILE = [
+    "-Wno-deprecated-declarations"
+  ];
+
   meta = with stdenv.lib; {
     description = "A 3D editor with support for procedural editing";
     homepage = http://www.k-3d.org/;
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index 6da1cdefa700..7b01f5c53d77 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   ] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
 
   prePatch = ''
-    sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5}/share/sip/PyQt5':"  \
+    sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5_with_qtwebkit}/share/sip/PyQt5':"  \
       setup/build_environment.py
 
     # Remove unneeded files and libs
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
     fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook
   ] ++ (with python2Packages; [
     apsw cssselect cssutils dateutil dnspython html5-parser lxml mechanize netifaces pillow
-    python pyqt5 sip
+    python pyqt5_with_qtwebkit sip
     regex msgpack
     # the following are distributed with calibre, but we use upstream instead
     odfpy
diff --git a/pkgs/applications/misc/cherrytree/default.nix b/pkgs/applications/misc/cherrytree/default.nix
index cf93096c7873..78059191c2c3 100644
--- a/pkgs/applications/misc/cherrytree/default.nix
+++ b/pkgs/applications/misc/cherrytree/default.nix
@@ -4,11 +4,11 @@ with stdenv.lib;
 stdenv.mkDerivation rec {
 
   name = "cherrytree-${version}";
-  version = "0.38.6";
+  version = "0.38.7";
 
   src = fetchurl {
     url = "https://www.giuspen.com/software/${name}.tar.xz";
-    sha256 = "0b83ygv0y4lrclsyagmllkwiia62xkwij14i6z53avba191jvhma";
+    sha256 = "1ls7vz993hj5gd99imlrzahxznfg6fa4n77ikkj79va4csw9b892";
   };
 
   buildInputs = with pythonPackages;
diff --git a/pkgs/applications/misc/cool-retro-term/default.nix b/pkgs/applications/misc/cool-retro-term/default.nix
index 1c2045f4141e..766161e521c2 100644
--- a/pkgs/applications/misc/cool-retro-term/default.nix
+++ b/pkgs/applications/misc/cool-retro-term/default.nix
@@ -2,14 +2,14 @@
 , qtquickcontrols, qtgraphicaleffects, qmake }:
 
 stdenv.mkDerivation rec {
-  version = "1.0.1";
+  version = "1.1.0";
   name = "cool-retro-term-${version}";
 
   src = fetchFromGitHub {
     owner = "Swordfish90";
     repo = "cool-retro-term";
     rev = version;
-    sha256 = "1ah54crqv13xsg9cvlwmgyhz90xjjy3vy8pbn9i0vc0ljmpgkqd5";
+    sha256 = "0gmigjpc19q7l94q4wzbrxh7cdb6zk3zscaijzwsz9364wsgzb47";
   };
 
   patchPhase = ''
diff --git a/pkgs/applications/misc/gramps/default.nix b/pkgs/applications/misc/gramps/default.nix
index 920bec56a9bc..db18ff73412c 100644
--- a/pkgs/applications/misc/gramps/default.nix
+++ b/pkgs/applications/misc/gramps/default.nix
@@ -9,7 +9,7 @@
 let
   inherit (pythonPackages) python buildPythonApplication;
 in buildPythonApplication rec {
-  version = "5.0.0";
+  version = "5.0.1";
   name = "gramps-${version}";
 
   nativeBuildInputs = [ wrapGAppsHook ];
@@ -27,7 +27,7 @@ in buildPythonApplication rec {
     owner = "gramps-project";
     repo = "gramps";
     rev = "v${version}";
-    sha256 = "056l4ihmd3gdsiv6wwv4ckgh8bfzd5nii6z4afsdn2nmjbj4hw9m";
+    sha256 = "1jz1fbjj6byndvir7qxzhd2ryirrd5h2kwndxpp53xdc05z1i8g7";
   };
 
   pythonPath = with pythonPackages; [ bsddb3 PyICU pygobject3 pycairo ];
diff --git a/pkgs/applications/misc/hyper/default.nix b/pkgs/applications/misc/hyper/default.nix
index 5e1626e12c57..2a26d7ecf278 100644
--- a/pkgs/applications/misc/hyper/default.nix
+++ b/pkgs/applications/misc/hyper/default.nix
@@ -11,11 +11,11 @@ let
   ];
 in
 stdenv.mkDerivation rec {
-  version = "2.0.0";
+  version = "2.1.0";
   name = "hyper-${version}";
   src = fetchurl {
     url = "https://github.com/zeit/hyper/releases/download/${version}/hyper_${version}_amd64.deb";
-    sha256 = "04241kjy65pnp5q9z901910rmvcx18x0qaqfl31i0l4c2xj83ws0";
+    sha256 = "0ss0ip6yc7sd8b1lx504nxckqmxjiqcz105wi3226nzyan489q3g";
   };
   buildInputs = [ dpkg ];
   unpackPhase = ''
diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix
index d4f59272c9c9..c91b9f6fb061 100644
--- a/pkgs/applications/misc/mupdf/default.nix
+++ b/pkgs/applications/misc/mupdf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, pkgconfig, freetype, harfbuzz, openjpeg
+{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, freetype, harfbuzz, openjpeg
 , jbig2dec, libjpeg , darwin
 , enableX11 ? true, libX11, libXext, libXi, libXrandr
 , enableCurl ? true, curl, openssl
@@ -24,7 +24,14 @@ in stdenv.mkDerivation rec {
 
   patches =
     # Use shared libraries to decrease size
-       stdenv.lib.optional (!stdenv.isDarwin) ./mupdf-1.14-shared_libs.patch
+    [( fetchpatch
+      {
+          name = "CVE-2018-18662";
+          url = "http://git.ghostscript.com/?p=mupdf.git;a=patch;h=164ddc22ee0d5b63a81d5148f44c37dd132a9356";
+          sha256 = "1jkzh20n3b854871h86cy5y7fvy0d5wyqy51b3fg6gj3a0jqpzzd";
+      }
+    )]
+    ++ stdenv.lib.optional (!stdenv.isDarwin) ./mupdf-1.14-shared_libs.patch
     ++ stdenv.lib.optional stdenv.isDarwin ./darwin.patch
   ;
 
diff --git a/pkgs/applications/misc/octoprint/plugins.nix b/pkgs/applications/misc/octoprint/plugins.nix
index 2e3bc058280a..327a59618c2b 100644
--- a/pkgs/applications/misc/octoprint/plugins.nix
+++ b/pkgs/applications/misc/octoprint/plugins.nix
@@ -2,6 +2,8 @@
 
 let
   buildPlugin = args: python2Packages.buildPythonPackage (args // {
+    pname = "OctoPrintPlugin-${args.pname}";
+    inherit (args) version;
     propagatedBuildInputs = (args.propagatedBuildInputs or []) ++ [ octoprint ];
     # none of the following have tests
     doCheck = false;
@@ -13,7 +15,7 @@ let
     m3d-fio = self.m33-fio; # added 2016-08-13
 
     m33-fio = buildPlugin rec {
-      name = "M33-Fio-${version}";
+      pname = "M33-Fio";
       version = "1.21";
 
       src = fetchFromGitHub {
@@ -36,16 +38,15 @@ let
       '';
 
       meta = with stdenv.lib; {
-        homepage = https://github.com/donovan6000/M33-Fio;
         description = "OctoPrint plugin for the Micro 3D printer";
-        platforms = platforms.all;
+        homepage = https://github.com/donovan6000/M33-Fio;
         license = licenses.gpl3;
         maintainers = with maintainers; [ abbradar ];
       };
     };
 
     mqtt = buildPlugin rec {
-      name = "OctoPrint-MQTT-${version}";
+      pname = "MQTT";
       version = "0.8.0";
 
       src = fetchFromGitHub {
@@ -58,16 +59,15 @@ let
       propagatedBuildInputs = with python2Packages; [ paho-mqtt ];
 
       meta = with stdenv.lib; {
-        homepage = https://github.com/OctoPrint/OctoPrint-MQTT;
         description = "Publish printer status MQTT";
-        platforms = platforms.all;
+        homepage = https://github.com/OctoPrint/OctoPrint-MQTT;
         license = licenses.agpl3;
         maintainers = with maintainers; [ peterhoeg ];
       };
     };
 
     titlestatus = buildPlugin rec {
-      name = "OctoPrint-TitleStatus-${version}";
+      pname = "TitleStatus";
       version = "0.0.4";
 
       src = fetchFromGitHub {
@@ -78,16 +78,15 @@ let
       };
 
       meta = with stdenv.lib; {
-        homepage = https://github.com/MoonshineSG/OctoPrint-TitleStatus;
         description = "Show printers status in window title";
-        platforms = platforms.all;
+        homepage = https://github.com/MoonshineSG/OctoPrint-TitleStatus;
         license = licenses.agpl3;
         maintainers = with maintainers; [ abbradar ];
       };
     };
 
     stlviewer = buildPlugin rec {
-      name = "OctoPrint-STLViewer-${version}";
+      pname = "STLViewer";
       version = "0.4.1";
 
       src = fetchFromGitHub {
@@ -98,9 +97,8 @@ let
       };
 
       meta = with stdenv.lib; {
-        homepage = https://github.com/jneilliii/Octoprint-STLViewer;
         description = "A simple stl viewer tab for OctoPrint";
-        platforms = platforms.all;
+        homepage = https://github.com/jneilliii/Octoprint-STLViewer;
         license = licenses.agpl3;
         maintainers = with maintainers; [ abbradar ];
       };
diff --git a/pkgs/applications/misc/polybar/default.nix b/pkgs/applications/misc/polybar/default.nix
index 0310b1a2f748..9e2beb5b07cf 100644
--- a/pkgs/applications/misc/polybar/default.nix
+++ b/pkgs/applications/misc/polybar/default.nix
@@ -1,4 +1,4 @@
-{ cairo, cmake, fetchgit, libXdmcp, libpthreadstubs, libxcb, pcre, pkgconfig
+{ cairo, cmake, fetchFromGitHub, libXdmcp, libpthreadstubs, libxcb, pcre, pkgconfig
 , python2, stdenv, xcbproto, xcbutil, xcbutilcursor, xcbutilimage
 , xcbutilrenderutil, xcbutilwm, xcbutilxrm, makeWrapper
 
@@ -26,11 +26,13 @@ assert i3GapsSupport -> ! i3Support     && jsoncpp != null && i3-gaps != null;
 
 stdenv.mkDerivation rec {
     name = "polybar-${version}";
-    version = "3.2.1";
-    src = fetchgit {
-      url = "https://github.com/jaagr/polybar";
+    version = "3.3.0";
+    src = fetchFromGitHub {
+      owner = "jaagr";
+      repo = "polybar";
       rev = version;
-      sha256 = "1z45swj2l0h8x8li7prl963cgl6zm3birsswpij8qwcmjaj5l8vz";
+      sha256 = "18hrsbq62na2i4rlwbs2ih7v9shnayg76nw14i6az28wpf8kx4rr";
+      fetchSubmodules = true;
     };
 
     meta = with stdenv.lib; {
diff --git a/pkgs/applications/misc/qlcplus/default.nix b/pkgs/applications/misc/qlcplus/default.nix
index eae3216c964f..878de748dec9 100644
--- a/pkgs/applications/misc/qlcplus/default.nix
+++ b/pkgs/applications/misc/qlcplus/default.nix
@@ -5,13 +5,13 @@
 
 mkDerivation rec {
   name = "qlcplus-${version}";
-  version = "4.11.2";
+  version = "4.12.0";
 
   src = fetchFromGitHub {
     owner = "mcallegari";
     repo = "qlcplus";
     rev = "QLC+_${version}";
-    sha256 = "0ry7j8d5mm3h3mzd49xqlagnldmfhfr6plwk73pz62hxr4j58s6w";
+    sha256 = "056ccgcz3rpbic2hqg4r1rq8svq7070j2h6l3hbb1p8h3qxwamzh";
   };
 
   nativeBuildInputs = [ qmake pkgconfig ];
diff --git a/pkgs/applications/misc/rescuetime/default.nix b/pkgs/applications/misc/rescuetime/default.nix
index d9cd85d5098a..b934788cdbeb 100644
--- a/pkgs/applications/misc/rescuetime/default.nix
+++ b/pkgs/applications/misc/rescuetime/default.nix
@@ -1,19 +1,19 @@
-{ stdenv, lib, fetchurl, dpkg, patchelf, qt4, libXtst, libXext, libX11, makeWrapper, libXScrnSaver }:
+{ stdenv, lib, fetchurl, dpkg, patchelf, qt5, libXtst, libXext, libX11, makeWrapper, libXScrnSaver }:
 
 let
   src =
     if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
       name = "rescuetime-installer.deb";
       url = "https://www.rescuetime.com/installers/rescuetime_current_i386.deb";
-      sha256 = "06q1jwqsrjvlj820dd4vl80jznwafsqshsg0p6si8qx4721blryz";
+      sha256 = "136ci4q0ns0qzikndlkbab947m47zv2nmnn8mda2374ip43kn6ri";
     } else fetchurl {
       name = "rescuetime-installer.deb";
       url = "https://www.rescuetime.com/installers/rescuetime_current_amd64.deb";
-      sha256 = "0b56iglg8g45biddwsdn1hmx9gsz4kxr64civwyy7f69f022ppab";
+      sha256 = "1cw10lr7hrsr9xvq3wv1wkyk7jqsgfnnlkq4km9kxr39f51hv6na";
     };
 in stdenv.mkDerivation {
   # https://www.rescuetime.com/updates/linux_release_notes.html
-  name = "rescuetime-2.10.0.1322";
+  name = "rescuetime-2.14.2.1";
   inherit src;
   buildInputs = [ dpkg makeWrapper ];
   # avoid https://github.com/NixOS/patchelf/issues/99
@@ -29,7 +29,7 @@ in stdenv.mkDerivation {
 
     ${patchelf}/bin/patchelf \
       --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-      --set-rpath "${lib.makeLibraryPath [ qt4 libXtst libXext libX11 libXScrnSaver ]}" \
+      --set-rpath "${lib.makeLibraryPath [ qt5.qtbase libXtst libXext libX11 libXScrnSaver ]}" \
       $out/bin/rescuetime
   '';
   meta = with lib; {
diff --git a/pkgs/applications/misc/sweethome3d/default.nix b/pkgs/applications/misc/sweethome3d/default.nix
index 3c56a6a046fb..825b52cda7f8 100644
--- a/pkgs/applications/misc/sweethome3d/default.nix
+++ b/pkgs/applications/misc/sweethome3d/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, fetchcvs, makeWrapper, makeDesktopItem, jdk, jre, ant
+{ lib, stdenv, fetchurl, fetchsvn, makeWrapper, makeDesktopItem, jdk, jre, ant
 , gtk3, gsettings-desktop-schemas, p7zip, libXxf86vm }:
 
 let
@@ -74,16 +74,15 @@ let
 in rec {
 
   application = mkSweetHome3D rec {
-    version = "5.4";
+    version = "6.0";
     module = "SweetHome3D";
     name = stdenv.lib.toLower module + "-application-" + version;
     description = "Design and visualize your future home";
     license = stdenv.lib.licenses.gpl2Plus;
-    src = fetchcvs {
-      cvsRoot = ":pserver:anonymous@sweethome3d.cvs.sourceforge.net:/cvsroot/sweethome3d";
-      sha256 = "09sk4svmaiw8dabcya3407iq5yjwxbss8pik1rzalrlds2428vyw";
-      module = module;
-      tag = "V_" + d2u version;
+    src = fetchsvn {
+      url = "https://svn.code.sf.net/p/sweethome3d/code/tags/V_" + d2u version + "/SweetHome3D/";
+      sha256 = "1l4kc1c2iwkggmcdb2wksb4vrh97ll804vc51yawhdlq9g567ky9";
+      rev = "6647";
     };
     desktopName = "Sweet Home 3D";
     icons = {
diff --git a/pkgs/applications/networking/browsers/luakit/default.nix b/pkgs/applications/networking/browsers/luakit/default.nix
index 7142ba6140b4..f55d129df21f 100644
--- a/pkgs/applications/networking/browsers/luakit/default.nix
+++ b/pkgs/applications/networking/browsers/luakit/default.nix
@@ -1,6 +1,6 @@
 {stdenv, fetchFromGitHub, pkgconfig, wrapGAppsHook, makeWrapper
 ,help2man, lua5, luafilesystem, luajit, sqlite
-,webkitgtk, gtk3, gst_all_1}:
+,webkitgtk, gtk3, gst_all_1, glib-networking}:
 
 let
   lualibs = [luafilesystem];
@@ -27,7 +27,8 @@ in stdenv.mkDerivation rec {
     gst_all_1.gstreamer gst_all_1.gst-plugins-base
     gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-ugly
     gst_all_1.gst-libav
-                ];
+    glib-networking # TLS support
+  ];
 
   postPatch =
     #Kind of ugly seds here. There must be a better solution.
diff --git a/pkgs/applications/networking/browsers/qutebrowser/default.nix b/pkgs/applications/networking/browsers/qutebrowser/default.nix
index 5e44bb8cbef6..1be4f1c4c524 100644
--- a/pkgs/applications/networking/browsers/qutebrowser/default.nix
+++ b/pkgs/applications/networking/browsers/qutebrowser/default.nix
@@ -4,7 +4,6 @@
 , libxslt, gst_all_1 ? null
 , withPdfReader        ? true
 , withMediaPlayback    ? true
-, withWebEngineDefault ? true
 }:
 
 assert withMediaPlayback -> gst_all_1 != null;
@@ -39,7 +38,7 @@ in python3Packages.buildPythonApplication rec {
   ] ++ lib.optionals withMediaPlayback (with gst_all_1; [
     gst-plugins-base gst-plugins-good
     gst-plugins-bad gst-plugins-ugly gst-libav
-  ]) ++ lib.optional (!withWebEngineDefault) python3Packages.qtwebkit-plugins;
+  ]);
 
   nativeBuildInputs = [
     makeWrapper wrapGAppsHook asciidoc
@@ -90,10 +89,6 @@ in python3Packages.buildPythonApplication rec {
     done
   '';
 
-  postFixup = lib.optionalString (! withWebEngineDefault) ''
-    wrapProgram $out/bin/qutebrowser --add-flags "--backend webkit"
-  '';
-
   meta = with stdenv.lib; {
     homepage    = https://github.com/The-Compiler/qutebrowser;
     description = "Keyboard-focused browser with a minimal GUI";
diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix
index 9862fe7576da..ce3141f0ef3a 100644
--- a/pkgs/applications/networking/dropbox/default.nix
+++ b/pkgs/applications/networking/dropbox/default.nix
@@ -7,7 +7,7 @@ assert lib.elem stdenv.hostPlatform.system platforms;
 # Dropbox client to bootstrap installation.
 # The client is self-updating, so the actual version may be newer.
 let
-  version = "55.4.171";
+  version = "63.4.107";
 
   arch = {
     "x86_64-linux" = "x86_64";
diff --git a/pkgs/applications/networking/feedreaders/newsboat/default.nix b/pkgs/applications/networking/feedreaders/newsboat/default.nix
index e7ea7eea7ba1..7ed0e8e137fd 100644
--- a/pkgs/applications/networking/feedreaders/newsboat/default.nix
+++ b/pkgs/applications/networking/feedreaders/newsboat/default.nix
@@ -1,15 +1,17 @@
-{ stdenv, fetchurl, stfl, sqlite, curl, gettext, pkgconfig, libxml2, json_c, ncurses
-, asciidoc, docbook_xml_dtd_45, libxslt, docbook_xsl, libiconv, makeWrapper }:
+{ stdenv, rustPlatform, fetchurl, stfl, sqlite, curl, gettext, pkgconfig, libxml2, json_c, ncurses
+, asciidoc, docbook_xml_dtd_45, libxslt, docbook_xsl, libiconv, Security, makeWrapper }:
 
-stdenv.mkDerivation rec {
+rustPlatform.buildRustPackage rec {
   name = "newsboat-${version}";
-  version = "2.13";
+  version = "2.14";
 
   src = fetchurl {
     url = "https://newsboat.org/releases/${version}/${name}.tar.xz";
-    sha256 = "0pik1d98ydzqi6055vdbkjg5krwifbk2hy2f5jp5p1wcy2s16dn7";
+    sha256 = "13bdwnwxa66c69lqhb02basff0aa6q1jhl7fgahcxmdy7snbmg37";
   };
 
+  cargoSha256 = "11s50qy1b833r2b5kr1wx9imi9h7s00c0hs36ricgbd0xw7n76hd";
+
   prePatch = ''
     substituteInPlace Makefile --replace "|| true" ""
     # Allow other ncurses versions on Darwin
@@ -18,18 +20,25 @@ stdenv.mkDerivation rec {
   '';
 
   nativeBuildInputs = [ pkgconfig asciidoc docbook_xml_dtd_45 libxslt docbook_xsl ]
-                      ++ stdenv.lib.optional stdenv.isDarwin [ makeWrapper libiconv ];
+    ++ stdenv.lib.optional stdenv.isDarwin [ makeWrapper libiconv ];
+
+  buildInputs = [ stfl sqlite curl gettext libxml2 json_c ncurses ]
+    ++ stdenv.lib.optional stdenv.isDarwin Security;
 
-  buildInputs = [ stfl sqlite curl gettext libxml2 json_c ncurses ];
+  postBuild = ''
+    make
+  '';
 
-  makeFlags = [ "prefix=$(out)" ];
+  NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare";
 
   doCheck = true;
-  checkTarget = "test";
 
-  NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare";
+  checkPhase = ''
+    make test
+  '';
 
   postInstall = ''
+    make prefix="$out" install
     cp -r contrib $out
   '' + stdenv.lib.optionalString stdenv.isDarwin ''
     for prog in $out/bin/*; do
diff --git a/pkgs/applications/networking/instant-messengers/blink/default.nix b/pkgs/applications/networking/instant-messengers/blink/default.nix
index 63dec91dad90..bbdb2ae79f83 100644
--- a/pkgs/applications/networking/instant-messengers/blink/default.nix
+++ b/pkgs/applications/networking/instant-messengers/blink/default.nix
@@ -16,7 +16,7 @@ pythonPackages.buildPythonApplication rec {
     sed -i 's|@out@|'"''${out}"'|g' blink/resources.py
   '';
 
-  propagatedBuildInputs = with pythonPackages; [ pyqt5 cjson sipsimple twisted google_api_python_client ];
+  propagatedBuildInputs = with pythonPackages; [ pyqt5_with_qtwebkit cjson sipsimple twisted google_api_python_client ];
 
   buildInputs = [ pythonPackages.cython zlib libvncserver libvpx ];
 
diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-hangouts/default.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-hangouts/default.nix
index e304c139eea5..61e8c2b58d9d 100644
--- a/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-hangouts/default.nix
+++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-hangouts/default.nix
@@ -2,22 +2,18 @@
 
 stdenv.mkDerivation rec {
   name = "purple-hangouts-hg-${version}";
-  version = "2018-03-28";
+  version = "2018-12-02";
 
   src = fetchhg {
     url = "https://bitbucket.org/EionRobb/purple-hangouts/";
-    rev = "0e137e6bf9e95c5a0bd282f3ad4a5bd00a6968ab";
-    sha256 = "04vjgz6qyd9ilv1c6n08r45vc683vxs1rgfwhh65pag6q4rbzlb9";
+    rev = "cccf2f6";
+    sha256 = "1zd1rlzqvw1zkb0ydyz039n3xa1kv1f20a4l6rkm9a8sp6rpf3pi";
   };
 
   buildInputs = [ pidgin glib json-glib protobuf protobufc ];
 
-  installPhase = ''
-    install -Dm755 -t $out/lib/pidgin/ libhangouts.so
-    for size in 16 22 24 48; do
-      install -TDm644 hangouts$size.png $out/share/pixmaps/pidgin/protocols/$size/hangouts.png
-    done
-  '';
+  PKG_CONFIG_PURPLE_PLUGINDIR = "${placeholder "out"}/lib/purple-2";
+  PKG_CONFIG_PURPLE_DATADIR = "${placeholder "out"}/share";
 
   meta = with stdenv.lib; {
     homepage = https://bitbucket.org/EionRobb/purple-hangouts;
diff --git a/pkgs/applications/networking/instant-messengers/scudcloud/default.nix b/pkgs/applications/networking/instant-messengers/scudcloud/default.nix
index 441bc020868e..54959383f08e 100644
--- a/pkgs/applications/networking/instant-messengers/scudcloud/default.nix
+++ b/pkgs/applications/networking/instant-messengers/scudcloud/default.nix
@@ -9,7 +9,7 @@ in python3Packages.buildPythonPackage {
     sha256 = "e0d1cb72115d0fda17db92d28be51558ad8fe250972683fac3086dbe8d350d22";
   };
 
-  propagatedBuildInputs = with python3Packages; [ pyqt5 dbus-python jsmin ];
+  propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit dbus-python jsmin ];
 
   meta = with stdenv.lib; {
     description = "Non-official desktop client for Slack";
diff --git a/pkgs/applications/networking/irc/quassel/default.nix b/pkgs/applications/networking/irc/quassel/default.nix
index 9de394422279..ce6215908ae2 100644
--- a/pkgs/applications/networking/irc/quassel/default.nix
+++ b/pkgs/applications/networking/irc/quassel/default.nix
@@ -4,7 +4,7 @@
 , tag ? "" # tag added to the package name
 , static ? false # link statically
 
-, stdenv, fetchurl, cmake, makeWrapper, dconf
+, stdenv, fetchFromGitHub, cmake, makeWrapper, dconf
 , qtbase, qtscript
 , phonon, libdbusmenu, qca-qt5
 
@@ -30,12 +30,17 @@ assert !buildClient -> !withKDE; # KDE is used by the client only
 
 let
   edf = flag: feature: [("-D" + feature + (if flag then "=ON" else "=OFF"))];
-  source = import ./source.nix { inherit fetchurl; };
 
 in with stdenv; mkDerivation rec {
-  inherit (source) src version;
-
   name = "quassel${tag}-${version}";
+  version = "0.13.0";
+
+  src = fetchFromGitHub {
+    owner = "quassel";
+    repo = "quassel";
+    rev = version;
+    sha256 = "1jnmc0xky91h81xjjgwg5zylfns0f1pvjy2rv39wlah890k143zr";
+  };
 
   enableParallelBuilding = true;
 
@@ -71,8 +76,6 @@ in with stdenv; mkDerivation rec {
           --prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules"
     '';
 
-  patches = [ ./qt5_11.patch ];
-
   meta = with stdenv.lib; {
     homepage = https://quassel-irc.org/;
     description = "Qt/KDE distributed IRC client suppporting a remote daemon";
@@ -83,7 +86,7 @@ in with stdenv; mkDerivation rec {
       combination of screen and a text-based IRC client such
       as WeeChat, but graphical (based on Qt4/KDE4 or Qt5/KF5).
     '';
-    license = stdenv.lib.licenses.gpl3;
+    license = licenses.gpl3;
     maintainers = with maintainers; [ phreedom ttuegel ];
     repositories.git = https://github.com/quassel/quassel.git;
     inherit (qtbase.meta) platforms;
diff --git a/pkgs/applications/networking/irc/quassel/qt5_11.patch b/pkgs/applications/networking/irc/quassel/qt5_11.patch
deleted file mode 100644
index 45e43d7f96be..000000000000
--- a/pkgs/applications/networking/irc/quassel/qt5_11.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 92f4dca367c3a6f0536a1e0f3fbb44bb6ed4da62 Mon Sep 17 00:00:00 2001
-From: Manuel Nickschas <sputnick@quassel-irc.org>
-Date: Thu, 3 May 2018 23:19:34 +0200
-Subject: [PATCH] cmake: Fix build with Qt 5.11
-
-Qt 5.11 removes the qt5_use_modules function, so add a copy. If
-present, the Qt-provided function will be used instead.
-
-Closes GH-355.
----
- cmake/QuasselMacros.cmake | 38 ++++++++++++++++++++++++++++++++++++++
- 1 file changed, 38 insertions(+)
-
-diff --git a/cmake/QuasselMacros.cmake b/cmake/QuasselMacros.cmake
-index 652c0042..d77ba1cf 100644
---- a/cmake/QuasselMacros.cmake
-+++ b/cmake/QuasselMacros.cmake
-@@ -5,6 +5,9 @@
- # The qt4_use_modules function was taken from CMake's Qt4Macros.cmake:
- # (C) 2005-2009 Kitware, Inc.
- #
-+# The qt5_use_modules function was taken from Qt 5.10.1 (and modified):
-+# (C) 2005-2011 Kitware, Inc.
-+#
- # Redistribution and use is allowed according to the terms of the BSD license.
- # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
- 
-@@ -43,6 +46,41 @@ function(qt4_use_modules _target _link_type)
-     endforeach()
- endfunction()
- 
-+# Qt 5.11 removed the qt5_use_modules function, so we need to provide it until we can switch to a modern CMake version.
-+# If present, the Qt-provided version will be used automatically instead.
-+function(qt5_use_modules _target _link_type)
-+    if (NOT TARGET ${_target})
-+        message(FATAL_ERROR "The first argument to qt5_use_modules must be an existing target.")
-+    endif()
-+    if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE" )
-+        set(_qt5_modules ${ARGN})
-+        set(_qt5_link_type ${_link_type})
-+    else()
-+        set(_qt5_modules ${_link_type} ${ARGN})
-+    endif()
-+
-+    if ("${_qt5_modules}" STREQUAL "")
-+        message(FATAL_ERROR "qt5_use_modules requires at least one Qt module to use.")
-+    endif()
-+    foreach(_module ${_qt5_modules})
-+        if (NOT Qt5${_module}_FOUND)
-+            find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH)
-+            if (NOT Qt5${_module}_FOUND)
-+                message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.")
-+            endif()
-+        endif()
-+        target_link_libraries(${_target} ${_qt5_link_type} ${Qt5${_module}_LIBRARIES})
-+        set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_module}_INCLUDE_DIRS})
-+        set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_module}_COMPILE_DEFINITIONS})
-+        if (Qt5_POSITION_INDEPENDENT_CODE
-+                AND (CMAKE_VERSION VERSION_LESS 2.8.12
-+                    AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
-+                    OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)))
-+            set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
-+        endif()
-+    endforeach()
-+endfunction()
-+
- # Some wrappers for simplifying dual-Qt support
- 
- function(qt_use_modules)
--- 
-2.16.2
-
diff --git a/pkgs/applications/networking/irc/quassel/source.nix b/pkgs/applications/networking/irc/quassel/source.nix
deleted file mode 100644
index 20daba788997..000000000000
--- a/pkgs/applications/networking/irc/quassel/source.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ fetchurl }:
-
-rec {
-  version = "0.12.5";
-  src = fetchurl {
-    url = "https://github.com/quassel/quassel/archive/${version}.tar.gz";
-    sha256 = "04f42x87a4wkj3va3wnmj2jl7ikqqa7d7nmypqpqwalzpzk7kxwv";
-  };
-}
diff --git a/pkgs/applications/networking/mailreaders/claws-mail/default.nix b/pkgs/applications/networking/mailreaders/claws-mail/default.nix
index 47cb83dee766..a783cb2af3f8 100644
--- a/pkgs/applications/networking/mailreaders/claws-mail/default.nix
+++ b/pkgs/applications/networking/mailreaders/claws-mail/default.nix
@@ -31,11 +31,11 @@ with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "claws-mail-${version}";
-  version = "3.17.1";
+  version = "3.17.2";
 
   src = fetchurl {
     url = "http://www.claws-mail.org/download.php?file=releases/claws-mail-${version}.tar.xz";
-    sha256 = "1wknxbwyzm5xjh3cqmddcxmvp1rkp301qga5n5rgfi7vcd0myyvm";
+    sha256 = "1hb17kpvfl8f1y49zan0wvf4awapxg13bqbqwrbhq2n4xp445kr5";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/applications/networking/mailreaders/claws-mail/mime.patch b/pkgs/applications/networking/mailreaders/claws-mail/mime.patch
index 62f5df4b69a7..2ff4269c3329 100644
--- a/pkgs/applications/networking/mailreaders/claws-mail/mime.patch
+++ b/pkgs/applications/networking/mailreaders/claws-mail/mime.patch
@@ -1,15 +1,28 @@
---- a/src/procmime.c	2015-10-01 23:02:16.629908590 -0700
-+++ b/src/procmime.c	2015-10-01 23:02:46.932001337 -0700
-@@ -1196,11 +1196,7 @@
+diff --git a/src/procmime.c b/src/procmime.c
+index bd3239e..06a3b26 100644
+--- a/src/procmime.c
++++ b/src/procmime.c
+@@ -1144,20 +1144,16 @@ GList *procmime_get_mime_type_list(void)
+ 	MimeType *mime_type;
+ 	gboolean fp_is_glob_file = TRUE;
+ 
  	if (mime_type_list) 
  		return mime_type_list;
- 	
+-	
 -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
--	if ((fp = procmime_fopen(DATAROOTDIR "/mime/globs", "rb")) == NULL) 
+-	if ((fp = claws_fopen(DATAROOTDIR "/mime/globs", "rb")) == NULL) 
 -#else
--	if ((fp = procmime_fopen("/usr/share/mime/globs", "rb")) == NULL) 
+-	if ((fp = claws_fopen("/usr/share/mime/globs", "rb")) == NULL) 
 -#endif
-+	if ((fp = procmime_fopen("@MIMEROOTDIR@/mime/globs", "rb")) == NULL) 
++
++	if ((fp = claws_fopen("@MIMEROOTDIR@/mime/globs", "rb")) == NULL)
  	{
  		fp_is_glob_file = FALSE;
- 		if ((fp = procmime_fopen("/etc/mime.types", "rb")) == NULL) {
+ 		if ((fp = claws_fopen("/etc/mime.types", "rb")) == NULL) {
+ 			if ((fp = claws_fopen(SYSCONFDIR "/mime.types", "rb")) 
+ 				== NULL) {
+ 				FILE_OP_ERROR(SYSCONFDIR "/mime.types", 
+ 					"claws_fopen");
+ 				return NULL;
+ 			}
+
diff --git a/pkgs/applications/networking/p2p/synapse-bt/default.nix b/pkgs/applications/networking/p2p/synapse-bt/default.nix
index 2c257a1294ac..8622b374100a 100644
--- a/pkgs/applications/networking/p2p/synapse-bt/default.nix
+++ b/pkgs/applications/networking/p2p/synapse-bt/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   name = "synapse-bt-unstable-${version}";
-  version = "2018-06-04";
+  version = "2018-10-17";
 
   src = fetchFromGitHub {
     owner = "Luminarys";
     repo = "synapse";
-    rev = "ec8f23a14af21426ab0c4f8953dd954f747850ab";
-    sha256 = "0d1rrwnk333zz9g8s40i75xgdkpz6a1j01ajsh32yvzvbi045zkw";
+    rev = "76d5e9a23ad00c25cfd0469b1adb479b9ded113a";
+    sha256 = "1lsfvcsmbsg51v8c2hkpwkx0zg25sdjc3q7x72b5bwwnw9l0iglz";
   };
 
-  cargoSha256 = "1psrmgf6ddzqwx7gf301rx84asfnvxpsvkx2fan453v65819k960";
+  cargoSha256 = "1sc8c0w2dbvcdv16idw02y35x0jx5ff6ddzij09pmqjx55zgsjf7";
 
   buildInputs = [ pkgconfig openssl ] ++ stdenv.lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/applications/networking/sync/desync/default.nix b/pkgs/applications/networking/sync/desync/default.nix
index e8cca04203b1..6dcd451533ae 100644
--- a/pkgs/applications/networking/sync/desync/default.nix
+++ b/pkgs/applications/networking/sync/desync/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "desync-${version}";
-  version = "0.3.0";
+  version = "0.4.0";
   rev = "v${version}";
 
   goPackagePath = "github.com/folbricht/desync";
@@ -11,7 +11,7 @@ buildGoPackage rec {
     inherit rev;
     owner = "folbricht";
     repo = "desync";
-    sha256 = "1h2i6ai7q1mg2ysd3cnas96rb8g0bpp1v3hh7ip9nrfxhlplyyda";
+    sha256 = "17qh0g1paa7212j761q9z246k10a3xrwd8fgiizw3lr9adn50kdk";
   };
 
   goDeps = ./deps.nix;
@@ -21,7 +21,7 @@ buildGoPackage rec {
     longDescription = "An alternate implementation of the casync protocol and storage mechanism with a focus on production-readiness";
     homepage = https://github.com/folbricht/desync;
     license = licenses.bsd3;
-    platforms = platforms.unix; # windows temporarily broken in 0.3.0 release
+    platforms = platforms.unix; # *may* work on Windows, but varies between releases.
     maintainers = [ maintainers.chaduffy ];
   };
 }
diff --git a/pkgs/applications/networking/sync/desync/deps.nix b/pkgs/applications/networking/sync/desync/deps.nix
index 2342fb76f0c9..7f5f3251d162 100644
--- a/pkgs/applications/networking/sync/desync/deps.nix
+++ b/pkgs/applications/networking/sync/desync/deps.nix
@@ -1,129 +1,312 @@
-# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
 [
+
   {
     goPackagePath = "github.com/datadog/zstd";
     fetch = {
       type = "git";
       url = "https://github.com/datadog/zstd";
-      rev = "940731c8fc259059120b0e617a69d54dcd7c3eee";
-      sha256 = "04nmljnk54xm2k4ydhdiidazk3765jk8h4hvcsymkrsggrfyrjfx";
+      rev = "v1.3.4";
+      sha256 = "06wphl43ji23c0cmmm6fd3wszbwq36mdp1jarak2a6hmxl6yf0b8";
     };
   }
+
+  {
+    goPackagePath = "github.com/davecgh/go-spew";
+    fetch = {
+      type = "git";
+      url = "https://github.com/davecgh/go-spew";
+      rev = "v1.1.1";
+      sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y";
+    };
+  }
+
   {
     goPackagePath = "github.com/dchest/siphash";
     fetch = {
       type = "git";
       url = "https://github.com/dchest/siphash";
-      rev = "34f201214d993633bb24f418ba11736ab8b55aa7";
-      sha256 = "08s076y7vmjqnq7jz0762hkm896r6r31v8b31a3gy0n8rfa01k8k";
+      rev = "v1.2.0";
+      sha256 = "01qhv9zd9l6p7pwf1fj022mp9s5496rk4lnm3yvpjsiwp6k4af8c";
     };
   }
+
+  {
+    goPackagePath = "github.com/fatih/color";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fatih/color";
+      rev = "v1.7.0";
+      sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv";
+    };
+  }
+
   {
     goPackagePath = "github.com/folbricht/tempfile";
     fetch = {
       type = "git";
       url = "https://github.com/folbricht/tempfile";
-      rev = "ee190cb5934293f187a9d43ee34de7d5cf9ceb83";
+      rev = "v0.0.1";
       sha256 = "0vz08qvbniqxc24vhmcbq5ncnz97ncp4jbxgcf0hziazxfp114z3";
     };
   }
+
   {
     goPackagePath = "github.com/go-ini/ini";
     fetch = {
       type = "git";
       url = "https://github.com/go-ini/ini";
-      rev = "fa25069db393aecc09b71267d0489b357781c860";
-      sha256 = "0fs1c48hni5gc1fyz65d138jpmqm1sqpb7vw5vhx0j6lmj1nf45z";
+      rev = "v1.38.2";
+      sha256 = "0xbnw1nd22q6k863n5gs0nxld15w0p8qxbhfky85akcb5rk1vwi9";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/gopherjs/gopherjs";
+    fetch = {
+      type = "git";
+      url = "https://github.com/gopherjs/gopherjs";
+      rev = "0210a2f0f73c";
+      sha256 = "1n80xjfc1dkxs8h8mkpw83n89wi5n7hzc3rxhwjs76rkxpq3rc9j";
     };
   }
+
   {
     goPackagePath = "github.com/hanwen/go-fuse";
     fetch = {
       type = "git";
       url = "https://github.com/hanwen/go-fuse";
-      rev = "1d35017e97018335f348413b3aeed67468d80f7b";
+      rev = "1d35017e9701";
       sha256 = "11rggvkd6lc5lcpsfvc9iip4z9cingzpkpshaskv2cirbxdynyi8";
     };
   }
+
+  {
+    goPackagePath = "github.com/inconshreveable/mousetrap";
+    fetch = {
+      type = "git";
+      url = "https://github.com/inconshreveable/mousetrap";
+      rev = "v1.0.0";
+      sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/jtolds/gls";
+    fetch = {
+      type = "git";
+      url = "https://github.com/jtolds/gls";
+      rev = "v4.2.1";
+      sha256 = "1vm37pvn0k4r6d3m620swwgama63laz8hhj3pyisdhxwam4m2g1h";
+    };
+  }
+
   {
     goPackagePath = "github.com/kr/fs";
     fetch = {
       type = "git";
       url = "https://github.com/kr/fs";
-      rev = "1455def202f6e05b95cc7bfc7e8ae67ae5141eba";
+      rev = "v0.1.0";
       sha256 = "11zg176x9hr9q7fsk95r6q0wf214gg4czy02slax4x56n79g6a7q";
     };
   }
+
+  {
+    goPackagePath = "github.com/mattn/go-colorable";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-colorable";
+      rev = "v0.0.9";
+      sha256 = "1nwjmsppsjicr7anq8na6md7b1z84l9ppnlr045hhxjvbkqwalvx";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/mattn/go-isatty";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-isatty";
+      rev = "v0.0.4";
+      sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/mattn/go-runewidth";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-runewidth";
+      rev = "v0.0.3";
+      sha256 = "0lc39b6xrxv7h3v3y1kgz49cgi5qxwlygs715aam6ba35m48yi7g";
+    };
+  }
+
   {
     goPackagePath = "github.com/minio/minio-go";
     fetch = {
       type = "git";
       url = "https://github.com/minio/minio-go";
-      rev = "f01ef22c977052d716c74724874f932a16f047bb";
-      sha256 = "0pn1likcwnzb2j4hi4r1ib3xlp31h2vgwyc7xnm1iv7f8l4gk2hc";
+      rev = "v6.0.6";
+      sha256 = "0bgivqw1n1189lksp85djw1rqcan2axyh4jv9q54iclrjkpbab37";
     };
   }
+
   {
     goPackagePath = "github.com/mitchellh/go-homedir";
     fetch = {
       type = "git";
       url = "https://github.com/mitchellh/go-homedir";
-      rev = "ae18d6b8b3205b561c79e8e5f69bff09736185f4";
+      rev = "v1.0.0";
       sha256 = "0f0z0aa4wivk4z1y503dmnw0k0g0g403dly8i4q263gfshs82sbq";
     };
   }
+
   {
     goPackagePath = "github.com/pkg/errors";
     fetch = {
       type = "git";
       url = "https://github.com/pkg/errors";
-      rev = "c059e472caf75dbe73903f6521a20abac245b17f";
-      sha256 = "07xg8ym776j2w0k8445ii82lx8yz358cp1z96r739y13i1anqdzi";
+      rev = "v0.8.0";
+      sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
     };
   }
+
   {
     goPackagePath = "github.com/pkg/sftp";
     fetch = {
       type = "git";
       url = "https://github.com/pkg/sftp";
-      rev = "08de04f133f27844173471167014e1a753655ac8";
-      sha256 = "090q4xmjbllwl3rpj1hzp0iw3qw1yvp6r3kf5cgw44ai57z96271";
+      rev = "v1.8.2";
+      sha256 = "040flbir6sv213xzs75vkd5fd7bmm3fqxfcnsx8fr77zkn52hm4m";
     };
   }
+
+  {
+    goPackagePath = "github.com/pmezard/go-difflib";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pmezard/go-difflib";
+      rev = "v1.0.0";
+      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/smartystreets/assertions";
+    fetch = {
+      type = "git";
+      url = "https://github.com/smartystreets/assertions";
+      rev = "7c9eb446e3cf";
+      sha256 = "1dix6qgaj6kw38hicy3zs3lvacl1kn0n267b3xw0vvdkqf1v0395";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/smartystreets/goconvey";
+    fetch = {
+      type = "git";
+      url = "https://github.com/smartystreets/goconvey";
+      rev = "ef6db91d284a";
+      sha256 = "16znlpsms8z2qc3airawyhzvrzcp70p9bx375i19bg489hgchxb7";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/spf13/cobra";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cobra";
+      rev = "v0.0.3";
+      sha256 = "1q1nsx05svyv9fv3fy6xv6gs9ffimkyzsfm49flvl3wnvf1ncrkd";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/spf13/pflag";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/pflag";
+      rev = "v1.0.2";
+      sha256 = "005598piihl3l83a71ahj10cpq9pbhjck4xishx1b4dzc02r9xr2";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/stretchr/testify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/testify";
+      rev = "v1.2.2";
+      sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs";
+    };
+  }
+
   {
     goPackagePath = "golang.org/x/crypto";
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/crypto";
-      rev = "0e37d006457bf46f9e6692014ba72ef82c33022c";
-      sha256 = "1fj8rvrhgv5j8pmckzphvm3sqkzhcqp3idkxvgv13qrjdfycsa5r";
+      rev = "0709b304e793";
+      sha256 = "0i05s09y5pavmfh71fgih7syxg58x7a4krgd8am6d3mnahnmab5c";
     };
   }
+
   {
     goPackagePath = "golang.org/x/net";
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/net";
-      rev = "2f5d2388922f370f4355f327fcf4cfe9f5583908";
-      sha256 = "03s92ygxfrd2c1m4697sd6iksgbar6c007w1yf3h6wmd79vr5dxs";
+      rev = "161cd47e91fd";
+      sha256 = "0254ld010iijygbzykib2vags1dc0wlmcmhgh4jl8iny159lhbcv";
+    };
+  }
+
+  {
+    goPackagePath = "golang.org/x/sync";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sync";
+      rev = "1d60e4601c6f";
+      sha256 = "046jlanz2lkxq1r57x9bl6s4cvfqaic6p2xybsj8mq1120jv4rs6";
     };
   }
+
   {
     goPackagePath = "golang.org/x/sys";
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/sys";
-      rev = "d47a0f3392421c5624713c9a19fe781f651f8a50";
-      sha256 = "01dqcv7vnynwhlmb28fn50svjb9kfj04nk7frvf7mh4jd3qnrsnv";
+      rev = "49385e6e1522";
+      sha256 = "0spbldahns09fdxkxflb1x24f8k2awdlnr6k5i7ci4fqd19r1dv4";
     };
   }
+
   {
     goPackagePath = "golang.org/x/text";
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/text";
-      rev = "905a57155faa8230500121607930ebb9dd8e139c";
-      sha256 = "1qlvvb44j9ss3mkb5035i20xsd6sm0n05sqpqbi8gjw64g086zcb";
+      rev = "v0.3.0";
+      sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
+    };
+  }
+
+  {
+    goPackagePath = "gopkg.in/cheggaaa/pb.v1";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/cheggaaa/pb.v1";
+      rev = "v1.0.25";
+      sha256 = "0vxqiw6f3xyv0zy3g4lksf8za0z8i0hvfpw92hqimsy84f79j3dp";
+    };
+  }
+
+  {
+    goPackagePath = "gopkg.in/ini.v1";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/ini.v1";
+      rev = "v1.38.2";
+      sha256 = "0xbnw1nd22q6k863n5gs0nxld15w0p8qxbhfky85akcb5rk1vwi9";
     };
   }
 ]
diff --git a/pkgs/applications/science/electronics/verilog/default.nix b/pkgs/applications/science/electronics/verilog/default.nix
index f31685b68ea6..c4268b54c20b 100644
--- a/pkgs/applications/science/electronics/verilog/default.nix
+++ b/pkgs/applications/science/electronics/verilog/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "iverilog-${version}";
-  version = "2017.08.12";
+  version = "2018.12.15";
 
   src = fetchFromGitHub {
     owner = "steveicarus";
     repo = "iverilog";
-    rev = "ac87138c44cd6089046668c59a328b4d14c16ddc";
-    sha256 = "1npv0533h0h2wxrxkgiaxqiasw2p4kj2vv5bd69w5xld227xcwpg";
+    rev = "7cd078e7ab184069b3b458fe6df7e83962254816";
+    sha256 = "1zc7lsa77dbsxjfz7vdgclmg97r0kw08xss7yfs4vyv5v5gnn98d";
   };
 
   patchPhase = ''
diff --git a/pkgs/applications/science/logic/why3/default.nix b/pkgs/applications/science/logic/why3/default.nix
index 58609e856c3b..c22c15b3a4b9 100644
--- a/pkgs/applications/science/logic/why3/default.nix
+++ b/pkgs/applications/science/logic/why3/default.nix
@@ -2,17 +2,17 @@
 
 stdenv.mkDerivation rec {
   name    = "why3-${version}";
-  version = "1.1.0";
+  version = "1.1.1";
 
   src = fetchurl {
-    url    = https://gforge.inria.fr/frs/download.php/file/37767/why3-1.1.0.tar.gz;
-    sha256 = "199ziq8mv3r24y3dd1n2r8k2gy09p7kdyyhkg9qn1vzfd2fxwzc1";
+    url = https://gforge.inria.fr/frs/download.php/file/37842/why3-1.1.1.tar.gz;
+    sha256 = "065ix1ill009bxg7w27s8wq47vn03vbr63hsaa79arv31d96izny";
   };
 
   buildInputs = (with ocamlPackages; [
       ocaml findlib num lablgtk ocamlgraph zarith menhir ]) ++
-    stdenv.lib.optionals (ocamlPackages.ocaml == coq.ocaml ) [
-      coq coq.camlp5
+    stdenv.lib.optionals (ocamlPackages.ocaml == coq.ocamlPackages.ocaml ) [
+      coq ocamlPackages.camlp5
     ];
 
   installTargets = [ "install" "install-lib" ];
diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix
index 2927701dbd71..f6a9f58b1762 100644
--- a/pkgs/applications/science/math/gap/default.nix
+++ b/pkgs/applications/science/math/gap/default.nix
@@ -1,6 +1,8 @@
 { stdenv
+, lib
 , fetchurl
 , fetchpatch
+, makeWrapper
 , m4
 , gmp
 # don't remove any packages -- results in a ~1.3G size increase
@@ -11,24 +13,17 @@
 stdenv.mkDerivation rec {
   pname = "gap";
   # https://www.gap-system.org/Releases/
-  # newer versions (4.9.0) are available, but still considered beta (https://github.com/gap-system/gap/wiki/GAP-4.9-release-notes)
-  version = "4r8p10";
-  pkgVer = "2018_01_15-13_02";
-  name = "${pname}-${version}";
-
-  src = let
-    # 4r8p10 -> 48
-    majorminor = stdenv.lib.replaceStrings ["r"] [""] (
-      builtins.head (stdenv.lib.splitString "p" version) # 4r8p10 -> 4r8
-    );
-  in
-    fetchurl {
-    url = "https://www.gap-system.org/pub/gap/gap${majorminor}/tar.bz2/gap${version}_${pkgVer}.tar.bz2";
-    sha256 = "0wzfdjnn6sfiaizbk5c7x44rhbfayis4lf57qbqqg84c7dqlwr6f";
+  version = "4.10.0";
+
+  src = fetchurl {
+    url = "https://www.gap-system.org/pub/gap/gap-${lib.versions.major version}.${lib.versions.minor version}/tar.bz2/gap-${version}.tar.bz2";
+    sha256 = "1dmb8v4p7j1nnf7sx8sg54b49yln36bi9acwp7w1d3a1nxj17ird";
   };
 
   # remove all non-essential packages (which take up a lot of space)
-  preConfigure = stdenv.lib.optionalString (!keepAllPackages) ''
+  preConfigure = ''
+    patchShebangs .
+  '' + lib.optionalString (!keepAllPackages) ''
     find pkg -type d -maxdepth 1 -mindepth 1 \
        -not -name 'GAPDoc-*' \
        -not -name 'autpgrp*' \
@@ -37,26 +32,63 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags = [ "--with-gmp=system" ];
-  buildInputs = [ m4 gmp ];
+
+  buildInputs = [
+    m4
+    gmp
+  ];
+
+  nativeBuildInputs = [
+    makeWrapper
+  ];
 
   patches = [
-    #  fix infinite loop in writeandcheck() when writing an error message fails.
+    # bugfix: https://github.com/gap-system/gap/pull/3102
+    (fetchpatch {
+      name = "fix-infinite-loop-in-writeandcheck.patch";
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/0001-a-version-of-the-writeandcheck.patch-from-Sage-that-.patch?id=5e61d7b6a0da3aa53d8176fa1fb9353cc559b098";
+      sha256 = "1zkv8bbiw3jdn54sqqvfkdkfsd7jxzq0bazwsa14g4sh2265d28j";
+    })
+
+    # needed for libgap (sage): https://github.com/gap-system/gap/pull/3043
     (fetchpatch {
-      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/writeandcheck.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
-      sha256 = "1r1511x4kc2i2mbdq1b61rb6p3misvkf1v5qy3z6fmn6vqwziaz1";
+      name = "add-error-messages-helper.patch";
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/0002-kernel-add-helper-function-for-writing-error-message.patch?id=5e61d7b6a0da3aa53d8176fa1fb9353cc559b098";
+      sha256 = "0c4ry5znb6hwwp8ld6k62yw8w6cqldflw3x49bbzizbmipfpidh5";
+    })
+
+    # needed for libgap (sage): https://github.com/gap-system/gap/pull/3096
+    (fetchpatch {
+      name = "gap-enter.patch";
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/0003-Prototype-for-GAP_Enter-Leave-macros-to-bracket-use-.patch?id=5e61d7b6a0da3aa53d8176fa1fb9353cc559b098";
+      sha256 = "12fg8mb8rm6khsz1r4k3k26jrkx4q1rv13hcrfnlhn0m7iikvc3q";
     })
   ];
 
-  doCheck = true;
-  checkTarget = "testinstall";
   # "teststandard" is a superset of testinstall. It takes ~1h instead of ~1min.
   # tests are run twice, once with all packages loaded and once without
   # checkTarget = "teststandard";
 
-  preCheck = ''
+  doInstallCheck = true;
+  installCheckTarget = "testinstall";
+
+  preInstallCheck = ''
     # gap tests check that the home directory exists
     export HOME="$TMP/gap-home"
     mkdir -p "$HOME"
+
+    # make sure gap is in PATH
+    export PATH="$out/bin:$PATH"
+
+    # make sure we don't accidentally use the wrong gap binary
+    rm -r bin
+
+    # like the defaults the Makefile, but use gap from PATH instead of the
+    # one from builddir
+    installCheckFlagsArray+=(
+      "TESTGAP=gap --quitonbreak -b -m 100m -o 1g -q -x 80 -r -A"
+      "TESTGAPauto=gap --quitonbreak -b -m 100m -o 1g -q -x 80 -r"
+    )
   '';
 
   postCheck = ''
@@ -78,14 +110,20 @@ stdenv.mkDerivation rec {
   installPhase = ''
     mkdir -p "$out/bin" "$out/share/gap/"
 
-    cp -r . "$out/share/gap/build-dir"
+    mkdir -p "$out/share/gap"
+    echo "Copying files to target directory"
+    cp -ar . "$out/share/gap/build-dir"
 
-    sed -e "/GAP_DIR=/aGAP_DIR='$out/share/gap/build-dir/'" -i "$out/share/gap/build-dir/bin/gap.sh"
+    makeWrapper "$out/share/gap/build-dir/bin/gap.sh" "$out/bin/gap" \
+      --set GAP_DIR $out/share/gap/build-dir
+  '';
 
-    ln -s "$out/share/gap/build-dir/bin/gap.sh" "$out/bin/gap"
+  preFixup = ''
+    # patchelf won't strip references to the build dir if it still exists
+    rm -rf pkg
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Computational discrete algebra system";
     maintainers = with maintainers;
     [
@@ -96,7 +134,7 @@ stdenv.mkDerivation rec {
     # keeping all packages increases the package size considerably, wchich
     # is why a local build is preferable in that situation. The timeframe
     # is reasonable and that way the binary cache doesn't get overloaded.
-    hydraPlatforms = stdenv.lib.optionals (!keepAllPackages) meta.platforms;
+    hydraPlatforms = lib.optionals (!keepAllPackages) meta.platforms;
     license = licenses.gpl2;
     homepage = http://gap-system.org/;
   };
diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix
index 46e60a2b81e4..dfdf210eec04 100644
--- a/pkgs/applications/science/math/sage/default.nix
+++ b/pkgs/applications/science/math/sage/default.nix
@@ -70,7 +70,7 @@ let
   sage-env = callPackage ./sage-env.nix {
     sagelib = python.pkgs.sagelib;
     inherit env-locations;
-    inherit python rWrapper ecl singular palp flint pynac pythonEnv;
+    inherit python ecl singular palp flint pynac pythonEnv;
     pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
   };
 
@@ -124,19 +124,6 @@ let
     ignoreCollisions = true;
   } // { extraLibs = pythonRuntimeDeps; }; # make the libs accessible
 
-  # needs to be rWrapper, standard "R" doesn't include default packages
-  rWrapper = pkgs.rWrapper.override {
-    # https://trac.sagemath.org/ticket/25674
-    R = pkgs.R.overrideAttrs (attrs: rec {
-      name = "R-3.4.4";
-      doCheck = false;
-      src = fetchurl {
-        url = "http://cran.r-project.org/src/base/R-3/${name}.tar.gz";
-        sha256 = "0dq3jsnwsb5j3fhl0wi3p5ycv8avf8s5j1y4ap3d2mkjmcppvsdk";
-      };
-    });
-  };
-
   arb = pkgs.arb.override { inherit flint; };
 
   singular = pkgs.singular.override { inherit flint; };
diff --git a/pkgs/applications/science/math/sage/patches/dont-test-guess-gaproot.patch b/pkgs/applications/science/math/sage/patches/dont-test-guess-gaproot.patch
new file mode 100644
index 000000000000..32b877428d51
--- /dev/null
+++ b/pkgs/applications/science/math/sage/patches/dont-test-guess-gaproot.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 5ff67107c1..1318df86fd 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -165,7 +165,7 @@ def _guess_gap_root():
+     EXAMPLES::
+ 
+         sage: from sage.libs.gap.util import _guess_gap_root
+-        sage: _guess_gap_root()
++        sage: _guess_gap_root() # not tested (not necessary on nixos)
+         The gap-4.5.5.spkg (or later) seems to be not installed!
+         ...
+     """
diff --git a/pkgs/applications/science/math/sage/patches/numpy-1.15.1.patch b/pkgs/applications/science/math/sage/patches/numpy-1.15.1.patch
deleted file mode 100644
index 9e855ba4ad94..000000000000
--- a/pkgs/applications/science/math/sage/patches/numpy-1.15.1.patch
+++ /dev/null
@@ -1,911 +0,0 @@
-diff --git a/src/doc/en/faq/faq-usage.rst b/src/doc/en/faq/faq-usage.rst
-index 2347a1190d..f5b0fe71a4 100644
---- a/src/doc/en/faq/faq-usage.rst
-+++ b/src/doc/en/faq/faq-usage.rst
-@@ -338,7 +338,7 @@ ints. For example::
-     sage: RealNumber = float; Integer = int
-     sage: from scipy import stats
-     sage: stats.ttest_ind(list([1,2,3,4,5]),list([2,3,4,5,.6]))
--    Ttest_indResult(statistic=0.076752955645333687, pvalue=0.94070490247380478)
-+    Ttest_indResult(statistic=0.0767529..., pvalue=0.940704...)
-     sage: stats.uniform(0,15).ppf([0.5,0.7])
-     array([  7.5,  10.5])
- 
-diff --git a/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst b/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
-index 314811c42b..e5f54ec4c2 100644
---- a/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
-+++ b/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
-@@ -48,11 +48,13 @@ we could do the following.
-     sage: B = numpy.array([1.0]*5)
-     sage: B.shape=(5,1)
-     sage: print(B)
--    [[ 1.]
--     [ 1.]
--     [ 1.]
--     [ 1.]
--     [ 1.]]
-+    [[1.]
-+     [1.]
-+     [1.]
-+     [1.]
-+     [1.]]
-+
-+
-     sage: print(A)
-     [ 2.00e+00  3.00e+00     0         0         0    ]
-     [ 3.00e+00     0      4.00e+00     0      6.00e+00]
-diff --git a/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst b/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
-index 5b89cd75ee..e50b2ea5d4 100644
---- a/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
-+++ b/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
-@@ -84,7 +84,7 @@ well as take slices
-     sage: l[3]
-     3.0
-     sage: l[3:6]
--    array([ 3.,  4.,  5.])
-+    array([3., 4., 5.])
- 
- You can do basic arithmetic operations
- 
-@@ -147,11 +147,11 @@ also do matrix vector multiplication, and matrix addition
-     sage: n = numpy.matrix([[1,2],[3,4]],dtype=float)
-     sage: v = numpy.array([[1],[2]],dtype=float)
-     sage: n*v
--    matrix([[  5.],
--            [ 11.]])
-+    matrix([[ 5.],
-+            [11.]])
-     sage: n+n
--    matrix([[ 2.,  4.],
--            [ 6.,  8.]])
-+    matrix([[2., 4.],
-+            [6., 8.]])
- 
- If ``n`` was created with :meth:`numpy.array`, then to do matrix vector
- multiplication, you would use ``numpy.dot(n,v)``.
-@@ -170,11 +170,11 @@ to manipulate
-             22.,  23.,  24.])
-     sage: n.shape=(5,5)
-     sage: n
--    array([[  0.,   1.,   2.,   3.,   4.],
--           [  5.,   6.,   7.,   8.,   9.],
--           [ 10.,  11.,  12.,  13.,  14.],
--           [ 15.,  16.,  17.,  18.,  19.],
--           [ 20.,  21.,  22.,  23.,  24.]])
-+    array([[ 0.,  1.,  2.,  3.,  4.],
-+           [ 5.,  6.,  7.,  8.,  9.],
-+           [10., 11., 12., 13., 14.],
-+           [15., 16., 17., 18., 19.],
-+           [20., 21., 22., 23., 24.]])
- 
- This changes the one-dimensional array into a `5\times 5` array.
- 
-@@ -187,8 +187,8 @@ NumPy arrays can be sliced as well
-     sage: n=numpy.array(range(25),dtype=float)
-     sage: n.shape=(5,5)
-     sage: n[2:4,1:3]
--    array([[ 11.,  12.],
--           [ 16.,  17.]])
-+    array([[11., 12.],
-+           [16., 17.]])
- 
- It is important to note that the sliced matrices are references to
- the original
-@@ -224,8 +224,8 @@ Some particularly useful commands are
- 
-     sage: x=numpy.arange(0,2,.1,dtype=float)
-     sage: x
--    array([ 0. ,  0.1,  0.2,  0.3,  0.4,  0.5,  0.6,  0.7,  0.8,  0.9,  1. ,
--            1.1,  1.2,  1.3,  1.4,  1.5,  1.6,  1.7,  1.8,  1.9])
-+    array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2,
-+           1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9])
- 
- You can see that :meth:`numpy.arange` creates an array of floats increasing by 0.1
- from 0 to 2. There is a useful command :meth:`numpy.r_` that is best explained by example
-@@ -240,10 +240,11 @@ from 0 to 2. There is a useful command :meth:`numpy.r_` that is best explained b
-     sage: Integer=int
-     sage: n=r_[0.0:5.0]
-     sage: n
--    array([ 0.,  1.,  2.,  3.,  4.])
-+    array([0., 1., 2., 3., 4.])
-     sage: n=r_[0.0:5.0, [0.0]*5]
-     sage: n
--    array([ 0.,  1.,  2.,  3.,  4.,  0.,  0.,  0.,  0.,  0.])
-+    array([0., 1., 2., 3., 4., 0., 0., 0., 0., 0.])
-+
- 
- :meth:`numpy.r_` provides a shorthand for constructing NumPy arrays efficiently.
- Note in the above ``0.0:5.0`` was shorthand for ``0.0, 1.0, 2.0, 3.0, 4.0``.
-@@ -255,7 +256,7 @@ intervals. We can do this as follows
- ::
- 
-     sage: r_[0.0:5.0:11*j]
--    array([ 0. ,  0.5,  1. ,  1.5,  2. ,  2.5,  3. ,  3.5,  4. ,  4.5,  5. ])
-+    array([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. ])
- 
- The notation ``0.0:5.0:11*j`` expands to a list of 11 equally space
- points between 0 and 5 including both endpoints. Note that ``j`` is the
-@@ -287,23 +288,23 @@ an equally spaced grid with `\Delta x = \Delta y = .25` for
-     sage: y=numpy.r_[0.0:1.0:5*j]
-     sage: xx,yy= meshgrid(x,y)
-     sage: xx
--    array([[ 0.  ,  0.25,  0.5 ,  0.75,  1.  ],
--           [ 0.  ,  0.25,  0.5 ,  0.75,  1.  ],
--           [ 0.  ,  0.25,  0.5 ,  0.75,  1.  ],
--           [ 0.  ,  0.25,  0.5 ,  0.75,  1.  ],
--           [ 0.  ,  0.25,  0.5 ,  0.75,  1.  ]])
-+    array([[0.  , 0.25, 0.5 , 0.75, 1.  ],
-+           [0.  , 0.25, 0.5 , 0.75, 1.  ],
-+           [0.  , 0.25, 0.5 , 0.75, 1.  ],
-+           [0.  , 0.25, 0.5 , 0.75, 1.  ],
-+           [0.  , 0.25, 0.5 , 0.75, 1.  ]])
-     sage: yy
--    array([[ 0.  ,  0.  ,  0.  ,  0.  ,  0.  ],
--           [ 0.25,  0.25,  0.25,  0.25,  0.25],
--           [ 0.5 ,  0.5 ,  0.5 ,  0.5 ,  0.5 ],
--           [ 0.75,  0.75,  0.75,  0.75,  0.75],
--           [ 1.  ,  1.  ,  1.  ,  1.  ,  1.  ]])
-+    array([[0.  , 0.  , 0.  , 0.  , 0.  ],
-+           [0.25, 0.25, 0.25, 0.25, 0.25],
-+           [0.5 , 0.5 , 0.5 , 0.5 , 0.5 ],
-+           [0.75, 0.75, 0.75, 0.75, 0.75],
-+           [1.  , 1.  , 1.  , 1.  , 1.  ]])
-     sage: f(xx,yy)
--    array([[ 0.    ,  0.0625,  0.25  ,  0.5625,  1.    ],
--           [ 0.0625,  0.125 ,  0.3125,  0.625 ,  1.0625],
--           [ 0.25  ,  0.3125,  0.5   ,  0.8125,  1.25  ],
--           [ 0.5625,  0.625 ,  0.8125,  1.125 ,  1.5625],
--           [ 1.    ,  1.0625,  1.25  ,  1.5625,  2.    ]])
-+    array([[0.    , 0.0625, 0.25  , 0.5625, 1.    ],
-+           [0.0625, 0.125 , 0.3125, 0.625 , 1.0625],
-+           [0.25  , 0.3125, 0.5   , 0.8125, 1.25  ],
-+           [0.5625, 0.625 , 0.8125, 1.125 , 1.5625],
-+           [1.    , 1.0625, 1.25  , 1.5625, 2.    ]])
- 
- You can see that :meth:`numpy.meshgrid` produces a pair of matrices, here denoted
- `xx` and `yy`, such that `(xx[i,j],yy[i,j])` has coordinates
-@@ -324,7 +325,7 @@ equation `Ax=b` do
-     sage: b=numpy.array(range(1,6))
-     sage: x=linalg.solve(A,b)
-     sage: numpy.dot(A,x)
--    array([ 1.,  2.,  3.,  4., 5.])
-+    array([1., 2., 3., 4., 5.])
- 
- This creates a random 5x5 matrix ``A``, and solves `Ax=b` where
- ``b=[0.0,1.0,2.0,3.0,4.0]``. There are many other routines in the :mod:`numpy.linalg`
-diff --git a/src/sage/calculus/riemann.pyx b/src/sage/calculus/riemann.pyx
-index 60f37f7557..4ac3dedf1d 100644
---- a/src/sage/calculus/riemann.pyx
-+++ b/src/sage/calculus/riemann.pyx
-@@ -1191,30 +1191,30 @@ cpdef complex_to_spiderweb(np.ndarray[COMPLEX_T, ndim = 2] z_values,
-         sage: zval = numpy.array([[0, 1, 1000],[.2+.3j,1,-.3j],[0,0,0]],dtype = numpy.complex128)
-         sage: deriv = numpy.array([[.1]],dtype = numpy.float64)
-         sage: complex_to_spiderweb(zval, deriv,deriv, 4,4,[0,0,0],1,False,0.001)
--        array([[[ 1.,  1.,  1.],
--                [ 1.,  1.,  1.],
--                [ 1.,  1.,  1.]],
-+        array([[[1., 1., 1.],
-+                [1., 1., 1.],
-+                [1., 1., 1.]],
-         <BLANKLINE>
--               [[ 1.,  1.,  1.],
--                [ 0.,  0.,  0.],
--                [ 1.,  1.,  1.]],
-+               [[1., 1., 1.],
-+                [0., 0., 0.],
-+                [1., 1., 1.]],
-         <BLANKLINE>
--               [[ 1.,  1.,  1.],
--                [ 1.,  1.,  1.],
--                [ 1.,  1.,  1.]]])
-+               [[1., 1., 1.],
-+                [1., 1., 1.],
-+                [1., 1., 1.]]])
- 
-         sage: complex_to_spiderweb(zval, deriv,deriv, 4,4,[0,0,0],1,True,0.001)
--        array([[[ 1.        ,  1.        ,  1.        ],
--                [ 1.        ,  0.05558355,  0.05558355],
--                [ 0.17301243,  0.        ,  0.        ]],
-+        array([[[1.        , 1.        , 1.        ],
-+                [1.        , 0.05558355, 0.05558355],
-+                [0.17301243, 0.        , 0.        ]],
-         <BLANKLINE>
--               [[ 1.        ,  0.96804683,  0.48044583],
--                [ 0.        ,  0.        ,  0.        ],
--                [ 0.77351965,  0.5470393 ,  1.        ]],
-+               [[1.        , 0.96804683, 0.48044583],
-+                [0.        , 0.        , 0.        ],
-+                [0.77351965, 0.5470393 , 1.        ]],
-         <BLANKLINE>
--               [[ 1.        ,  1.        ,  1.        ],
--                [ 1.        ,  1.        ,  1.        ],
--                [ 1.        ,  1.        ,  1.        ]]])
-+               [[1.        , 1.        , 1.        ],
-+                [1.        , 1.        , 1.        ],
-+                [1.        , 1.        , 1.        ]]])
-      """
-     cdef Py_ssize_t i, j, imax, jmax
-     cdef FLOAT_T x, y, mag, arg, width, target, precision, dmag, darg
-@@ -1279,14 +1279,14 @@ cpdef complex_to_rgb(np.ndarray[COMPLEX_T, ndim = 2] z_values):
-         sage: from sage.calculus.riemann import complex_to_rgb
-         sage: import numpy
-         sage: complex_to_rgb(numpy.array([[0, 1, 1000]], dtype = numpy.complex128))
--        array([[[ 1.        ,  1.        ,  1.        ],
--                [ 1.        ,  0.05558355,  0.05558355],
--                [ 0.17301243,  0.        ,  0.        ]]])
-+        array([[[1.        , 1.        , 1.        ],
-+                [1.        , 0.05558355, 0.05558355],
-+                [0.17301243, 0.        , 0.        ]]])
- 
-         sage: complex_to_rgb(numpy.array([[0, 1j, 1000j]], dtype = numpy.complex128))
--        array([[[ 1.        ,  1.        ,  1.        ],
--                [ 0.52779177,  1.        ,  0.05558355],
--                [ 0.08650622,  0.17301243,  0.        ]]])
-+        array([[[1.        , 1.        , 1.        ],
-+                [0.52779177, 1.        , 0.05558355],
-+                [0.08650622, 0.17301243, 0.        ]]])
- 
- 
-     TESTS::
-diff --git a/src/sage/combinat/fully_packed_loop.py b/src/sage/combinat/fully_packed_loop.py
-index 0a9bd61267..d2193cc2d6 100644
---- a/src/sage/combinat/fully_packed_loop.py
-+++ b/src/sage/combinat/fully_packed_loop.py
-@@ -72,11 +72,11 @@ def _make_color_list(n, colors=None,  color_map=None, randomize=False):
-         sage: _make_color_list(5, ['blue', 'red'])
-         ['blue', 'red', 'blue', 'red', 'blue']
-         sage: _make_color_list(5, color_map='summer')
--        [(0.0, 0.5, 0.40000000000000002),
--         (0.25098039215686274, 0.62549019607843137, 0.40000000000000002),
--         (0.50196078431372548, 0.75098039215686274, 0.40000000000000002),
--         (0.75294117647058822, 0.87647058823529411, 0.40000000000000002),
--         (1.0, 1.0, 0.40000000000000002)]
-+        [(0.0, 0.5, 0.4),
-+         (0.25098039215686274, 0.6254901960784314, 0.4),
-+         (0.5019607843137255, 0.7509803921568627, 0.4),
-+         (0.7529411764705882, 0.8764705882352941, 0.4),
-+         (1.0, 1.0, 0.4)]
-         sage: _make_color_list(8, ['blue', 'red'], randomize=True)
-         ['blue', 'blue', 'red', 'blue', 'red', 'red', 'red', 'blue']
-     """
-diff --git a/src/sage/finance/time_series.pyx b/src/sage/finance/time_series.pyx
-index 28779365df..3ab0282861 100644
---- a/src/sage/finance/time_series.pyx
-+++ b/src/sage/finance/time_series.pyx
-@@ -111,8 +111,8 @@ cdef class TimeSeries:
- 
-             sage: import numpy
-             sage: v = numpy.array([[1,2], [3,4]], dtype=float); v
--            array([[ 1.,  2.],
--                   [ 3.,  4.]])
-+            array([[1., 2.],
-+                   [3., 4.]])
-             sage: finance.TimeSeries(v)
-             [1.0000, 2.0000, 3.0000, 4.0000]
-             sage: finance.TimeSeries(v[:,0])
-@@ -2100,14 +2100,14 @@ cdef class TimeSeries:
- 
-             sage: w[0] = 20
-             sage: w
--            array([ 20. ,  -3. ,   4.5,  -2. ])
-+            array([20. , -3. ,  4.5, -2. ])
-             sage: v
-             [20.0000, -3.0000, 4.5000, -2.0000]
- 
-         If you want a separate copy do not give the ``copy=False`` option. ::
- 
-             sage: z = v.numpy(); z
--            array([ 20. ,  -3. ,   4.5,  -2. ])
-+            array([20. , -3. ,  4.5, -2. ])
-             sage: z[0] = -10
-             sage: v
-             [20.0000, -3.0000, 4.5000, -2.0000]
-diff --git a/src/sage/functions/hyperbolic.py b/src/sage/functions/hyperbolic.py
-index aff552f450..7a6df931e7 100644
---- a/src/sage/functions/hyperbolic.py
-+++ b/src/sage/functions/hyperbolic.py
-@@ -214,7 +214,7 @@ class Function_coth(GinacFunction):
-             sage: import numpy
-             sage: a = numpy.arange(2, 5)
-             sage: coth(a)
--            array([ 1.03731472,  1.00496982,  1.00067115])
-+            array([1.03731472, 1.00496982, 1.00067115])
-         """
-         return 1.0 / tanh(x)
- 
-@@ -267,7 +267,7 @@ class Function_sech(GinacFunction):
-             sage: import numpy
-             sage: a = numpy.arange(2, 5)
-             sage: sech(a)
--            array([ 0.26580223,  0.09932793,  0.03661899])
-+            array([0.26580223, 0.09932793, 0.03661899])
-         """
-         return 1.0 / cosh(x)
- 
-@@ -318,7 +318,7 @@ class Function_csch(GinacFunction):
-             sage: import numpy
-             sage: a = numpy.arange(2, 5)
-             sage: csch(a)
--            array([ 0.27572056,  0.09982157,  0.03664357])
-+            array([0.27572056, 0.09982157, 0.03664357])
-         """
-         return 1.0 / sinh(x)
- 
-@@ -586,7 +586,7 @@ class Function_arccoth(GinacFunction):
-             sage: import numpy
-             sage: a = numpy.arange(2,5)
-             sage: acoth(a)
--            array([ 0.54930614,  0.34657359,  0.25541281])
-+            array([0.54930614, 0.34657359, 0.25541281])
-         """
-         return arctanh(1.0 / x)
- 
-diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
-index ed6365bef4..99b8b04dad 100644
---- a/src/sage/functions/orthogonal_polys.py
-+++ b/src/sage/functions/orthogonal_polys.py
-@@ -810,12 +810,12 @@ class Func_chebyshev_T(ChebyshevFunction):
-             sage: z2 = numpy.array([[1,2],[1,2]])
-             sage: z3 = numpy.array([1,2,3.])
-             sage: chebyshev_T(1,z)
--            array([ 1.,  2.])
-+            array([1., 2.])
-             sage: chebyshev_T(1,z2)
--            array([[ 1.,  2.],
--                   [ 1.,  2.]])
-+            array([[1., 2.],
-+                   [1., 2.]])
-             sage: chebyshev_T(1,z3)
--            array([ 1.,  2.,  3.])
-+            array([1., 2., 3.])
-             sage: chebyshev_T(z,0.1)
-             array([ 0.1 , -0.98])
-         """
-@@ -1095,12 +1095,12 @@ class Func_chebyshev_U(ChebyshevFunction):
-             sage: z2 = numpy.array([[1,2],[1,2]])
-             sage: z3 = numpy.array([1,2,3.])
-             sage: chebyshev_U(1,z)
--            array([ 2.,  4.])
-+            array([2., 4.])
-             sage: chebyshev_U(1,z2)
--            array([[ 2.,  4.],
--                   [ 2.,  4.]])
-+            array([[2., 4.],
-+                   [2., 4.]])
-             sage: chebyshev_U(1,z3)
--            array([ 2.,  4.,  6.])
-+            array([2., 4., 6.])
-             sage: chebyshev_U(z,0.1)
-             array([ 0.2 , -0.96])
-         """
-diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py
-index 1883daa3e6..9885222817 100644
---- a/src/sage/functions/other.py
-+++ b/src/sage/functions/other.py
-@@ -389,7 +389,7 @@ class Function_ceil(BuiltinFunction):
-             sage: import numpy
-             sage: a = numpy.linspace(0,2,6)
-             sage: ceil(a)
--            array([ 0.,  1.,  1.,  2.,  2.,  2.])
-+            array([0., 1., 1., 2., 2., 2.])
- 
-         Test pickling::
- 
-@@ -553,7 +553,7 @@ class Function_floor(BuiltinFunction):
-             sage: import numpy
-             sage: a = numpy.linspace(0,2,6)
-             sage: floor(a)
--            array([ 0.,  0.,  0.,  1.,  1.,  2.])
-+            array([0., 0., 0., 1., 1., 2.])
-             sage: floor(x)._sympy_()
-             floor(x)
- 
-@@ -869,7 +869,7 @@ def sqrt(x, *args, **kwds):
-             sage: import numpy
-             sage: a = numpy.arange(2,5)
-             sage: sqrt(a)
--            array([ 1.41421356,  1.73205081,  2.        ])
-+            array([1.41421356, 1.73205081, 2.        ])
-         """
-         if isinstance(x, float):
-             return math.sqrt(x)
-diff --git a/src/sage/functions/spike_function.py b/src/sage/functions/spike_function.py
-index 1e021de3fe..56635ca98f 100644
---- a/src/sage/functions/spike_function.py
-+++ b/src/sage/functions/spike_function.py
-@@ -157,7 +157,7 @@ class SpikeFunction:
-             sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S
-             A spike function with spikes at [-3.0, -1.0, 2.0]
-             sage: P = S.plot_fft_abs(8)
--            sage: p = P[0]; p.ydata
-+            sage: p = P[0]; p.ydata  # abs tol 1e-8
-             [5.0, 5.0, 3.367958691924177, 3.367958691924177, 4.123105625617661, 4.123105625617661, 4.759921664218055, 4.759921664218055]
-         """
-         w = self.vector(samples = samples, xmin=xmin, xmax=xmax)
-@@ -176,8 +176,8 @@ class SpikeFunction:
-             sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S
-             A spike function with spikes at [-3.0, -1.0, 2.0]
-             sage: P = S.plot_fft_arg(8)
--            sage: p = P[0]; p.ydata
--            [0.0, 0.0, -0.211524990023434..., -0.211524990023434..., 0.244978663126864..., 0.244978663126864..., -0.149106180027477..., -0.149106180027477...]
-+            sage: p = P[0]; p.ydata  # abs tol 1e-8
-+            [0.0, 0.0, -0.211524990023434, -0.211524990023434, 0.244978663126864, 0.244978663126864, -0.149106180027477, -0.149106180027477]
-         """
-         w = self.vector(samples = samples, xmin=xmin, xmax=xmax)
-         xmin, xmax = self._ranges(xmin, xmax)
-diff --git a/src/sage/functions/trig.py b/src/sage/functions/trig.py
-index 501e7ff6b6..5f760912f0 100644
---- a/src/sage/functions/trig.py
-+++ b/src/sage/functions/trig.py
-@@ -724,7 +724,7 @@ class Function_arccot(GinacFunction):
-             sage: import numpy
-             sage: a = numpy.arange(2, 5)
-             sage: arccot(a)
--            array([ 0.46364761,  0.32175055,  0.24497866])
-+            array([0.46364761, 0.32175055, 0.24497866])
-         """
-         return math.pi/2 - arctan(x)
- 
-@@ -780,7 +780,7 @@ class Function_arccsc(GinacFunction):
-             sage: import numpy
-             sage: a = numpy.arange(2, 5)
-             sage: arccsc(a)
--            array([ 0.52359878,  0.33983691,  0.25268026])
-+            array([0.52359878, 0.33983691, 0.25268026])
-         """
-         return arcsin(1.0/x)
- 
-@@ -838,7 +838,7 @@ class Function_arcsec(GinacFunction):
-             sage: import numpy
-             sage: a = numpy.arange(2, 5)
-             sage: arcsec(a)
--            array([ 1.04719755,  1.23095942,  1.31811607])
-+            array([1.04719755, 1.23095942, 1.31811607])
-         """
-         return arccos(1.0/x)
- 
-@@ -913,13 +913,13 @@ class Function_arctan2(GinacFunction):
-             sage: a = numpy.linspace(1, 3, 3)
-             sage: b = numpy.linspace(3, 6, 3)
-             sage: atan2(a, b)
--            array([ 0.32175055,  0.41822433,  0.46364761])
-+            array([0.32175055, 0.41822433, 0.46364761])
- 
-             sage: atan2(1,a)
--            array([ 0.78539816,  0.46364761,  0.32175055])
-+            array([0.78539816, 0.46364761, 0.32175055])
- 
-             sage: atan2(a, 1)
--            array([ 0.78539816,  1.10714872,  1.24904577])
-+            array([0.78539816, 1.10714872, 1.24904577])
- 
-         TESTS::
- 
-diff --git a/src/sage/matrix/constructor.pyx b/src/sage/matrix/constructor.pyx
-index 12136f1773..491bf22e62 100644
---- a/src/sage/matrix/constructor.pyx
-+++ b/src/sage/matrix/constructor.pyx
-@@ -503,8 +503,8 @@ def matrix(*args, **kwds):
-         [7 8 9]
-         Full MatrixSpace of 3 by 3 dense matrices over Integer Ring
-         sage: n = matrix(QQ, 2, 2, [1, 1/2, 1/3, 1/4]).numpy(); n
--        array([[ 1.        ,  0.5       ],
--               [ 0.33333333,  0.25      ]])
-+        array([[1.        , 0.5       ],
-+               [0.33333333, 0.25      ]])
-         sage: matrix(QQ, n)
-         [  1 1/2]
-         [1/3 1/4]
-diff --git a/src/sage/matrix/matrix_double_dense.pyx b/src/sage/matrix/matrix_double_dense.pyx
-index 66e54a79a4..0498334f4b 100644
---- a/src/sage/matrix/matrix_double_dense.pyx
-+++ b/src/sage/matrix/matrix_double_dense.pyx
-@@ -606,6 +606,9 @@ cdef class Matrix_double_dense(Matrix_dense):
-             [ 3.0 + 9.0*I 4.0 + 16.0*I 5.0 + 25.0*I]
-             [6.0 + 36.0*I 7.0 + 49.0*I 8.0 + 64.0*I]
-             sage: B.condition()
-+            doctest:warning
-+            ...
-+            ComplexWarning: Casting complex values to real discards the imaginary part
-             203.851798...
-             sage: B.condition(p='frob')
-             203.851798...
-@@ -654,9 +657,7 @@ cdef class Matrix_double_dense(Matrix_dense):
-             True
-             sage: B = A.change_ring(CDF)
-             sage: B.condition()
--            Traceback (most recent call last):
--            ...
--            LinAlgError: Singular matrix
-+            +Infinity
- 
-         Improper values of ``p`` are caught.  ::
- 
-@@ -2519,7 +2520,7 @@ cdef class Matrix_double_dense(Matrix_dense):
-             sage: P.is_unitary(algorithm='orthonormal')
-             Traceback (most recent call last):
-             ...
--            ValueError: failed to create intent(cache|hide)|optional array-- must have defined dimensions but got (0,)
-+            error: ((lwork==-1)||(lwork >= MAX(1,2*n))) failed for 3rd keyword lwork: zgees:lwork=0
- 
-         TESTS::
- 
-@@ -3635,8 +3636,8 @@ cdef class Matrix_double_dense(Matrix_dense):
-             [0.0 1.0 2.0]
-             [3.0 4.0 5.0]
-             sage: m.numpy()
--            array([[ 0.,  1.,  2.],
--                   [ 3.,  4.,  5.]])
-+            array([[0., 1., 2.],
-+                   [3., 4., 5.]])
- 
-         Alternatively, numpy automatically calls this function (via
-         the magic :meth:`__array__` method) to convert Sage matrices
-@@ -3647,16 +3648,16 @@ cdef class Matrix_double_dense(Matrix_dense):
-             [0.0 1.0 2.0]
-             [3.0 4.0 5.0]
-             sage: numpy.array(m)
--            array([[ 0.,  1.,  2.],
--                   [ 3.,  4.,  5.]])
-+            array([[0., 1., 2.],
-+                   [3., 4., 5.]])
-             sage: numpy.array(m).dtype
-             dtype('float64')
-             sage: m = matrix(CDF, 2, range(6)); m
-             [0.0 1.0 2.0]
-             [3.0 4.0 5.0]
-             sage: numpy.array(m)
--            array([[ 0.+0.j,  1.+0.j,  2.+0.j],
--                   [ 3.+0.j,  4.+0.j,  5.+0.j]])
-+            array([[0.+0.j, 1.+0.j, 2.+0.j],
-+                   [3.+0.j, 4.+0.j, 5.+0.j]])
-             sage: numpy.array(m).dtype
-             dtype('complex128')
- 
-diff --git a/src/sage/matrix/special.py b/src/sage/matrix/special.py
-index ccbd208810..c3f9a65093 100644
---- a/src/sage/matrix/special.py
-+++ b/src/sage/matrix/special.py
-@@ -706,7 +706,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
- 
-         sage: import numpy
-         sage: entries = numpy.array([1.2, 5.6]); entries
--        array([ 1.2,  5.6])
-+        array([1.2, 5.6])
-         sage: A = diagonal_matrix(3, entries); A
-         [1.2 0.0 0.0]
-         [0.0 5.6 0.0]
-@@ -716,7 +716,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
- 
-         sage: j = numpy.complex(0,1)
-         sage: entries = numpy.array([2.0+j, 8.1, 3.4+2.6*j]); entries
--        array([ 2.0+1.j ,  8.1+0.j ,  3.4+2.6j])
-+        array([2. +1.j , 8.1+0.j , 3.4+2.6j])
-         sage: A = diagonal_matrix(entries); A
-         [2.0 + 1.0*I         0.0         0.0]
-         [        0.0         8.1         0.0]
-diff --git a/src/sage/modules/free_module_element.pyx b/src/sage/modules/free_module_element.pyx
-index 37d92c1282..955d083b34 100644
---- a/src/sage/modules/free_module_element.pyx
-+++ b/src/sage/modules/free_module_element.pyx
-@@ -988,7 +988,7 @@ cdef class FreeModuleElement(Vector):   # abstract base class
-             sage: v.numpy()
-             array([1, 2, 5/6], dtype=object)
-             sage: v.numpy(dtype=float)
--            array([ 1.        ,  2.        ,  0.83333333])
-+            array([1.        , 2.        , 0.83333333])
-             sage: v.numpy(dtype=int)
-             array([1, 2, 0])
-             sage: import numpy
-@@ -999,7 +999,7 @@ cdef class FreeModuleElement(Vector):   # abstract base class
-         be more efficient but may have unintended consequences::
- 
-             sage: v.numpy(dtype=None)
--            array([ 1.        ,  2.        ,  0.83333333])
-+            array([1.        , 2.        , 0.83333333])
- 
-             sage: w = vector(ZZ, [0, 1, 2^63 -1]); w
-             (0, 1, 9223372036854775807)
-diff --git a/src/sage/modules/vector_double_dense.pyx b/src/sage/modules/vector_double_dense.pyx
-index 39fc2970de..2badf98284 100644
---- a/src/sage/modules/vector_double_dense.pyx
-+++ b/src/sage/modules/vector_double_dense.pyx
-@@ -807,13 +807,13 @@ cdef class Vector_double_dense(FreeModuleElement):
- 
-             sage: v = vector(CDF,4,range(4))
-             sage: v.numpy()
--            array([ 0.+0.j,  1.+0.j,  2.+0.j,  3.+0.j])
-+            array([0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])
-             sage: v = vector(CDF,0)
-             sage: v.numpy()
-             array([], dtype=complex128)
-             sage: v = vector(RDF,4,range(4))
-             sage: v.numpy()
--            array([ 0.,  1.,  2.,  3.])
-+            array([0., 1., 2., 3.])
-             sage: v = vector(RDF,0)
-             sage: v.numpy()
-             array([], dtype=float64)
-@@ -823,11 +823,11 @@ cdef class Vector_double_dense(FreeModuleElement):
-             sage: import numpy
-             sage: v = vector(CDF, 3, range(3))
-             sage: v.numpy()
--            array([ 0.+0.j,  1.+0.j,  2.+0.j])
-+            array([0.+0.j, 1.+0.j, 2.+0.j])
-             sage: v.numpy(dtype=numpy.float64)
--            array([ 0.,  1.,  2.])
-+            array([0., 1., 2.])
-             sage: v.numpy(dtype=numpy.float32)
--            array([ 0.,  1.,  2.], dtype=float32)
-+            array([0., 1., 2.], dtype=float32)
-         """
-         if dtype is None or dtype is self._vector_numpy.dtype:
-             from copy import copy
-diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx
-index ad9693da62..758fb709b7 100644
---- a/src/sage/plot/complex_plot.pyx
-+++ b/src/sage/plot/complex_plot.pyx
-@@ -61,9 +61,9 @@ cdef inline double mag_to_lightness(double r):
- 
-         sage: from sage.plot.complex_plot import complex_to_rgb
-         sage: complex_to_rgb([[0, 1, 10]])
--        array([[[ 0.        ,  0.        ,  0.        ],
--                [ 0.77172568,  0.        ,  0.        ],
--                [ 1.        ,  0.22134776,  0.22134776]]])
-+        array([[[0.        , 0.        , 0.        ],
-+                [0.77172568, 0.        , 0.        ],
-+                [1.        , 0.22134776, 0.22134776]]])
-     """
-     return atan(log(sqrt(r)+1)) * (4/PI) - 1
- 
-@@ -82,13 +82,13 @@ def complex_to_rgb(z_values):
- 
-         sage: from sage.plot.complex_plot import complex_to_rgb
-         sage: complex_to_rgb([[0, 1, 1000]])
--        array([[[ 0.        ,  0.        ,  0.        ],
--                [ 0.77172568,  0.        ,  0.        ],
--                [ 1.        ,  0.64421177,  0.64421177]]])
-+        array([[[0.        , 0.        , 0.        ],
-+                [0.77172568, 0.        , 0.        ],
-+                [1.        , 0.64421177, 0.64421177]]])
-         sage: complex_to_rgb([[0, 1j, 1000j]])
--        array([[[ 0.        ,  0.        ,  0.        ],
--                [ 0.38586284,  0.77172568,  0.        ],
--                [ 0.82210588,  1.        ,  0.64421177]]])
-+        array([[[0.        , 0.        , 0.        ],
-+                [0.38586284, 0.77172568, 0.        ],
-+                [0.82210588, 1.        , 0.64421177]]])
-     """
-     import numpy
-     cdef unsigned int i, j, imax, jmax
-diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py
-index 5d28473731..fc4b2046c0 100644
---- a/src/sage/plot/histogram.py
-+++ b/src/sage/plot/histogram.py
-@@ -53,10 +53,17 @@ class Histogram(GraphicPrimitive):
-         """
-         import numpy as np
-         self.datalist=np.asarray(datalist,dtype=float)
-+        if 'normed' in options:
-+            from sage.misc.superseded import deprecation
-+            deprecation(25260, "the 'normed' option is deprecated. Use 'density' instead.")
-         if 'linestyle' in options:
-             from sage.plot.misc import get_matplotlib_linestyle
-             options['linestyle'] = get_matplotlib_linestyle(
-                     options['linestyle'], return_type='long')
-+        if options.get('range', None):
-+            # numpy.histogram performs type checks on "range" so this must be
-+            # actual floats
-+            options['range'] = [float(x) for x in options['range']]
-         GraphicPrimitive.__init__(self, options)
- 
-     def get_minmax_data(self):
-@@ -80,10 +87,14 @@ class Histogram(GraphicPrimitive):
-             {'xmax': 4.0, 'xmin': 0, 'ymax': 2, 'ymin': 0}
- 
-         TESTS::
--
-             sage: h = histogram([10,3,5], normed=True)[0]
--            sage: h.get_minmax_data()  # rel tol 1e-15
--            {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.4761904761904765, 'ymin': 0}
-+            doctest:warning...:
-+            DeprecationWarning: the 'normed' option is deprecated. Use 'density' instead.
-+            See https://trac.sagemath.org/25260 for details.
-+            sage: h.get_minmax_data()
-+            doctest:warning ...:
-+            VisibleDeprecationWarning: Passing `normed=True` on non-uniform bins has always been broken, and computes neither the probability density function nor the probability mass function. The result is only correct if the bins are uniform, when density=True will produce the same result anyway. The argument will be removed in a future version of numpy.
-+            {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.476190476190..., 'ymin': 0}
-         """
-         import numpy
- 
-@@ -152,7 +163,7 @@ class Histogram(GraphicPrimitive):
-                 'rwidth': 'The relative width of the bars as a fraction of the bin width',
-                 'cumulative': '(True or False) If True, then a histogram is computed in which each bin gives the counts in that bin plus all bins for smaller values.  Negative values give a reversed direction of accumulation.',
-                 'range': 'A list [min, max] which define the range of the histogram. Values outside of this range are treated as outliers and omitted from counts.',
--                'normed': 'Deprecated alias for density',
-+                'normed': 'Deprecated. Use density instead.',
-                 'density': '(True or False) If True, the counts are normalized to form a probability density. (n/(len(x)*dbin)',
-                 'weights': 'A sequence of weights the same length as the data list. If supplied, then each value contributes its associated weight to the bin count.',
-                 'stacked': '(True or False) If True, multiple data are stacked on top of each other.',
-@@ -199,7 +210,7 @@ class Histogram(GraphicPrimitive):
-             subplot.hist(self.datalist.transpose(), **options)
- 
- 
--@options(aspect_ratio='automatic',align='mid', weights=None, range=None, bins=10, edgecolor='black')
-+@options(aspect_ratio='automatic', align='mid', weights=None, range=None, bins=10, edgecolor='black')
- def histogram(datalist, **options):
-     """
-     Computes and draws the histogram for list(s) of numerical data.
-@@ -231,8 +242,9 @@ def histogram(datalist, **options):
-     - ``linewidth`` -- (float) width of the lines defining the bars
-     - ``linestyle`` -- (default: 'solid') Style of the line. One of 'solid'
-       or '-', 'dashed' or '--', 'dotted' or ':', 'dashdot' or '-.'
--    - ``density`` -- (boolean - default: False) If True, the counts are
--      normalized to form a probability density.
-+    - ``density`` -- (boolean - default: False) If True, the result is the
-+      value of the probability density function at the bin, normalized such
-+      that the integral over the range is 1.
-     - ``range`` -- A list [min, max] which define the range of the
-       histogram. Values outside of this range are treated as outliers and
-       omitted from counts
-diff --git a/src/sage/plot/line.py b/src/sage/plot/line.py
-index 23f5e61446..3b1b51d7cf 100644
---- a/src/sage/plot/line.py
-+++ b/src/sage/plot/line.py
-@@ -502,14 +502,12 @@ def line2d(points, **options):
-     from sage.plot.all import Graphics
-     from sage.plot.plot import xydata_from_point_list
-     from sage.rings.all import CC, CDF
-+    points = list(points) # make sure points is a python list
-     if points in CC or points in CDF:
-         pass
-     else:
--        try:
--            if not points:
--                return Graphics()
--        except ValueError: # numpy raises a ValueError if not empty
--            pass
-+        if len(points) == 0:
-+            return Graphics()
-     xdata, ydata = xydata_from_point_list(points)
-     g = Graphics()
-     g._set_extra_kwds(Graphics._extract_kwds_for_show(options))
-diff --git a/src/sage/plot/plot_field.py b/src/sage/plot/plot_field.py
-index 0025098a8d..23c80902f3 100644
---- a/src/sage/plot/plot_field.py
-+++ b/src/sage/plot/plot_field.py
-@@ -49,9 +49,10 @@ class PlotField(GraphicPrimitive):
-             sage: r.xpos_array
-             [0.0, 0.0, 1.0, 1.0]
-             sage: r.yvec_array
--            masked_array(data = [0.0 0.70710678118... 0.70710678118... 0.89442719...],
--                         mask = [False False False False],
--                   fill_value = 1e+20)
-+            masked_array(data=[0.0, 0.70710678118..., 0.70710678118...,
-+                               0.89442719...],
-+                         mask=[False, False, False, False],
-+                   fill_value=1e+20)
- 
-         TESTS:
- 
-diff --git a/src/sage/plot/streamline_plot.py b/src/sage/plot/streamline_plot.py
-index f3da57c370..3806f4b32f 100644
---- a/src/sage/plot/streamline_plot.py
-+++ b/src/sage/plot/streamline_plot.py
-@@ -38,16 +38,14 @@ class StreamlinePlot(GraphicPrimitive):
-             sage: r.options()['plot_points']
-             2
-             sage: r.xpos_array
--            array([ 0.,  1.])
-+            array([0., 1.])
-             sage: r.yvec_array
--            masked_array(data =
--             [[1.0 1.0]
--             [0.5403023058681398 0.5403023058681398]],
--                         mask =
--             [[False False]
--             [False False]],
--                   fill_value = 1e+20)
--            <BLANKLINE>
-+            masked_array(
-+              data=[[1.0, 1.0],
-+                    [0.5403023058681398, 0.5403023058681398]],
-+              mask=[[False, False],
-+                    [False, False]],
-+              fill_value=1e+20)
- 
-         TESTS:
- 
-diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx
-index 1b119e323f..3290b00695 100644
---- a/src/sage/probability/probability_distribution.pyx
-+++ b/src/sage/probability/probability_distribution.pyx
-@@ -130,7 +130,17 @@ cdef class ProbabilityDistribution:
-              0.0,
-              1.4650000000000003]
-             sage: b
--            [0.0, 0.20000000000000001, 0.40000000000000002, 0.60000000000000009, 0.80000000000000004, 1.0, 1.2000000000000002, 1.4000000000000001, 1.6000000000000001, 1.8, 2.0]
-+            [0.0,
-+             0.2,
-+             0.4,
-+             0.6000000000000001,
-+             0.8,
-+             1.0,
-+             1.2000000000000002,
-+             1.4000000000000001,
-+             1.6,
-+             1.8,
-+             2.0]
-         """
-         import pylab
-         l = [float(self.get_random_element()) for _ in range(num_samples)]
-diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx
-index 12ca1b222b..9bad7dae0c 100644
---- a/src/sage/rings/rational.pyx
-+++ b/src/sage/rings/rational.pyx
-@@ -1041,7 +1041,7 @@ cdef class Rational(sage.structure.element.FieldElement):
-             dtype('O')
- 
-             sage: numpy.array([1, 1/2, 3/4])
--            array([ 1.  ,  0.5 ,  0.75])
-+            array([1.  , 0.5 , 0.75])
-         """
-         if mpz_cmp_ui(mpq_denref(self.value), 1) == 0:
-             if mpz_fits_slong_p(mpq_numref(self.value)):
-diff --git a/src/sage/rings/real_mpfr.pyx b/src/sage/rings/real_mpfr.pyx
-index 9b90c8833e..1ce05b937d 100644
---- a/src/sage/rings/real_mpfr.pyx
-+++ b/src/sage/rings/real_mpfr.pyx
-@@ -1439,7 +1439,7 @@ cdef class RealNumber(sage.structure.element.RingElement):
- 
-             sage: import numpy
-             sage: numpy.arange(10.0)
--            array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9.])
-+            array([0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
-             sage: numpy.array([1.0, 1.1, 1.2]).dtype
-             dtype('float64')
-             sage: numpy.array([1.000000000000000000000000000000000000]).dtype
-diff --git a/src/sage/schemes/elliptic_curves/height.py b/src/sage/schemes/elliptic_curves/height.py
-index de31fe9883..7a33ea6f5b 100644
---- a/src/sage/schemes/elliptic_curves/height.py
-+++ b/src/sage/schemes/elliptic_curves/height.py
-@@ -1627,18 +1627,18 @@ class EllipticCurveCanonicalHeight:
-         even::
- 
-             sage: H.wp_on_grid(v,4)
--            array([[ 25.43920182,   5.28760943,   5.28760943,  25.43920182],
--            [  6.05099485,   1.83757786,   1.83757786,   6.05099485],
--            [  6.05099485,   1.83757786,   1.83757786,   6.05099485],
--            [ 25.43920182,   5.28760943,   5.28760943,  25.43920182]])
-+            array([[25.43920182,  5.28760943,  5.28760943, 25.43920182],
-+                   [ 6.05099485,  1.83757786,  1.83757786,  6.05099485],
-+                   [ 6.05099485,  1.83757786,  1.83757786,  6.05099485],
-+                   [25.43920182,  5.28760943,  5.28760943, 25.43920182]])
- 
-         The array of values on the half-grid::
- 
-             sage: H.wp_on_grid(v,4,True)
--            array([[ 25.43920182,   5.28760943],
--            [  6.05099485,   1.83757786],
--            [  6.05099485,   1.83757786],
--            [ 25.43920182,   5.28760943]])
-+            array([[25.43920182,  5.28760943],
-+                   [ 6.05099485,  1.83757786],
-+                   [ 6.05099485,  1.83757786],
-+                   [25.43920182,  5.28760943]])
-         """
-         tau = self.tau(v)
-         fk, err = self.fk_intervals(v, 15, CDF)
-diff --git a/src/sage/symbolic/ring.pyx b/src/sage/symbolic/ring.pyx
-index 9da38002e8..d61e74bf82 100644
---- a/src/sage/symbolic/ring.pyx
-+++ b/src/sage/symbolic/ring.pyx
-@@ -1136,7 +1136,7 @@ cdef class NumpyToSRMorphism(Morphism):
-         sage: cos(numpy.int('2'))
-         cos(2)
-         sage: numpy.cos(numpy.int('2'))
--        -0.41614683654714241
-+        -0.4161468365471424
-     """
-     cdef _intermediate_ring
- 
diff --git a/pkgs/applications/science/math/sage/sage-env.nix b/pkgs/applications/science/math/sage/sage-env.nix
index c071f8945506..d5e057d53357 100644
--- a/pkgs/applications/science/math/sage/sage-env.nix
+++ b/pkgs/applications/science/math/sage/sage-env.nix
@@ -77,6 +77,7 @@ let
     singular
     giac
     palp
+    # needs to be rWrapper since the default `R` doesn't include R's default libraries
     rWrapper
     gfan
     cddlib
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index 5dc73e26a596..be41c7219cc1 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -9,14 +9,14 @@
 # all get the same sources with the same patches applied.
 
 stdenv.mkDerivation rec {
-  version = "8.4";
+  version = "8.5";
   name = "sage-src-${version}";
 
   src = fetchFromGitHub {
     owner = "sagemath";
     repo = "sage";
     rev = version;
-    sha256 = "0gips1hagiz9m7s21bg5as8hrrm2x5k47h1bsq0pc46iplfwmv2d";
+    sha256 = "08mb9626phsls2phdzqxsnp2df5pn5qr72m0mm4nncby26pwn19c";
   };
 
   # Patches needed because of particularities of nix or the way this is packaged.
@@ -46,6 +46,8 @@ stdenv.mkDerivation rec {
     # tests) are also run. That is necessary to test dochtml individually. See
     # https://trac.sagemath.org/ticket/26110 for an upstream discussion.
     ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
+
+    ./patches/dont-test-guess-gaproot.patch
   ];
 
   # Patches needed because of package updates. We could just pin the versions of
@@ -68,6 +70,7 @@ stdenv.mkDerivation rec {
     );
   in [
     # New glpk version has new warnings, filter those out until upstream sage has found a solution
+    # Should be fixed with glpk > 4.65.
     # https://trac.sagemath.org/ticket/24824
     ./patches/pari-stackwarn.patch # not actually necessary since the pari upgrade, but necessary for the glpk patch to apply
     (fetchpatch {
@@ -76,32 +79,9 @@ stdenv.mkDerivation rec {
       stripLen = 1;
     })
 
-    # https://trac.sagemath.org/ticket/25260
-    ./patches/numpy-1.15.1.patch
-
     # https://trac.sagemath.org/ticket/26315
     ./patches/giac-1.5.0.patch
 
-    # needed for ntl update
-    # https://trac.sagemath.org/ticket/25532
-    (fetchpatch {
-      name = "lcalc-c++11.patch";
-      url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa";
-      sha256 = "0p5wnvbx65i7cp0bjyaqgp4rly8xgnk12pqwaq3dqby0j2bk6ijb";
-    })
-
-    (fetchpatch {
-      name = "cython-0.29.patch";
-      url = "https://git.sagemath.org/sage.git/patch/?h=f77de1d0e7f90ee12761140500cb8cbbb789ab20";
-      sha256 = "14wrpy8jgbnpza1j8a2nx8y2r946y82pll1fv3cn6gpfmm6640l3";
-    })
-    # https://trac.sagemath.org/ticket/26360
-    (fetchpatch {
-      name = "arb-2.15.1.patch";
-      url = "https://git.sagemath.org/sage.git/patch/?id=30cc778d46579bd0c7537ed33e8d7a4f40fd5c31";
-      sha256 = "13vc2q799dh745sm59xjjabllfj0sfjzcacf8k59kwj04x755d30";
-    })
-
     # https://trac.sagemath.org/ticket/26326
     # needs to be split because there is a merge commit in between
     (fetchSageDiff {
diff --git a/pkgs/applications/science/math/sage/sage-tests.nix b/pkgs/applications/science/math/sage/sage-tests.nix
index 1f400db18fcb..12433e12fe90 100644
--- a/pkgs/applications/science/math/sage/sage-tests.nix
+++ b/pkgs/applications/science/math/sage/sage-tests.nix
@@ -3,7 +3,12 @@
 , sage-with-env
 , makeWrapper
 , files ? null # "null" means run all tests
-, longTests ? true # run tests marked as "long time"
+, longTests ? true # run tests marked as "long time" (roughly doubles runtime)
+# Run as many tests as possible in approximately n seconds. This will give each
+# file to test a "time budget" and stop tests if it is exceeded. 300 is the
+# upstream default value.
+# https://trac.sagemath.org/ticket/25270 for details.
+, timeLimit ? null
 }:
 
 # for a quick test of some source files:
@@ -14,6 +19,7 @@ let
   runAllTests = files == null;
   testArgs = if runAllTests then "--all" else testFileList;
   patienceSpecifier = if longTests then "--long" else "";
+  timeSpecifier = if timeLimit == null then "" else "--short ${toString timeLimit}";
   relpathToArg = relpath: lib.escapeShellArg "${src}/${relpath}"; # paths need to be absolute
   testFileList = lib.concatStringsSep " " (map relpathToArg files);
 in
@@ -45,7 +51,7 @@ stdenv.mkDerivation rec {
     export HOME="$TMPDIR/sage-home"
     mkdir -p "$HOME"
 
-    # "--long" tests are in the order of 1h, without "--long" its 1/2h
-    "sage" -t --timeout=0 --nthreads "$NIX_BUILD_CORES" --optional=sage ${patienceSpecifier} ${testArgs}
+    echo "Running sage tests with arguments ${timeSpecifier} ${patienceSpecifier} ${testArgs}"
+    "sage" -t --nthreads "$NIX_BUILD_CORES" --optional=sage ${timeSpecifier} ${patienceSpecifier} ${testArgs}
   '';
 }
diff --git a/pkgs/applications/science/math/sage/sage.nix b/pkgs/applications/science/math/sage/sage.nix
index ac255643a348..541b9cb36dc2 100644
--- a/pkgs/applications/science/math/sage/sage.nix
+++ b/pkgs/applications/science/math/sage/sage.nix
@@ -54,6 +54,7 @@ stdenv.mkDerivation rec {
 
   passthru = {
     tests = sage-tests;
+    quicktest = sage-tests.override { longTests = false; timeLimit = 600; }; # as many tests as possible in ~10m
     doc = sagedoc;
     lib = sage-with-env.env.lib;
     kernelspec = jupyter-kernel-definition;
diff --git a/pkgs/applications/version-management/git-and-tools/git-cola/default.nix b/pkgs/applications/version-management/git-and-tools/git-cola/default.nix
index 4b15d03d2007..039da03efb1f 100644
--- a/pkgs/applications/version-management/git-and-tools/git-cola/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-cola/default.nix
@@ -2,6 +2,7 @@
 
 let
   inherit (pythonPackages) buildPythonApplication pyqt5 sip pyinotify;
+
 in buildPythonApplication rec {
   name = "git-cola-${version}";
   version = "3.2";
diff --git a/pkgs/applications/version-management/git-and-tools/hub/default.nix b/pkgs/applications/version-management/git-and-tools/hub/default.nix
index acb82253406b..c6e62265b95b 100644
--- a/pkgs/applications/version-management/git-and-tools/hub/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/hub/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "hub-${version}";
-  version = "2.6.1";
+  version = "2.7.0";
 
   goPackagePath = "github.com/github/hub";
 
@@ -10,7 +10,7 @@ buildGoPackage rec {
     owner = "github";
     repo = "hub";
     rev = "v${version}";
-    sha256 = "1gq8nmzdsqicjgam3h48l0dad46dn9mx9blr1413rc2cp9qmg7d4";
+    sha256 = "1p90m1xp3jahs5y0lp0qfmfa7wqn7gxyygn7x45a6cbf2zzlb86l";
   };
 
   nativeBuildInputs = [ groff ronn utillinux ];
@@ -26,7 +26,7 @@ buildGoPackage rec {
   postInstall = ''
     cd go/src/${goPackagePath}
     install -D etc/hub.zsh_completion "$bin/share/zsh/site-functions/_hub"
-    install -D etc/hub.bash_completion.sh "$bin/etc/bash_completion.d/hub.bash_completion.sh"
+    install -D etc/hub.bash_completion.sh "$bin/share/bash-completion/completions/hub"
     install -D etc/hub.fish_completion  "$bin/share/fish/vendor_completions.d/hub.fish"
 
     make man-pages
diff --git a/pkgs/applications/version-management/peru/default.nix b/pkgs/applications/version-management/peru/default.nix
index 225dd367609f..8b68dddfceb4 100644
--- a/pkgs/applications/version-management/peru/default.nix
+++ b/pkgs/applications/version-management/peru/default.nix
@@ -1,14 +1,16 @@
 { stdenv, fetchFromGitHub, python3Packages }:
 
 python3Packages.buildPythonApplication rec {
-  name = "peru-${version}";
-  version = "1.1.4";
+  pname = "peru";
+  version = "1.2.0";
+
+  disabled = python3Packages.pythonOlder "3.5";
 
   src = fetchFromGitHub {
     owner = "buildinspace";
     repo = "peru";
     rev = "${version}";
-    sha256 = "0mzmi797f2h2wy36q4ab701ixl5zy4m0pp1wp9abwdfg2y6qhmnk";
+    sha256 = "0p4j51m89glx12cd65lcnbwpvin0v49wkhrx06755skr7v37pm2a";
   };
 
   propagatedBuildInputs = with python3Packages; [ pyyaml docopt ];
diff --git a/pkgs/applications/video/openshot-qt/default.nix b/pkgs/applications/video/openshot-qt/default.nix
index 0905ef5481bb..6f113817058c 100644
--- a/pkgs/applications/video/openshot-qt/default.nix
+++ b/pkgs/applications/video/openshot-qt/default.nix
@@ -17,7 +17,7 @@ python3Packages.buildPythonApplication rec {
 
   buildInputs = [ gtk3 ];
 
-  propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5 requests sip httplib2 pyzmq ];
+  propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5_with_qtwebkit requests sip httplib2 pyzmq ];
 
 
   preConfigure = ''
diff --git a/pkgs/applications/virtualization/looking-glass-client/default.nix b/pkgs/applications/virtualization/looking-glass-client/default.nix
index 36d8e1ca70a5..ca8e4985016b 100644
--- a/pkgs/applications/virtualization/looking-glass-client/default.nix
+++ b/pkgs/applications/virtualization/looking-glass-client/default.nix
@@ -1,24 +1,24 @@
 { stdenv, fetchFromGitHub
-, pkgconfig, SDL2, SDL, SDL2_ttf, openssl, spice-protocol, fontconfig
+, cmake, pkgconfig, SDL2, SDL, SDL2_ttf, openssl, spice-protocol, fontconfig
 , libX11, freefont_ttf, nettle, libconfig
 }:
 
 stdenv.mkDerivation rec {
   name = "looking-glass-client-${version}";
-  version = "a11";
+  version = "a12";
 
   src = fetchFromGitHub {
     owner = "gnif";
     repo = "LookingGlass";
     rev = version;
-    sha256 = "0q4isn86pl5wddf6h8qd62fw3577ns2sd2myzw969sbl796bwcil";
+    sha256 = "0r6bvl9q94039r6ff4f2bg8si95axx9w8bf1h1qr5730d2kv5yxq";
   };
 
   nativeBuildInputs = [ pkgconfig ];
 
   buildInputs = [
     SDL SDL2 SDL2_ttf openssl spice-protocol fontconfig
-    libX11 freefont_ttf nettle libconfig
+    libX11 freefont_ttf nettle libconfig cmake
   ];
 
   enableParallelBuilding = true;
@@ -26,8 +26,8 @@ stdenv.mkDerivation rec {
   sourceRoot = "source/client";
 
   installPhase = ''
-    mkdir -p $out
-    mv bin $out/
+    mkdir -p $out/bin
+    mv looking-glass-client $out/bin
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/virtualization/virt-manager/qt.nix b/pkgs/applications/virtualization/virt-manager/qt.nix
index c8af6a1ccf55..c1dbad94250a 100644
--- a/pkgs/applications/virtualization/virt-manager/qt.nix
+++ b/pkgs/applications/virtualization/virt-manager/qt.nix
@@ -1,17 +1,18 @@
 { mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig
 , qtbase, qtmultimedia, qtsvg, qttools, krdc
 , libvncserver, libvirt, pcre, pixman, qtermwidget, spice-gtk, spice-protocol
+, libselinux, libsepol, utillinux
 }:
 
 mkDerivation rec {
   name = "virt-manager-qt-${version}";
-  version = "0.60.88";
+  version = "0.70.91";
 
   src = fetchFromGitHub {
     owner  = "F1ash";
     repo   = "qt-virt-manager";
     rev    = "${version}";
-    sha256 = "0hd5d8zdghc5clv8pa4h9zigshdrarfpmzyvrq56rjkm13lrdz52";
+    sha256 = "1z2kq88lljvr24z1kizvg3h7ckf545h4kjhhrjggkr0w4wjjwr43";
   };
 
   cmakeFlags = [
@@ -22,6 +23,7 @@ mkDerivation rec {
   buildInputs = [
     qtbase qtmultimedia qtsvg krdc
     libvirt libvncserver pcre pixman qtermwidget spice-gtk spice-protocol
+    libselinux libsepol utillinux
   ];
 
   nativeBuildInputs = [ cmake pkgconfig qttools ];
diff --git a/pkgs/applications/window-managers/dwm/dwm-status.nix b/pkgs/applications/window-managers/dwm/dwm-status.nix
index d846ab7e29da..2a8f1d67f6e0 100644
--- a/pkgs/applications/window-managers/dwm/dwm-status.nix
+++ b/pkgs/applications/window-managers/dwm/dwm-status.nix
@@ -1,30 +1,30 @@
 { stdenv, lib, rustPlatform, fetchFromGitHub, dbus, gdk_pixbuf, libnotify, makeWrapper, pkgconfig, xorg
-, enableAlsaUtils ? true, alsaUtils, bash, coreutils }:
+, enableAlsaUtils ? true, alsaUtils, coreutils
+, enableNetwork ? true, dnsutils, iproute, wirelesstools }:
 
 let
-  binPath = stdenv.lib.makeBinPath [
-    alsaUtils bash coreutils
-  ];
+  bins = lib.optionals enableAlsaUtils [ alsaUtils coreutils ]
+    ++ lib.optionals enableNetwork [ dnsutils iproute wirelesstools ];
 in
 
 rustPlatform.buildRustPackage rec {
   name = "dwm-status-${version}";
-  version = "1.5.0";
+  version = "1.6.0";
 
   src = fetchFromGitHub {
     owner = "Gerschtli";
     repo = "dwm-status";
     rev = version;
-    sha256 = "0mfzpyacd7i6ipbjwyl1zc0x3lnz0f4qqzsmsb07p047z95mw4v6";
+    sha256 = "02gvlxv6ylx4mdkf59crm2zyahiz1zd4cr5zz29dnhx7r7738i9a";
   };
 
   nativeBuildInputs = [ makeWrapper pkgconfig ];
   buildInputs = [ dbus gdk_pixbuf libnotify xorg.libX11 ];
 
-  cargoSha256 = "1cngcacsbzijs55k4kz8fidki3p8jblk3v5s21hjsn4glzjdbkmm";
+  cargoSha256 = "1khknf1bjs80cc2n4jnpilf8cc15crykhhyvvff6q4ay40353gr6";
 
-  postInstall = lib.optionalString enableAlsaUtils ''
-    wrapProgram $out/bin/dwm-status --prefix "PATH" : "${binPath}"
+  postInstall = lib.optionalString (bins != [])  ''
+    wrapProgram $out/bin/dwm-status --prefix "PATH" : "${stdenv.lib.makeBinPath bins}"
   '';
 
   meta = with stdenv.lib; {