summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix4
-rw-r--r--pkgs/applications/misc/et/default.nix4
-rw-r--r--pkgs/applications/misc/sent/default.nix8
-rw-r--r--pkgs/applications/misc/slstatus/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/wire-desktop/default.nix104
-rw-r--r--pkgs/applications/science/chemistry/jmol/default.nix44
-rw-r--r--pkgs/applications/science/math/palp/default.nix67
-rw-r--r--pkgs/applications/science/math/pynac/default.nix47
-rw-r--r--pkgs/development/compilers/as31/default.nix3
-rw-r--r--pkgs/development/libraries/farbfeld/default.nix6
-rw-r--r--pkgs/development/libraries/fox/fox-1.6.nix4
-rw-r--r--pkgs/development/libraries/glibc/common.nix18
-rw-r--r--pkgs/development/libraries/hamlib/default.nix4
-rw-r--r--pkgs/development/libraries/leatherman/default.nix4
-rw-r--r--pkgs/development/libraries/libimobiledevice/default.nix3
-rw-r--r--pkgs/development/libraries/libusbmuxd/default.nix3
-rw-r--r--pkgs/development/libraries/science/math/flintqs/default.nix40
-rw-r--r--pkgs/development/libraries/science/math/lcalc/default.nix78
-rw-r--r--pkgs/development/libraries/science/math/lcalc/makefile.patch113
-rw-r--r--pkgs/development/libraries/science/math/rubiks/default.nix82
-rw-r--r--pkgs/development/python-modules/cypari2/default.nix55
-rw-r--r--pkgs/development/python-modules/flask-babel/default.nix44
-rw-r--r--pkgs/development/python-modules/flask-silk/default.nix26
-rw-r--r--pkgs/development/python-modules/xdot/default.nix4
-rw-r--r--pkgs/development/tools/build-managers/gup/build.nix16
-rw-r--r--pkgs/development/tools/build-managers/gup/default.nix51
-rw-r--r--pkgs/games/gzdoom/default.nix4
-rw-r--r--pkgs/servers/asterisk/default.nix22
-rw-r--r--pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix4
-rw-r--r--pkgs/tools/misc/dust/default.nix25
-rw-r--r--pkgs/tools/misc/youtube-dl/default.nix4
-rw-r--r--pkgs/tools/package-management/nix-review/default.nix4
-rw-r--r--pkgs/tools/package-management/nix-update-source/default.nix11
-rw-r--r--pkgs/tools/typesetting/asciidoctor/default.nix1
-rw-r--r--pkgs/top-level/all-packages.nix16
-rw-r--r--pkgs/top-level/python-packages.nix6
36 files changed, 854 insertions, 81 deletions
diff --git a/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix b/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix
index 922acf9e3e00..5d9fe0edece5 100644
--- a/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix
+++ b/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix
@@ -3,11 +3,11 @@
 
 bitwig-studio1.overrideAttrs (oldAttrs: rec {
   name = "bitwig-studio-${version}";
-  version = "2.3.1";
+  version = "2.3.2";
 
   src = fetchurl {
     url    = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
-    sha256 = "18gghx0ygwh01cidj8mkf82l9qhq2dy1b3yc4ajksvj762yg6cf2";
+    sha256 = "10ji4jqnnlhv4bgvhqwysprax6jcjk4759jskr9imwj6qjnj3vzn";
   };
 
   buildInputs = bitwig-studio1.buildInputs ++ [ ffmpeg ];
diff --git a/pkgs/applications/misc/et/default.nix b/pkgs/applications/misc/et/default.nix
index 40631b0a0dbf..4aaaa3339982 100644
--- a/pkgs/applications/misc/et/default.nix
+++ b/pkgs/applications/misc/et/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "et-${version}";
-  version = "0.1";
+  version = "0.1.1";
 
   src = fetchFromGitHub {
     owner = "geistesk";
     repo = "et";
     rev = "${version}";
-    sha256 = "1d2hq6p1y2ynk0a3l35lwbm1fcl9kg7rpjcin8bx4xcdpbw42y94";
+    sha256 = "167w9qwfpd63rgy0xmkkkh5krmd91q42c3ijy3j099krgdfbb9bc";
   };
 
   buildInputs = [ libnotify gdk_pixbuf ];
diff --git a/pkgs/applications/misc/sent/default.nix b/pkgs/applications/misc/sent/default.nix
index 24e76500a6a5..9bbae33b3e41 100644
--- a/pkgs/applications/misc/sent/default.nix
+++ b/pkgs/applications/misc/sent/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, farbfeld, libX11, libXft
+{ stdenv, fetchurl, farbfeld, libX11, libXft, makeWrapper
 , patches ? [] }:
 
 stdenv.mkDerivation rec {
@@ -9,7 +9,8 @@ stdenv.mkDerivation rec {
     sha256 = "0cxysz5lp25mgww73jl0mgip68x7iyvialyzdbriyaff269xxwvv";
   };
 
-  buildInputs = [ farbfeld libX11 libXft ];
+  buildInputs = [ libX11 libXft ];
+  nativeBuildInputs = [ makeWrapper ];
 
   # unpacking doesn't create a directory
   sourceRoot = ".";
@@ -17,6 +18,9 @@ stdenv.mkDerivation rec {
   inherit patches;
 
   installFlags = [ "PREFIX=$(out)" ];
+  postInstall = ''
+    wrapProgram "$out/bin/sent" --prefix PATH : "${farbfeld}/bin"
+  '';
 
   meta = with stdenv.lib; {
     description = "A simple plaintext presentation tool";
diff --git a/pkgs/applications/misc/slstatus/default.nix b/pkgs/applications/misc/slstatus/default.nix
index bc855db29ecc..f4a2e889cd43 100644
--- a/pkgs/applications/misc/slstatus/default.nix
+++ b/pkgs/applications/misc/slstatus/default.nix
@@ -4,12 +4,12 @@ with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "slstatus-${version}";
-  version = "unstable-2018-03-28";
+  version = "unstable-2018-04-16";
 
   src = fetchgit {
     url = https://git.suckless.org/slstatus;
-    rev = "faa52bdcc0221de2d8fae950e409a8ac5e05bfcd";
-    sha256 = "0i8k7gjvx51y0mwxjlqhyk2dpvkb2d3y8x4l6ckdnyiy5632pn76";
+    rev = "97ef7c2a1d67bb2c9c379e657fbc8e35acd6aafb";
+    sha256 = "1777hgl10imk0l2sgnqgbkfchv1mpxrd82ninzwp7f1rgwchz36v";
   };
 
   configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
diff --git a/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix b/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix
new file mode 100644
index 000000000000..9e946152c192
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix
@@ -0,0 +1,104 @@
+{ stdenv, lib, fetchurl, dpkg, makeDesktopItem, gnome2, atk, cairo, gdk_pixbuf, glib
+, freetype, fontconfig, dbus, libnotify, libX11, xorg, libXi, libXcursor, libXdamage
+, libXrandr, libXcomposite, libXext, libXfixes, libXrender, libXtst, libXScrnSaver
+, nss, nspr, alsaLib, cups, expat, udev, xdg_utils, hunspell
+}:
+let
+  rpath = lib.makeLibraryPath [
+    alsaLib
+    atk
+    cairo
+    cups
+    dbus
+    expat
+    fontconfig
+    freetype
+    gdk_pixbuf
+    glib
+    gnome2.GConf
+    gnome2.gtk
+    gnome2.pango
+    hunspell
+    libnotify
+    libX11
+    libXcomposite
+    libXcursor
+    libXdamage
+    libXext
+    libXfixes
+    libXi
+    libXrandr
+    libXrender
+    libXScrnSaver
+    libXtst
+    nspr
+    nss
+    stdenv.cc.cc
+    udev
+    xdg_utils
+    xorg.libxcb
+  ];
+
+  version = "3.0.2816";
+
+  plat = {
+    "i686-linux" = "i386";
+    "x86_64-linux" = "amd64";
+  }.${stdenv.system};
+
+  sha256 = {
+    "i686-linux" = "1ds807j1b8dk9hrnzbg4g9mvn44abw24pxrqns9ai62mh3hvi65p";
+    "x86_64-linux" = "13pyyp2c8q0v0ni2hzh2jnbd3i96q68314glbmy4kyh7vm9427lc";
+  }.${stdenv.system};
+
+in
+  stdenv.mkDerivation rec {
+    name = "wire-desktop-${version}";
+
+    src = fetchurl {
+      url = "https://wire-app.wire.com/linux/debian/pool/main/wire_${version}_${plat}.deb";
+      inherit sha256;
+    };
+
+    desktopItem = makeDesktopItem {
+      name = "Wire";
+      exec = "wire-desktop %U";
+      icon = "wire-desktop";
+      comment = "Secure messenger for everyone";
+      desktopName = "Wire Desktop";
+      genericName = "Secure messenger";
+      categories = "Network;InstantMessaging;Chat;VideoConference";
+    };
+
+    phases = [ "unpackPhase" "installPhase" ];
+    nativeBuildInputs = [ dpkg ];
+    unpackPhase = "dpkg-deb -x $src .";
+    installPhase = ''
+      mkdir -p $out
+      cp -R opt $out
+      cp -R usr/share $out/share
+
+      chmod -R g-w $out
+
+      # Patch signal
+      patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+               --set-rpath "${rpath}:$out/opt/wire-desktop" \
+               "$out/opt/wire-desktop/wire-desktop"
+
+      # Symlink to bin
+      mkdir -p $out/bin
+      ln -s "$out/opt/wire-desktop/wire-desktop" $out/bin/wire-desktop
+
+      # Desktop file
+      mkdir -p $out/share/applications
+      cp ${desktopItem}/share/applications/* $out/share/applications
+    '';
+    
+    meta = {
+      description = "A modern, secure messenger";
+      homepage    = https://wire.com/;
+      license     = lib.licenses.gpl3;
+      maintainers = with lib.maintainers; [ worldofpeace ];
+      platforms = [ "i686-linux" "x86_64-linux" ];
+    };
+  }
diff --git a/pkgs/applications/science/chemistry/jmol/default.nix b/pkgs/applications/science/chemistry/jmol/default.nix
new file mode 100644
index 000000000000..c85e1143d103
--- /dev/null
+++ b/pkgs/applications/science/chemistry/jmol/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, fetchurl
+, unzip
+, jre
+}:
+
+stdenv.mkDerivation rec {
+  version = "${baseVersion}.${patchVersion}";
+  baseVersion = "14.29";
+  patchVersion = "12";
+  pname = "jmol";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz";
+    sha256 = "1ndq9am75janshrnk26334z1nmyh3k4bp20napvf2zv0lfp8k3bv";
+  };
+
+  buildInputs = [
+    jre
+  ];
+
+  installPhase = ''
+    mkdir -p "$out/share/jmol"
+    mkdir -p "$out/bin"
+
+    ${unzip}/bin/unzip jsmol.zip -d "$out/share/"
+
+    sed -i -e 's|command=java|command=${jre}/bin/java|' jmol.sh
+    cp *.jar jmol.sh "$out/share/jmol"
+    ln -s $out/share/jmol/jmol.sh "$out/bin/jmol"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+     description = "A Java 3D viewer for chemical structures";
+     homepage = https://sourceforge.net/projects/jmol;
+     license = licenses.lgpl2;
+     platforms = platforms.all;
+     maintainers = with maintainers; [ timokau ];
+  };
+}
+
diff --git a/pkgs/applications/science/math/palp/default.nix b/pkgs/applications/science/math/palp/default.nix
new file mode 100644
index 000000000000..3484c369db3b
--- /dev/null
+++ b/pkgs/applications/science/math/palp/default.nix
@@ -0,0 +1,67 @@
+{ stdenv
+, fetchurl
+, dimensions ? 6 # works for <= dimensions dimensions, but is only optimized for that exact value
+, doSymlink ? true # symlink the executables to the default location (without dimension postfix)
+}:
+
+stdenv.mkDerivation rec {
+  version = "2.1";
+  dim = toString dimensions;
+  name = "palp-${dim}d-${version}";
+
+  src = fetchurl {
+    url = "http://hep.itp.tuwien.ac.at/~kreuzer/CY/palp/palp-${version}.tar.gz";
+    sha256 = "1s7s2lc5f0ig1yy7ygsh3sddm3sbq4mxwybqsj8lp9wjdxs7qfrs";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  preBuild = ''
+      echo Building PALP optimized for ${dim} dimensions
+      sed -i "s/^#define[^a-zA-Z]*POLY_Dmax.*/#define POLY_Dmax ${dim}/" Global.h
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    for file in poly class cws nef mori; do
+        cp -p $file.x "$out/bin/$file-${dim}d.x"
+    done
+  '' + stdenv.lib.optionalString doSymlink ''
+    cd "$out/bin"
+    for file in poly class cws nef mori; do
+        ln -sf $file-6d.x $file.x
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A Package for Analyzing Lattice Polytopes";
+    longDescription = ''
+      A Package for Analyzing Lattice Polytopes (PALP) is a set of C
+      programs for calculations with lattice polytopes and applications to
+      toric geometry.
+
+      It contains routines for vertex and facet enumeration, computation of
+      incidences and symmetries, as well as completion of the set of lattice
+      points in the convex hull of a given set of points. In addition, there
+      are procedures specialised to reflexive polytopes such as the
+      enumeration of reflexive subpolytopes, and applications to toric
+      geometry and string theory, like the computation of Hodge data and
+      fibration structures for toric Calabi-Yau varieties.  The package is
+      well tested and optimised in speed as it was used for time consuming
+      tasks such as the classification of reflexive polyhedra in 4
+      dimensions and the creation and manipulation of very large lists of
+      5-dimensional polyhedra.
+
+      While originally intended for low-dimensional applications, the
+      algorithms work in any dimension and our key routine for vertex and
+      facet enumeration compares well with existing packages.
+    '';
+    homepage = http://hep.itp.tuwien.ac.at/~kreuzer/CY/CYpalp.html;
+    # Just a link on the website pointing to gpl -- now gplv3. When the last
+    # version was released that pointed to gplv2 however, so thats probably
+    # the right license.
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ timokau ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/science/math/pynac/default.nix b/pkgs/applications/science/math/pynac/default.nix
new file mode 100644
index 000000000000..fd566abd9a9a
--- /dev/null
+++ b/pkgs/applications/science/math/pynac/default.nix
@@ -0,0 +1,47 @@
+{ stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkgconfig
+, flint
+, gmp
+, python2
+, singular
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.7.19";
+  name = "pynac-${version}";
+
+  src = fetchFromGitHub {
+    owner = "pynac";
+    repo = "pynac";
+    rev = "pynac-${version}";
+    sha256 = "132bibvapm245c5xy29j3xmjs0pawvw7lv05374m8vv1m39127d3";
+  };
+
+  buildInputs = [
+    flint
+    gmp
+    singular
+    singular
+    python2
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkgconfig
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Python is Not a CAS -- modified version of Ginac";
+    longDescription = ''
+      Pynac -- "Python is Not a CAS" is a modified version of Ginac that
+      replaces the depency of GiNaC on CLN by a dependency instead of Python.
+      It is a lite version of GiNaC as well, not implementing all the features
+      of the full GiNaC, and it is *only* meant to be used as a Python library.
+    '';
+    homepage    = http://pynac.org;
+    maintainers = with maintainers; [ timokau ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/pkgs/development/compilers/as31/default.nix b/pkgs/development/compilers/as31/default.nix
index 93b251707e80..519992fd8c26 100644
--- a/pkgs/development/compilers/as31/default.nix
+++ b/pkgs/development/compilers/as31/default.nix
@@ -15,9 +15,8 @@ in stdenv.mkDerivation {
   buildInputs = [ yacc ];
 
   patches = [
-    # CVE-2012-0808
     (fetchpatch {
-       name = "as31-mkstemps.patch";
+       name = "CVE-2012-0808.patch";
        url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=655496;filename=as31-mkstemps.patch;msg=5";
        sha256 = "0iia4wa8m141bwz4588yxb1dp2qwhapcii382sncm6jvwyngwh21";
      })
diff --git a/pkgs/development/libraries/farbfeld/default.nix b/pkgs/development/libraries/farbfeld/default.nix
index 7c0addea5e8b..c23fc0bc59f6 100644
--- a/pkgs/development/libraries/farbfeld/default.nix
+++ b/pkgs/development/libraries/farbfeld/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, libpng, libjpeg }:
+{ stdenv, fetchgit, makeWrapper, file, libpng, libjpeg }:
 
 stdenv.mkDerivation rec {
   name = "farbfeld-${version}";
@@ -11,8 +11,12 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ libpng libjpeg ];
+  nativeBuildInputs = [ makeWrapper ];
 
   installFlags = "PREFIX=/ DESTDIR=$(out)";
+  postInstall = ''
+    wrapProgram "$out/bin/2ff" --prefix PATH : "${file}/bin"
+  '';
 
   meta = with stdenv.lib; {
     description = "Suckless image format with conversion tools";
diff --git a/pkgs/development/libraries/fox/fox-1.6.nix b/pkgs/development/libraries/fox/fox-1.6.nix
index a0ba95480129..4f1e0eaee7fb 100644
--- a/pkgs/development/libraries/fox/fox-1.6.nix
+++ b/pkgs/development/libraries/fox/fox-1.6.nix
@@ -3,7 +3,7 @@
 , CoreServices }:
 
 let
-  version = "1.6.56";
+  version = "1.6.57";
 in
 
 stdenv.mkDerivation rec {
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "ftp://ftp.fox-toolkit.org/pub/${name}.tar.gz";
-    sha256 = "1ckcb12gblz1ad1371ah1qirxn3r9zdngh9w0357hsqfmkyfa5y5";
+    sha256 = "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5";
   };
 
   buildInputs = [
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index 517c98e9f644..c8716bfdc796 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -1,5 +1,21 @@
 /* Build configuration used to build glibc, Info files, and locale
-   information.  */
+   information.
+
+   Note that this derivation has multiple outputs and does not respect the
+   standard convention of putting the executables into the first output. The
+   first output is `lib` so that the libraries provided by this derivation
+   can be accessed directly, e.g.
+
+     "${pkgs.glibc}/lib/ld-linux-x86_64.so.2"
+
+   The executables are put into `bin` output and need to be referenced via
+   the `bin` attribute of the main package, e.g.
+
+     "${pkgs.glibc.bin}/bin/ldd".
+
+  The executables provided by glibc typically include `ldd`, `locale`, `iconv`
+  but the exact set depends on the library version and the configuration.
+*/
 
 { stdenv, lib
 , buildPlatform, hostPlatform
diff --git a/pkgs/development/libraries/hamlib/default.nix b/pkgs/development/libraries/hamlib/default.nix
index 3ea70fd49908..9825d6ed64a9 100644
--- a/pkgs/development/libraries/hamlib/default.nix
+++ b/pkgs/development/libraries/hamlib/default.nix
@@ -3,12 +3,12 @@
 
 stdenv.mkDerivation rec {
   pname = "hamlib";
-  version = "1.2.15.3";
+  version = "3.2";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/${pname}/${name}.tar.gz";
-    sha256 = "0ppp6fc2h9d8p30j2s9wlqd620kmnny4wd8fc3jxd6gxwi4lbjm2";
+    sha256 = "07ddsykbliiv0p717z1h5vzmvsx6lm75j32rhvmwqxp8m3kbap5m";
   };
 
   buildInputs = [ perl perlPackages.ExtUtilsMakeMaker python2 swig gd libxml2
diff --git a/pkgs/development/libraries/leatherman/default.nix b/pkgs/development/libraries/leatherman/default.nix
index 44d527e1304b..7b6834166d8c 100644
--- a/pkgs/development/libraries/leatherman/default.nix
+++ b/pkgs/development/libraries/leatherman/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   name = "leatherman-${version}";
-  version = "1.4.0";
+  version = "1.4.1";
 
   src = fetchFromGitHub {
-    sha256 = "0whlyzz0imv4lm69xkwhcd6jzh3s0rzlqjmwimbqz96p4771ivpd";
+    sha256 = "0n516gqv501ymj99bickbr2cbhr109azh9hc1hn7flbcjzz3aljc";
     rev = version;
     repo = "leatherman";
     owner = "puppetlabs";
diff --git a/pkgs/development/libraries/libimobiledevice/default.nix b/pkgs/development/libraries/libimobiledevice/default.nix
index cef9cc0af6b2..d1b779627c69 100644
--- a/pkgs/development/libraries/libimobiledevice/default.nix
+++ b/pkgs/development/libraries/libimobiledevice/default.nix
@@ -10,7 +10,8 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./disable_sslv3.patch
-    (fetchpatch { # CVE-2016-5104
+    (fetchpatch {
+      name = "CVE-2016-5104.patch";
       url = "https://github.com/libimobiledevice/libimobiledevice/commit/df1f5c4d70d0c19ad40072f5246ca457e7f9849e.patch";
       sha256 = "06ygb9aqcvm4v08wrldsddjgyqv5bkpq6lxzq2a1nwqp9mq4a4k1";
     })
diff --git a/pkgs/development/libraries/libusbmuxd/default.nix b/pkgs/development/libraries/libusbmuxd/default.nix
index 3e8beef3c9d0..3d15b698b481 100644
--- a/pkgs/development/libraries/libusbmuxd/default.nix
+++ b/pkgs/development/libraries/libusbmuxd/default.nix
@@ -8,7 +8,8 @@ stdenv.mkDerivation rec {
   };
 
   patches = [
-    (fetchpatch { # CVE-2016-5104
+    (fetchpatch {
+      name = "CVE-2016-5104.patch";
       url = "https://github.com/libimobiledevice/libusbmuxd/commit/4397b3376dc4e4cb1c991d0aed61ce6482614196.patch";
       sha256 = "0cl3vys7bkwbdzf64d0rz3zlqpfc30w4l7j49ljv01agh42ywhgk";
     })
diff --git a/pkgs/development/libraries/science/math/flintqs/default.nix b/pkgs/development/libraries/science/math/flintqs/default.nix
new file mode 100644
index 000000000000..2891429c8578
--- /dev/null
+++ b/pkgs/development/libraries/science/math/flintqs/default.nix
@@ -0,0 +1,40 @@
+{ stdenv
+, fetchFromGitHub
+, autoreconfHook
+, gmp
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.0";
+  pname = "flintqs";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "sagemath";
+    repo = "FlintQS";
+    rev = "v${version}";
+    sha256 = "1f0lnayz6j6qgasx8pbq61d2fqam0wwhsmh6h15l4vq58l1vvbwj";
+  };
+
+  preAutoreconf = ''
+    touch ChangeLog
+  '';
+
+  buildInputs = [
+    gmp
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/sagemath/FlintQS;
+    description = "Highly optimized multi-polynomial quadratic sieve for integer factorization";
+    license = with licenses; [ gpl2 ];
+    maintainers = with maintainers; [ timokau ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/science/math/lcalc/default.nix b/pkgs/development/libraries/science/math/lcalc/default.nix
new file mode 100644
index 000000000000..90393cff001c
--- /dev/null
+++ b/pkgs/development/libraries/science/math/lcalc/default.nix
@@ -0,0 +1,78 @@
+{ stdenv
+, fetchurl
+, fetchpatch
+, pari
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.23";
+  pname = "lcalc";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    # original at http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/CODE/L-${version}.tar.gz, no longer available
+    # "newer" version at google code https://code.google.com/archive/p/l-calc/source/default/source
+    url = "http://mirrors.mit.edu/sage/spkg/upstream/lcalc/lcalc-${version}.tar.bz2";
+    sha256 = "1c6dsdshgxhqppjxvxhp8yhpxaqvnz3d1mlh26r571gkq8z2bm43";
+  };
+
+  preConfigure = "cd src";
+
+  buildInputs = [
+    pari
+  ];
+
+  patches = [
+    # Port to newer pari
+    (fetchpatch {
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/lcalc/patches/pari-2.7.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
+      sha256 = "1x3aslldm8njjm7p9g9s9w2c91kphnci2vpkxkrcxfihw3ayss6c";
+    })
+
+    # Uncomment the definition of lcalc_to_double(const long double& x).
+    # (Necessary for GCC >= 4.6.0, cf. https://trac.sagemath.org/ticket/10892)
+    (fetchpatch {
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/lcalc/patches/Lcommon.h.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
+      sha256 = "0g4ybvsrcv48rmlh1xjnkms19jp25k58azv6ds1f2cm34hxs8fdx";
+    })
+
+    # Include also <time.h> in Lcommandline_numbertheory.h (at least required
+    # on Cygwin, cf. https://trac.sagemath.org/ticket/9845)
+    (fetchpatch {
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/lcalc/patches/time.h.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
+      sha256 = "1brf04n11kkc43ylagf8dm32j5r2g9zv51dp5wag1mpm4p04l7cl";
+    })
+
+    # Fix for gcc >4.6
+    (fetchpatch {
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/lcalc/patches/lcalc-1.23_default_parameters_1.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
+      sha256 = "0i2yvxm5fx4z0v6m4srgh8rj98kijmlvyirlxf1ky0bp2si6bpka";
+    })
+
+    # gcc 5.1
+    (fetchpatch {
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/lcalc/patches/lcalc-1.23_default_parameters_2.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
+      sha256 = "0dqwmxpm9wb53qbypsyfkgsvk2f8nf67sydphd4dkc2vw4yz6vlh";
+    })
+
+    # based on gentoos makefile patch -- fix paths, adhere to flags
+    ./makefile.patch
+  ];
+
+  installFlags = [
+    "DESTDIR=$(out)"
+  ];
+
+  makeFlags = [
+    "PARI_DEFINE=-DINCLUDE_PARI"
+    "PARI_PREFIX=${pari}"
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/L.html;
+    description = "A program for calculating with L-functions";
+    license = with licenses; [ gpl2 ];
+    maintainers = with maintainers; [ timokau ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/science/math/lcalc/makefile.patch b/pkgs/development/libraries/science/math/lcalc/makefile.patch
new file mode 100644
index 000000000000..f55bbe3f24fa
--- /dev/null
+++ b/pkgs/development/libraries/science/math/lcalc/makefile.patch
@@ -0,0 +1,113 @@
+diff --git a/src/Makefile b/src/Makefile
+index 84e4e88..56ca676 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -58,7 +58,7 @@ ifeq ($(G5),TRUE)
+    #MACHINE_SPECIFIC_FLAGS = -mpowerpc -mpowerpc64 -m64
+ endif
+ 
+-CCFLAGS =  -Wa,-W -O3 $(OPENMP_FLAG) -Wno-deprecated $(PREPROCESSOR_DEFINE) $(MACHINE_SPECIFIC_FLAGS) $(EXTRA)
++CCFLAGS = $(CXXFLAGS) $(OPENMP_FLAG) $(PREPROCESSOR_DEFINE) $(MACHINE_SPECIFIC_FLAGS)
+ #CCFLAGS =  -Wa,-W -O3 $(OPENMP_FLAG)  $(PREPROCESSOR_DEFINE) $(MACHINE_SPECIFIC_FLAGS) $(EXTRA)
+ #CCFLAGS =  -Wa,-W -O2 -fno-exceptions -Wno-deprecated $(PREPROCESSOR_DEFINE) $(MACHINE_SPECIFIC_FLAGS) $(EXTRA)
+ 
+@@ -68,12 +68,12 @@ CCFLAGS =  -Wa,-W -O3 $(OPENMP_FLAG) -Wno-deprecated $(PREPROCESSOR_DEFINE) $(MA
+ 
+ ifeq ($(PARI_DEFINE),-DINCLUDE_PARI)
+     #location of pari.h.
+-    LOCATION_PARI_H = /usr/local/include/pari #usual location
++    LOCATION_PARI_H = $(PARI_PREFIX)/include/pari #usual location
+ 
+     #location of libpari.a or of libpari.so
+     #depending on whether static or dynamic libraries are being used.
+     #On mac os x it's the former, on linux I think usually the latter.
+-    LOCATION_PARI_LIBRARY = /usr/local/lib #usual location
++    LOCATION_PARI_LIBRARY = $(PARI_PREFIX)/lib #usual location
+ else
+     #supplied as a dummy so as to avoid more ifeq's below
+     LOCATION_PARI_H = .
+@@ -89,24 +89,24 @@ INCLUDEFILES= -I../include
+ 
+ ifeq ($(OS_NAME),Darwin)
+     LDFLAGS2 =
+-    DYN_OPTION=dynamiclib
++    DYN_OPTION=-dynamiclib
+ else
+-    LDFLAGS1 = -Xlinker -export-dynamic #not sure why pari calls these when linking but on the web I found
++    LDFLAGS1 = #not sure why pari calls these when linking but on the web I found
+     #'Libtool provides the `-export-dynamic' link flag (see section Link mode), which does this declaration.
+     #You need to use this flag if you are linking a shared library that will be dlopened'
+     #see notes below
+     #ifeq ($(PARI_DEFINE),-DINCLUDE_PARI)
+-       LDFLAGS2 = $(LDFLAGS1) -Xlinker -rpath -Xlinker $(LOCATION_PARI_LIBRARY)
++       LDFLAGS2 = $(LDFLAGS)
+     #else
+     #    LDFLAGS2 = $(LDFLAGS1)
+     #endif
+-    DYN_OPTION=shared
++    DYN_OPTION=$(LDFLAGS) -shared -Wl,-soname,libLfunction.so
+ endif
+ 
+ ifeq ($(PARI_DEFINE),-DINCLUDE_PARI)
+-    LDFLAGS = $(LDFLAGS2) -L$(LOCATION_PARI_LIBRARY) -lpari
++    MYLDFLAGS = $(LDFLAGS2) -L$(LOCATION_PARI_LIBRARY) -lpari
+ else
+-    LDFLAGS = $(LDFLAGS2)
++    MYLDFLAGS = $(LDFLAGS2)
+ endif
+ 
+ 
+@@ -129,7 +129,8 @@ endif
+ #become clear which libraries the computer can find.
+ 
+ 
+-INSTALL_DIR= /usr/local
++INSTALL_DIR= $(DESTDIR)
++LIB_DIR ?=lib
+ 
+ #object files for the libLfunction library
+ OBJ_L = Lglobals.o Lgamma.o Lriemannsiegel.o Lriemannsiegel_blfi.o Ldokchitser.o
+@@ -141,9 +142,8 @@ OBJECTS = $(OBJ3)
+ 
+ all:
+ #	make print_vars
+-	make libLfunction.so
+-	make lcalc
+-	make examples
++	${MAKE} libLfunction.so
++	${MAKE} lcalc
+ #	make find_L
+ #	make test
+ 
+@@ -151,7 +151,7 @@ print_vars:
+ 	@echo OS_NAME = $(OS_NAME)
+ 
+ lcalc: $(OBJECTS)
+-	$(CC) $(CCFLAGS) $(INCLUDEFILES) $(OBJECTS) $(LDFLAGS) -o lcalc $(GMP_FLAGS)
++	$(CC) $(CCFLAGS) $(INCLUDEFILES) $(OBJECTS) $(MYLDFLAGS) -o lcalc $(GMP_FLAGS)
+ 
+ examples:
+ 	$(CC) $(CCFLAGS) $(INCLUDEFILES) example_programs/example.cc libLfunction.so -o example_programs/example $(GMP_FLAGS)
+@@ -262,15 +262,18 @@ Lcommandline.o: ../include/Lcommandline_values_zeros.h
+ 
+ 
+ libLfunction.so: $(OBJ_L)
+-	g++ -$(DYN_OPTION)  -o libLfunction.so $(OBJ_L)
++	g++ $(DYN_OPTION) -o libLfunction.so $(OBJ_L)
+ 
+ clean:
+ 	rm -f *.o lcalc libLfunction.so example_programs/example
+ 
+ install:
+-	cp -f lcalc $(INSTALL_DIR)/bin/.
+-	cp -f libLfunction.so $(INSTALL_DIR)/lib/.
+-	cp -rf ../include $(INSTALL_DIR)/include/Lfunction
++	install -d $(INSTALL_DIR)/bin
++	install -d $(INSTALL_DIR)/$(LIB_DIR)
++	install -d $(INSTALL_DIR)/include/libLfunction
++	install lcalc $(INSTALL_DIR)/bin
++	install libLfunction.so $(INSTALL_DIR)/$(LIB_DIR)
++	install -m 644 -t $(INSTALL_DIR)/include/libLfunction ../include/*.h
+ 
+ 
+ SRCS = Lcommandline.cc Lcommandline_elliptic.cc Lcommandline_globals.cc Lcommandline_misc.cc Lcommandline_numbertheory.cc Lcommandline_twist.cc Lcommandline_values_zeros.cc Lgamma.cc Lglobals.cc Lmisc.cc Lriemannsiegel.cc Lriemannsiegel_blfi.cc cmdline.c
diff --git a/pkgs/development/libraries/science/math/rubiks/default.nix b/pkgs/development/libraries/science/math/rubiks/default.nix
new file mode 100644
index 000000000000..5b20948686b4
--- /dev/null
+++ b/pkgs/development/libraries/science/math/rubiks/default.nix
@@ -0,0 +1,82 @@
+{ stdenv
+, fetchurl
+, fetchpatch
+, coreutils
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rubiks";
+  version = "20070912";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "http://mirrors.mit.edu/sage/spkg/upstream/rubiks/rubiks-${version}.tar.bz2";
+    sha256 = "0zdmkb0j1kyspdpsszzb2k3279xij79jkx0dxd9f3ix1yyyg3yfq";
+  };
+
+  preConfigure = ''
+    export INSTALL="${coreutils}/bin/install"
+  '';
+
+  # everything is done in `make install`
+  buildPhase = "true";
+
+  installFlags = [
+    "PREFIX=$out"
+  ];
+
+  patches = [
+    # Fix makefiles which use all the variables in all the wrong ways and
+    # hardcode values for some variables.
+    (fetchpatch {
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/rubiks/patches/dietz-cu2-Makefile.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
+      sha256 = "1ry3w1mk9q4jqd91zlaa1bdiiplld4hpfjaldbhlmzlgrrc99qmq";
+    })
+    (fetchpatch {
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/rubiks/patches/dietz-mcube-Makefile.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
+      sha256 = "0zsbh6k3kqdg82fv0kzghr1x7pafisv943gmssqscp107bhg77bz";
+    })
+    (fetchpatch {
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/rubiks/patches/dietz-solver-Makefile.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
+      sha256 = "0vhw70ylnmydgjhwx8jjlb2slccj4pfqn6vzirkyz1wp8apsmfhp";
+    })
+    (fetchpatch {
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/rubiks/patches/reid-Makefile.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
+      sha256 = "1r311sn012xs135s0d21qwsig2kld7rdcq19nm0zbnklviid57df";
+    })
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = https://wiki.sagemath.org/spkg/rubiks;
+    description = "Several programs for working with Rubik's cubes";
+    # The individual websites are no longer available
+    longDescription = ''
+      There are several programs for working with Rubik's cubes, by three
+      different people. Look inside the directories under /src to see
+      specific info and licensing. In summary the three contributers are:
+
+
+      Michael Reid (GPL) http://www.math.ucf.edu/~reid/Rubik/optimal_solver.html
+          optimal - uses many pre-computed tables to find an optimal
+                    solution to the 3x3x3 Rubik's cube
+
+
+      Dik T. Winter (MIT License)
+          cube    - uses Kociemba's algorithm to iteratively find a short
+                    solution to the 3x3x3 Rubik's cube
+          size222 - solves a 2x2x2 Rubik's cube
+
+
+      Eric Dietz (GPL) http://www.wrongway.org/?rubiksource
+          cu2   - A fast, non-optimal 2x2x2 solver
+          cubex - A fast, non-optimal 3x3x3 solver
+          mcube - A fast, non-optimal 4x4x4 solver
+    '';
+    license = with licenses; [
+      gpl2 # Michael Reid's and Eric Dietz software
+      mit # Dik T. Winter's software
+    ];
+    maintainers = with maintainers; [ timokau ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/development/python-modules/cypari2/default.nix b/pkgs/development/python-modules/cypari2/default.nix
new file mode 100644
index 000000000000..fc3c311a5061
--- /dev/null
+++ b/pkgs/development/python-modules/cypari2/default.nix
@@ -0,0 +1,55 @@
+{ stdenv
+, bootstrapped-pip
+, buildPythonPackage
+, python
+, fetchPypi
+, pari
+, gmp
+, cython
+, cysignals
+, six
+}:
+
+buildPythonPackage rec {
+  pname = "cypari2";
+  version = "1.1.4"; # remove six dependency on upgrade to >1.1.4
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0n0mp8qmvvzmfaawg39d3mkyzf65q2zkz7bnqyk4sfjbz4xwc6mb";
+  };
+
+  # This differs slightly from the default python installPhase in that it pip-installs
+  # "." instead of "*.whl".
+  # That is because while the default install phase succeeds to build the package,
+  # it fails to generate the file "auto_paridecl.pxd".
+  installPhase = ''
+    mkdir -p "$out/lib/${python.libPrefix}/site-packages"
+    export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
+
+    # install "." instead of "*.whl"
+    ${bootstrapped-pip}/bin/pip install --no-index --prefix=$out --no-cache --build=tmpdir .
+  '';
+
+  buildInputs = [
+    pari
+    gmp
+  ];
+
+  propagatedBuildInputs = [
+    cysignals
+    cython
+    six # after 1.1.4: will not be needed
+  ];
+
+  checkPhase = ''
+    make check
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Cython bindings for PARI";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ timokau ];
+    homepage = https://github.com/defeo/cypari2;
+  };
+}
diff --git a/pkgs/development/python-modules/flask-babel/default.nix b/pkgs/development/python-modules/flask-babel/default.nix
new file mode 100644
index 000000000000..1f4f914968f6
--- /dev/null
+++ b/pkgs/development/python-modules/flask-babel/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, buildPythonPackage
+, python
+, fetchPypi
+, flask
+, Babel
+, jinja2
+, pytz
+, speaklater
+}:
+
+buildPythonPackage rec {
+  pname = "Flask-Babel";
+  version = "0.11.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0ff9n165vhf1nhv6807ckhpp224jw7k7sd7jz5kfh3sbpl85gmy0";
+  };
+
+  propagatedBuildInputs = [
+    flask
+    Babel
+    jinja2
+    pytz
+    speaklater
+  ];
+
+  checkPhase = ''
+    ${python.interpreter} -m unittest discover -s tests
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Adds i18n/l10n support to Flask applications";
+    longDescription = ''
+      Implements i18n and l10n support for Flask.
+      This is based on the Python babel module as well as pytz both of which are
+      installed automatically for you if you install this library.
+    '';
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ timokau ];
+    homepage = https://github.com/python-babel/flask-babel;
+  };
+}
diff --git a/pkgs/development/python-modules/flask-silk/default.nix b/pkgs/development/python-modules/flask-silk/default.nix
new file mode 100644
index 000000000000..e494f22a4762
--- /dev/null
+++ b/pkgs/development/python-modules/flask-silk/default.nix
@@ -0,0 +1,26 @@
+{ stdenv
+, buildPythonPackage
+, fetchPypi
+, flask
+}:
+
+buildPythonPackage rec {
+  pname = "Flask-Silk";
+  version = "0.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1gjzighx4f0w39sq9xvzr1kwb4y7yv9qrgzvli1p89gy16piz8l0";
+  };
+
+  propagatedBuildInputs = [
+    flask
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Adds silk icons to your Flask application or module, or extension";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ timokau ];
+    homepage = https://github.com/sublee/flask-silk;
+  };
+}
diff --git a/pkgs/development/python-modules/xdot/default.nix b/pkgs/development/python-modules/xdot/default.nix
index 526376a41632..f9a735c97ab3 100644
--- a/pkgs/development/python-modules/xdot/default.nix
+++ b/pkgs/development/python-modules/xdot/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildPythonPackage, fetchPypi
+{ lib, buildPythonPackage, fetchPypi, isPy3k
 , wrapGAppsHook, gobjectIntrospection, pygobject3, graphviz, gnome3 }:
 
 buildPythonPackage rec {
@@ -10,6 +10,8 @@ buildPythonPackage rec {
     sha256 = "01v9vmgdxz1q2m2vq2b4aqx4ycw7grc0l4is673ygvyg9rk02dx3";
   };
 
+  disabled = !isPy3k;
+
   nativeBuildInputs = [ wrapGAppsHook ];
   propagatedBuildInputs = [ gobjectIntrospection pygobject3 graphviz gnome3.gtk ];
 
diff --git a/pkgs/development/tools/build-managers/gup/build.nix b/pkgs/development/tools/build-managers/gup/build.nix
deleted file mode 100644
index a9af037bb81e..000000000000
--- a/pkgs/development/tools/build-managers/gup/build.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-# NOTE: this file is copied from the upstream repository for this package.
-# Please submit any changes you make here to https://github.com/timbertson/gup/
-
-{ stdenv, lib, python, which, pychecker ? null }:
-{ src, version, meta ? {} }:
-stdenv.mkDerivation {
-  inherit src meta;
-  name = "gup-${version}";
-  buildInputs = lib.remove null [ python which pychecker ];
-  SKIP_PYCHECKER = pychecker == null;
-  buildPhase = "make python";
-  installPhase = ''
-    mkdir $out
-    cp -r python/bin $out/bin
-  '';
-}
diff --git a/pkgs/development/tools/build-managers/gup/default.nix b/pkgs/development/tools/build-managers/gup/default.nix
index 8d1ad4490e98..f6d5b7b9b59c 100644
--- a/pkgs/development/tools/build-managers/gup/default.nix
+++ b/pkgs/development/tools/build-managers/gup/default.nix
@@ -1,21 +1,38 @@
-{ stdenv, fetchFromGitHub, lib, python, which }:
-let
+{ stdenv, fetchFromGitHub, nix-update-source, lib, python, which, pychecker ? null }:
+stdenv.mkDerivation rec {
   version = "0.7.0";
   src = fetchFromGitHub {
-    sha256 = "1pwnmlq2pgkkln9sgz4wlb9dqlqw83bkf105qljnlvggc21zm3pv";
-    rev = "version-${version}";
-    repo = "gup";
     owner = "timbertson";
+    repo = "gup";
+    rev = "version-0.7.0";
+    sha256 = "1pwnmlq2pgkkln9sgz4wlb9dqlqw83bkf105qljnlvggc21zm3pv";
+  };
+  name = "gup-${version}";
+  buildInputs = lib.remove null [ python which pychecker ];
+  SKIP_PYCHECKER = pychecker == null;
+  buildPhase = "make python";
+  installPhase = ''
+    mkdir $out
+    cp -r python/bin $out/bin
+  '';
+  passthru.updateScript = ''
+    set -e
+    echo
+    cd ${toString ./.}
+    ${nix-update-source}/bin/nix-update-source \
+      --prompt version \
+      --replace-attr version \
+      --set owner timbertson \
+      --set repo gup \
+      --set type fetchFromGitHub \
+      --set rev 'version-{version}' \
+      --modify-nix default.nix
+  '';
+  meta = {
+    inherit (src.meta) homepage;
+    description = "A better make, inspired by djb's redo";
+    license = stdenv.lib.licenses.lgpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.timbertson ];
+    platforms = stdenv.lib.platforms.all;
   };
-in
-import ./build.nix
-  { inherit stdenv lib python which; }
-  { inherit src version;
-    meta = {
-      inherit (src.meta) homepage;
-      description = "A better make, inspired by djb's redo";
-      license = stdenv.lib.licenses.lgpl2Plus;
-      maintainers = [ stdenv.lib.maintainers.timbertson ];
-      platforms = stdenv.lib.platforms.all;
-    };
-  }
+}
diff --git a/pkgs/games/gzdoom/default.nix b/pkgs/games/gzdoom/default.nix
index d622299cf0f3..3964eefb9b33 100644
--- a/pkgs/games/gzdoom/default.nix
+++ b/pkgs/games/gzdoom/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   name = "gzdoom-${version}";
-  version = "3.3.0";
+  version = "3.3.2";
 
   src = fetchFromGitHub {
     owner = "coelckers";
     repo = "gzdoom";
     rev = "g${version}";
-    sha256 = "1q1hjfxhksny236a058ys36mpdl434vbmgapqr51n82pia838h2l";
+    sha256 = "0zlkja0jcqi3s4iw5h076iwqxa3haradqksjnx9jxcbkvaw75p3k";
   };
 
   nativeBuildInputs = [ cmake makeWrapper ];
diff --git a/pkgs/servers/asterisk/default.nix b/pkgs/servers/asterisk/default.nix
index c6cd9f3df4c5..10ffa918e5bd 100644
--- a/pkgs/servers/asterisk/default.nix
+++ b/pkgs/servers/asterisk/default.nix
@@ -18,10 +18,6 @@ let
       # This patch changes the runtime behavior to look for state
       # directories in /var rather than ${out}/var.
       ./runtime-vardirs.patch
-      (fetchpatch {
-         url = "http://sources.debian.net/data/main/a/asterisk/1:13.14.1~dfsg-1/debian/patches/pjsip_unresolved_symbol.patch";
-         sha256 = "0i6a6zplvzbjcvxqlmr87jmrfza7c3qx0rlym2nlmzzp2m7qpnfp";
-      })
     ];
 
     # Disable MD5 verification for pjsip
@@ -73,9 +69,9 @@ let
     };
   };
 
-  pjproject-26 = fetchurl {
-    url = http://www.pjsip.org/release/2.6/pjproject-2.6.tar.bz2;
-    sha256 = "1d67c58jn22f7h6smkykk5vwl3sqpc7xi2vm3j3lbn3lq6hisnig";
+  pjproject-27 = fetchurl {
+    url = http://www.pjsip.org/release/2.7.1/pjproject-2.7.1.tar.bz2;
+    sha256 = "09ii5hgl5s7grx4fiimcl3s77i385h7b3kwpfa2q0arbl1ibryjr";
   };
 
   mp3-202 = fetchsvn {
@@ -88,19 +84,19 @@ in
 {
 
   asterisk-lts = common {
-    version = "13.17.1";
-    sha256 = "0d7vqpkz0wv8d17vi7qxs9j7dbqwf4n80s411qva030hljcmdqdf";
+    version = "13.20.0";
+    sha256 = "a3d6d953f844867ea11e0be22ee6225049cd4f5870df6ab23454623bcfbc94d5";
     externals = {
-      "externals_cache/pjproject-2.6.tar.bz2" = pjproject-26;
+      "externals_cache/pjproject-2.7.1.tar.bz2" = pjproject-27;
       "addons/mp3" = mp3-202;
     };
   };
 
   asterisk-stable = common {
-    version = "14.6.1";
-    sha256 = "0xg26p8rx9gw1ym9xdnpxr7bqp0kp76afy7f4ywmh25ki41inz08";
+    version = "15.3.0";
+    sha256 = "f424f89f23b72f267ff9baab82d449bebbbf00c54e54fcd06b8fca13788b012c";
     externals = {
-      "externals_cache/pjproject-2.6.tar.bz2" = pjproject-26;
+      "externals_cache/pjproject-2.7.1.tar.bz2" = pjproject-27;
       "addons/mp3" = mp3-202;
     };
   };
diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix
index bd22aefe2a95..3bdb69391cc4 100644
--- a/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix
+++ b/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix
@@ -5,13 +5,13 @@
 
 stdenv.mkDerivation rec {
   name = "ibus-libpinyin-${version}";
-  version = "1.9.3";
+  version = "1.10.0";
 
   src = fetchFromGitHub {
     owner  = "libpinyin";
     repo   = "ibus-libpinyin";
     rev    = version;
-    sha256 = "02rwddv1lxzk70946v3rjsx1p7hx1d9bnwb7cx406cbws73yb2r9";
+    sha256 = "0zkzz6ig74nws8phqxbsggnpf5g5f2hxi0mdyn2m3s4nm14q3ma6";
   };
 
   buildInputs = [ ibus glib sqlite libpinyin python3 gtk3 db ];
diff --git a/pkgs/tools/misc/dust/default.nix b/pkgs/tools/misc/dust/default.nix
new file mode 100644
index 000000000000..f34d05758cf4
--- /dev/null
+++ b/pkgs/tools/misc/dust/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, cargo, rustPlatform }:
+
+rustPlatform.buildRustPackage rec {
+  name = "dust-${version}";
+  version = "0.2.3";
+
+  src = fetchFromGitHub {
+    owner = "bootandy";
+    repo = "dust";
+    rev = "v${version}";
+    sha256 = "1l8z1daiq2x92449p2ciblcwl0ddgr3vqj2dsd3z8jj3y0z8j51s";
+  };
+
+  cargoSha256 = "0x3ay440vbc64y3pd8zhd119sw8fih0njmkzpr7r8wdw3k48v96m";
+
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "du + rust = dust. Like du but more intuitive";
+    homepage = https://github.com/bootandy/dust;
+    license = licenses.asl20;
+    maintainers = [ maintainers.infinisil ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix
index cbfbf77739ba..1f7d8c549e42 100644
--- a/pkgs/tools/misc/youtube-dl/default.nix
+++ b/pkgs/tools/misc/youtube-dl/default.nix
@@ -16,11 +16,11 @@ with stdenv.lib;
 buildPythonApplication rec {
 
   pname = "youtube-dl";
-  version = "2018.03.26.1";
+  version = "2018.04.16";
 
   src = fetchurl {
     url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz";
-    sha256 = "1sbapwx2zdhprvmljqs6rzxnhiyfpxgin7qyjdrg6h25hhq63vss";
+    sha256 = "046zg8pww2xg1yibh7c1a8jcg8f1znr4hsz1l1da03djcp6na99d";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/tools/package-management/nix-review/default.nix b/pkgs/tools/package-management/nix-review/default.nix
index 2b813638a11a..14b234c4dd5a 100644
--- a/pkgs/tools/package-management/nix-review/default.nix
+++ b/pkgs/tools/package-management/nix-review/default.nix
@@ -7,13 +7,13 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "nix-review";
-  version = "0.1.2";
+  version = "0.2.0";
 
   src = fetchFromGitHub {
     owner = "Mic92";
     repo = "nix-review";
     rev = version;
-    sha256 = "06lj3q6405fw18fq1xg0bm52cwlwx94lx5hn4zpz3rxl5g49wiyz";
+    sha256 = "138f9m2c8fwpvn3kv5q7845ffi1pjbqxcs44aych4832i0pn6jaf";
   };
 
   buildInputs = [ makeWrapper ];
diff --git a/pkgs/tools/package-management/nix-update-source/default.nix b/pkgs/tools/package-management/nix-update-source/default.nix
index a156c4f8a722..fe3cf33b46c8 100644
--- a/pkgs/tools/package-management/nix-update-source/default.nix
+++ b/pkgs/tools/package-management/nix-update-source/default.nix
@@ -1,12 +1,12 @@
 { lib, pkgs, fetchFromGitHub, python3Packages, nix-prefetch-scripts }:
 python3Packages.buildPythonApplication rec {
-  version = "0.4.0";
+  version = "0.5.0";
   name = "nix-update-source-${version}";
   src = fetchFromGitHub {
     owner = "timbertson";
     repo = "nix-update-source";
-    rev = "version-0.4.0";
-    sha256 = "0gz0f7nx1q697s16ya7q84q1cj020n547k2ffb99ds2r40nckr2g";
+    rev = "version-0.5.0";
+    sha256 = "13icwk249frddsmn9albasikwp8asmgvp3jf9xj9adzh63wzh1i7";
   };
   propagatedBuildInputs = [ nix-prefetch-scripts ];
   passthru = {
@@ -23,7 +23,10 @@ python3Packages.buildPythonApplication rec {
         fetchFn = builtins.getAttr json.fetch.fn fetchers;
         src = fetchFn json.fetch.args;
       in
-      json // json.fetch // { inherit src; };
+      json // json.fetch // {
+        inherit src;
+        overrideSrc = drv: lib.overrideDerivation drv (orig: { inherit src; });
+      };
     updateScript = ''
       set -e
       echo
diff --git a/pkgs/tools/typesetting/asciidoctor/default.nix b/pkgs/tools/typesetting/asciidoctor/default.nix
index f8cfe44cbd73..b1fe301775c8 100644
--- a/pkgs/tools/typesetting/asciidoctor/default.nix
+++ b/pkgs/tools/typesetting/asciidoctor/default.nix
@@ -15,7 +15,6 @@ bundlerApp {
     "asciidoctor-latex"
     "asciidoctor-pdf"
     "asciidoctor-safe"
-    "asciidoctor-mathematical"
   ];
 
   gemConfig = {
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 0a844693fe3b..5bd83347ab09 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3110,6 +3110,8 @@ with pkgs;
 
   jmespath = callPackage ../development/tools/jmespath { };
 
+  jmol = callPackage ../applications/science/chemistry/jmol { };
+
   jmtpfs = callPackage ../tools/filesystems/jmtpfs { };
 
   jnettop = callPackage ../tools/networking/jnettop { };
@@ -15272,6 +15274,8 @@ with pkgs;
 
   dunst = callPackage ../applications/misc/dunst { };
 
+  du-dust = callPackage ../tools/misc/dust { };
+
   devede = callPackage ../applications/video/devede { };
 
   denemo = callPackage ../applications/audio/denemo {
@@ -19862,6 +19866,8 @@ with pkgs;
 
   cliquer = callPackage ../development/libraries/science/math/cliquer { };
 
+  flintqs = callPackage ../development/libraries/science/math/flintqs { };
+
   jags = callPackage ../applications/science/math/jags { };
 
 
@@ -19903,6 +19909,8 @@ with pkgs;
     docs = true;
   };
 
+  lcalc = callPackage ../development/libraries/science/math/lcalc { };
+
   lrcalc = callPackage ../applications/science/math/lrcalc { };
 
   lie = callPackage ../applications/science/math/LiE { };
@@ -19917,6 +19925,8 @@ with pkgs;
 
   nauty = callPackage ../applications/science/math/nauty {};
 
+  rubiks = callPackage ../development/libraries/science/math/rubiks { };
+
   petsc = callPackage ../development/libraries/science/math/petsc { };
 
   sage = callPackage ../applications/science/math/sage { };
@@ -20266,6 +20276,8 @@ with pkgs;
   gp2c = callPackage ../applications/science/math/pari/gp2c.nix { };
   pari-unstable = callPackage ../applications/science/math/pari/unstable.nix {};
 
+  palp = callPackage ../applications/science/math/palp { };
+
   ratpoints = callPackage ../applications/science/math/ratpoints {};
 
   calc = callPackage ../applications/science/math/calc { };
@@ -20278,6 +20290,8 @@ with pkgs;
     inherit (gnome3) gtksourceview;
   };
 
+  pynac = callPackage ../applications/science/math/pynac { };
+
   singular = callPackage ../applications/science/math/singular { };
 
   scilab = callPackage ../applications/science/math/scilab {
@@ -21343,6 +21357,8 @@ with pkgs;
 
   mmark = callPackage ../tools/typesetting/mmark { };
 
+  wire-desktop = callPackage ../applications/networking/instant-messengers/wire-desktop { };
+
   # Unix tools
   unixtools = recurseIntoAttrs (callPackages ./unix-tools.nix { });
   inherit (unixtools) hexdump ps logger eject umount
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 93e821fb719d..5b1877875344 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1190,6 +1190,8 @@ in {
 
   cysignals = callPackage ../development/python-modules/cysignals { };
 
+  cypari2 = callPackage ../development/python-modules/cypari2 { };
+
   dlib = buildPythonPackage rec {
     inherit (pkgs.dlib) name src nativeBuildInputs meta;
 
@@ -5531,6 +5533,8 @@ in {
 
   flask_assets = callPackage ../development/python-modules/flask-assets { };
 
+  flask-babel = callPackage ../development/python-modules/flask-babel { };
+
   flask_cache = buildPythonPackage rec {
     name = "Flask-Cache-0.13.1";
 
@@ -5580,6 +5584,8 @@ in {
 
   flask_script = callPackage ../development/python-modules/flask-script { };
 
+  flask-silk = callPackage ../development/python-modules/flask-silk { };
+
   flask_sqlalchemy = buildPythonPackage rec {
     name = "Flask-SQLAlchemy-${version}";
     version = "2.1";