summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/gcc/4.5/default.nix42
-rw-r--r--pkgs/development/compilers/gcc/4.6/builder.sh262
-rw-r--r--pkgs/development/compilers/gcc/4.6/default.nix530
-rw-r--r--pkgs/development/compilers/gcc/4.6/ghdl-ortho-cflags.patch111
-rw-r--r--pkgs/development/compilers/gcc/4.6/hurd-sigrtmin.patch14
-rw-r--r--pkgs/development/compilers/gcc/4.6/no-sys-dirs.patch54
-rw-r--r--pkgs/development/compilers/gcc/4.6/sources.nix27
-rw-r--r--pkgs/development/compilers/gcc/4.8/default.nix55
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix49
-rw-r--r--pkgs/development/compilers/gcc/5/default.nix55
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix55
-rw-r--r--pkgs/development/compilers/gcc/builder.sh21
-rw-r--r--pkgs/development/compilers/llvm/3.8/clang/default.nix8
-rw-r--r--pkgs/development/compilers/llvm/3.9/clang/default.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.9/libc++/default.nix3
-rw-r--r--pkgs/development/compilers/llvm/3.9/lldb.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.9/llvm-outputs.patch26
-rw-r--r--pkgs/development/compilers/llvm/3.9/llvm.nix21
-rw-r--r--pkgs/development/interpreters/python/cpython/2.6/default.nix13
-rw-r--r--pkgs/development/interpreters/python/cpython/2.7/default.nix23
-rw-r--r--pkgs/development/interpreters/python/cpython/3.3/default.nix14
-rw-r--r--pkgs/development/interpreters/python/cpython/3.4/default.nix17
-rw-r--r--pkgs/development/interpreters/python/cpython/3.5/default.nix17
-rw-r--r--pkgs/development/interpreters/python/cpython/3.6/default.nix21
-rw-r--r--pkgs/development/interpreters/python/pypy/2.7/default.nix11
-rw-r--r--pkgs/development/libraries/db/clang-5.3.patch142
-rw-r--r--pkgs/development/libraries/db/db-5.3.nix5
-rw-r--r--pkgs/development/libraries/glib-networking/default.nix6
-rw-r--r--pkgs/development/libraries/glib/default.nix10
-rw-r--r--pkgs/development/libraries/glibc/common.nix2
-rw-r--r--pkgs/development/libraries/glibc/default.nix3
-rw-r--r--pkgs/development/libraries/glibmm/default.nix6
-rw-r--r--pkgs/development/libraries/gobject-introspection/default.nix4
-rw-r--r--pkgs/development/libraries/gtk+/2.x.nix2
-rw-r--r--pkgs/development/libraries/gtk+/3.x.nix6
-rw-r--r--pkgs/development/libraries/gtkmm/2.x.nix2
-rw-r--r--pkgs/development/libraries/gtkmm/gtkmm-2.24.4-missing-operator.patch11
-rw-r--r--pkgs/development/libraries/kde-frameworks/default.nix2
-rw-r--r--pkgs/development/libraries/kde-frameworks/fetch.sh2
-rw-r--r--pkgs/development/libraries/kde-frameworks/kglobalaccel.nix14
-rw-r--r--pkgs/development/libraries/kde-frameworks/kservice/default.nix5
-rw-r--r--pkgs/development/libraries/kde-frameworks/solid.nix9
-rw-r--r--pkgs/development/libraries/kde-frameworks/srcs.nix578
-rw-r--r--pkgs/development/libraries/libcaca/default.nix6
-rw-r--r--pkgs/development/libraries/libevent/default.nix32
-rw-r--r--pkgs/development/libraries/libsigcxx/default.nix4
-rw-r--r--pkgs/development/libraries/libusb1/default.nix4
-rw-r--r--pkgs/development/libraries/libxslt/default.nix19
-rw-r--r--pkgs/development/libraries/mesa/default.nix4
-rw-r--r--pkgs/development/libraries/nettle/default.nix4
-rw-r--r--pkgs/development/libraries/nghttp2/default.nix4
-rw-r--r--pkgs/development/libraries/pcre/CVE-2016-1283.patch18
-rw-r--r--pkgs/development/libraries/pcre/default.nix8
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/default.nix6
-rw-r--r--pkgs/development/libraries/qt-5/5.6/qtbase/default.nix6
-rw-r--r--pkgs/development/libraries/qt-5/5.7/qtbase/default.nix4
-rw-r--r--pkgs/development/libraries/readline/7.0.nix66
-rw-r--r--pkgs/development/libraries/udns/default.nix2
-rw-r--r--pkgs/development/tools/analysis/rr/default.nix4
-rw-r--r--pkgs/development/tools/documentation/gtk-doc/default.nix2
-rw-r--r--pkgs/development/tools/misc/help2man/default.nix2
-rw-r--r--pkgs/development/tools/misc/texinfo/6.3.nix (renamed from pkgs/development/tools/misc/texinfo/6.1.nix)4
-rw-r--r--pkgs/development/tools/parsing/flex/default.nix8
63 files changed, 882 insertions, 1585 deletions
diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix
index 5d05410a7fda..12e7e23e90b6 100644
--- a/pkgs/development/compilers/gcc/4.5/default.nix
+++ b/pkgs/development/compilers/gcc/4.5/default.nix
@@ -332,28 +332,26 @@ stdenv.mkDerivation ({
   #
   # Likewise, the LTO code doesn't find zlib.
 
-  CPATH = concatStrings
-            (intersperse ":" (map (x: "${x.dev or x}/include")
-                                  (optionals (zlib != null) [ zlib ]
-                                   ++ optionals langJava [ boehmgc ]
-                                   ++ optionals javaAwtGtk xlibs
-                                   ++ optionals javaAwtGtk [ gmp mpfr ]
-                                   ++ optional (libpthread != null) libpthread
-                                   ++ optional (libpthreadCross != null) libpthreadCross
-
-                                   # On GNU/Hurd glibc refers to Mach & Hurd
-                                   # headers.
-                                   ++ optionals (libcCross != null &&
-                                                 hasAttr "propagatedBuildInputs" libcCross)
-                                        libcCross.propagatedBuildInputs)));
-
-  LIBRARY_PATH = concatStrings
-                   (intersperse ":" (map (x: x + "/lib")
-                                         (optionals (zlib != null) [ zlib ]
-                                          ++ optionals langJava [ boehmgc ]
-                                          ++ optionals javaAwtGtk xlibs
-                                          ++ optionals javaAwtGtk [ gmp mpfr ]
-                                          ++ optional (libpthread != null) libpthread)));
+  CPATH = makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+    ++ optional (libpthread != null) libpthread
+    ++ optional (libpthreadCross != null) libpthreadCross
+
+    # On GNU/Hurd glibc refers to Mach & Hurd
+    # headers.
+    ++ optionals (libcCross != null &&
+                  hasAttr "propagatedBuildInputs" libcCross)
+                 libcCross.propagatedBuildInputs);
+
+  LIBRARY_PATH = makeLibraryPath ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+    ++ optional (libpthread != null) libpthread);
 
   EXTRA_TARGET_CFLAGS =
     if cross != null && libcCross != null then [
diff --git a/pkgs/development/compilers/gcc/4.6/builder.sh b/pkgs/development/compilers/gcc/4.6/builder.sh
deleted file mode 100644
index 6087bb30cfb2..000000000000
--- a/pkgs/development/compilers/gcc/4.6/builder.sh
+++ /dev/null
@@ -1,262 +0,0 @@
-source $stdenv/setup
-
-
-export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
-mkdir $NIX_FIXINC_DUMMY
-
-
-if test "$staticCompiler" = "1"; then
-    EXTRA_LDFLAGS="-static"
-else
-    EXTRA_LDFLAGS="-Wl,-rpath,$lib/lib"
-fi
-
-
-# GCC interprets empty paths as ".", which we don't want.
-if test -z "$CPATH"; then unset CPATH; fi
-if test -z "$LIBRARY_PATH"; then unset LIBRARY_PATH; fi
-echo "\$CPATH is \`$CPATH'"
-echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
-
-if test "$noSysDirs" = "1"; then
-
-    if test -e $NIX_CC/nix-support/orig-libc; then
-
-        # Figure out what extra flags to pass to the gcc compilers
-        # being generated to make sure that they use our glibc.
-        extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
-        extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
-
-        # Use *real* header files, otherwise a limits.h is generated
-        # that does not include Glibc's limits.h (notably missing
-        # SSIZE_MAX, which breaks the build).
-        export NIX_FIXINC_DUMMY=$libc_dev/include
-
-        # The path to the Glibc binaries such as `crti.o'.
-        glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
-
-    else
-        # Hack: support impure environments.
-        extraFlags="-isystem /usr/include"
-        extraLDFlags="-L/usr/lib64 -L/usr/lib"
-        glibc_libdir="/usr/lib"
-        export NIX_FIXINC_DUMMY=/usr/include
-    fi
-
-    extraFlags="-I$NIX_FIXINC_DUMMY $extraFlags"
-    extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
-
-    # BOOT_CFLAGS defaults to `-g -O2'; since we override it below,
-    # make sure to explictly add them so that files compiled with the
-    # bootstrap compiler are optimized and (optionally) contain
-    # debugging information (info "(gccinstall) Building").
-    if test -n "$dontStrip"; then
-        extraFlags="-O2 -g $extraFlags"
-    else
-        # Don't pass `-g' at all; this saves space while building.
-        extraFlags="-O2 $extraFlags"
-    fi
-
-    EXTRA_FLAGS="$extraFlags"
-    for i in $extraLDFlags; do
-        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,$i"
-    done
-
-    if test -n "$targetConfig"; then
-        # Cross-compiling, we need gcc not to read ./specs in order to build
-        # the g++ compiler (after the specs for the cross-gcc are created).
-        # Having LIBRARY_PATH= makes gcc read the specs from ., and the build
-        # breaks. Having this variable comes from the default.nix code to bring
-        # gcj in.
-        unset LIBRARY_PATH
-        unset CPATH
-        if test -z "$crossStageStatic"; then
-            EXTRA_TARGET_CFLAGS="-B${libcCross}/lib -idirafter ${libcCross}/include"
-            EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
-        fi
-    else
-        if test -z "$NIX_CC_CROSS"; then
-            EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
-            EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
-        else
-            # This the case of cross-building the gcc.
-            # We need special flags for the target, different than those of the build
-            # Assertion:
-            test -e $NIX_CC_CROSS/nix-support/orig-libc
-
-            # Figure out what extra flags to pass to the gcc compilers
-            # being generated to make sure that they use our glibc.
-            extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
-            extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
-
-            # Use *real* header files, otherwise a limits.h is generated
-            # that does not include Glibc's limits.h (notably missing
-            # SSIZE_MAX, which breaks the build).
-            NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
-
-            # The path to the Glibc binaries such as `crti.o'.
-            glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
-
-            extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
-            extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
-
-            EXTRA_TARGET_CFLAGS="$extraFlags"
-            for i in $extraLDFlags; do
-                EXTRA_TARGET_LDFLAGS="$EXTRA_TARGET_LDFLAGS -Wl,$i"
-            done
-        fi
-    fi
-
-
-    # CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
-    # the startfiles.
-    # FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
-    # for the startfiles.
-    makeFlagsArray=( \
-        "${makeFlagsArray[@]}" \
-        NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
-        SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
-        CFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
-        CFLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
-        FLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
-        LDFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
-        LDFLAGS_FOR_TARGET="$EXTRA_TARGET_LDFLAGS $EXTRA_TARGET_LDFLAGS" \
-        )
-
-    if test -z "$targetConfig"; then
-        makeFlagsArray=( \
-            "${makeFlagsArray[@]}" \
-            BOOT_CFLAGS="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
-            BOOT_LDFLAGS="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
-            )
-    fi
-
-    if test -n "$targetConfig" -a "$crossStageStatic" == 1; then
-        # We don't want the gcc build to assume there will be a libc providing
-        # limits.h in this stagae
-        makeFlagsArray=( \
-            "${makeFlagsArray[@]}" \
-            LIMITS_H_TEST=false \
-            )
-    else
-        makeFlagsArray=( \
-            "${makeFlagsArray[@]}" \
-            LIMITS_H_TEST=true \
-            )
-    fi
-fi
-
-if test -n "$targetConfig"; then
-    # The host strip will destroy some important details of the objects
-    dontStrip=1
-fi
-
-
-preConfigure() {
-    if test -n "$newlibSrc"; then
-        tar xvf "$newlibSrc" -C ..
-        ln -s ../newlib-*/newlib newlib
-        # Patch to get armvt5el working:
-        sed -i -e 's/ arm)/ arm*)/' newlib/configure.host
-    fi
-    # Bug - they packaged zlib
-    if test -d "zlib"; then
-        # This breaks the build without-headers, which should build only
-        # the target libgcc as target libraries.
-        # See 'configure:5370'
-        rm -Rf zlib
-    fi
-
-    if test -f "$NIX_CC/nix-support/orig-libc"; then
-        # Patch the configure script so it finds glibc headers.  It's
-        # important for example in order not to get libssp built,
-        # because its functionality is in glibc already.
-        sed -i \
-            -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$libc_dev/include", \
-            gcc/configure
-    fi
-
-    if test -n "$crossMingw" -a -n "$crossStageStatic"; then
-        mkdir -p ../mingw
-        # --with-build-sysroot expects that:
-        cp -R $libcCross/include ../mingw
-        configureFlags="$configureFlags --with-build-sysroot=`pwd`/.."
-    fi
-
-    # Perform the build in a different directory.
-    mkdir ../build
-    cd ../build
-    configureScript=../$sourceRoot/configure
-}
-
-
-postConfigure() {
-    # Don't store the configure flags in the resulting executables.
-    sed -e '/TOPLEVEL_CONFIGURE_ARGUMENTS=/d' -i Makefile
-}
-
-
-preInstall() {
-    # Make ‘lib64’ a symlink to ‘lib’.
-    if [ -n "$is64bit" -a -z "$enableMultilib" ]; then
-        mkdir -p $out/lib
-        ln -s lib $out/lib64
-    fi
-}
-
-
-postInstall() {
-    # Move runtime libraries to $lib.
-    mkdir -p $lib/lib
-    ln -s lib $lib/lib64
-    moveToOutput "lib/lib*.so"        "$lib"
-    moveToOutput "lib/lib*.so.*[0-9]" "$lib"
-    moveToOutput "lib/*.la"           "$lib"
-    for i in $lib/lib/*.la; do
-        substituteInPlace $i --replace $out $lib
-    done
-
-    # Remove precompiled headers for now.  They are very big and
-    # probably not very useful yet.
-    find $out/include -name "*.gch" -exec rm -rf {} \; -prune
-
-    # Remove `fixincl' to prevent a retained dependency on the
-    # previous gcc.
-    rm -rf $out/libexec/gcc/*/*/install-tools
-    rm -rf $out/lib/gcc/*/*/install-tools
-
-    # More dependencies with the previous gcc or some libs (gccbug stores the build command line)
-    rm -rf $out/bin/gccbug
-
-    # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
-    for i in $out/libexec/gcc/*/*/*; do
-        if PREV_RPATH=`patchelf --print-rpath $i`; then
-            patchelf --set-rpath `echo $PREV_RPATH | sed 's,:[^:]*bootstrap-tools/lib,,'` $i
-        fi
-    done
-
-    # Get rid of some "fixed" header files
-    rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux}
-
-    # Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks.
-    for i in $out/bin/*-gcc*; do
-        if cmp -s $out/bin/gcc $i; then
-            ln -sfn gcc $i
-        fi
-    done
-
-    for i in $out/bin/c++ $out/bin/*-c++* $out/bin/*-g++*; do
-        if cmp -s $out/bin/g++ $i; then
-            ln -sfn g++ $i
-        fi
-    done
-
-    # Disable RANDMMAP on grsec, which causes segfaults when using
-    # precompiled headers.
-    # See https://bugs.gentoo.org/show_bug.cgi?id=301299#c31
-    paxmark r $out/libexec/gcc/*/*/{cc1,cc1plus}
-
-    eval "$postInstallGhdl"
-}
-
-genericBuild
diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix
deleted file mode 100644
index 991d4fc883fb..000000000000
--- a/pkgs/development/compilers/gcc/4.6/default.nix
+++ /dev/null
@@ -1,530 +0,0 @@
-{ stdenv, fetchurl, noSysDirs
-, langC ? true, langCC ? true, langFortran ? false
-, langJava ? false
-, langAda ? false
-, langVhdl ? false
-, langGo ? false
-, profiledCompiler ? false
-, staticCompiler ? false
-, enableShared ? true
-, texinfo ? null
-, perl ? null # optional, for texi2pod (then pod2man); required for Java
-, gmp, mpfr, libmpc, gettext, which
-, libelf                      # optional, for link-time optimizations (LTO)
-, ppl ? null, cloog ? null # optional, for the Graphite optimization framework.
-, zlib ? null, boehmgc ? null
-, zip ? null, unzip ? null, pkgconfig ? null, gtk2 ? null, libart_lgpl ? null
-, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
-, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
-, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
-, gnatboot ? null
-, enableMultilib ? false
-, enablePlugin ? true             # whether to support user-supplied plug-ins
-, name ? "gcc"
-, cross ? null
-, binutilsCross ? null
-, libcCross ? null
-, crossStageStatic ? true
-, gnat ? null
-, libpthread ? null, libpthreadCross ? null  # required for GNU/Hurd
-, stripped ? true
-, gnused ? null
-}:
-
-assert langJava     -> zip != null && unzip != null
-                       && zlib != null && boehmgc != null
-                       && perl != null;  # for `--enable-java-home'
-assert langAda      -> gnatboot != null;
-assert langVhdl     -> gnat != null;
-
-# LTO needs libelf and zlib.
-assert libelf != null -> zlib != null;
-
-# Make sure we get GNU sed.
-assert stdenv.isDarwin -> gnused != null;
-
-with stdenv.lib;
-with builtins;
-
-let version = "4.6.4";
-
-    # Whether building a cross-compiler for GNU/Hurd.
-    crossGNU = cross != null && cross.config == "i586-pc-gnu";
-
-    patches = [ ]
-      ++ optional (cross != null) ../libstdc++-target.patch
-      ++ optional noSysDirs ./no-sys-dirs.patch
-      # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
-      # target libraries and tools.
-      ++ optional langAda ../gnat-cflags.patch
-      ++ optional langVhdl ./ghdl-ortho-cflags.patch
-      ++ optional langFortran ../gfortran-driving.patch
-      ++ optional (stdenv.isGNU || crossGNU) ./hurd-sigrtmin.patch;
-
-    javaEcj = fetchurl {
-      # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
-      # `configure' time.
-
-      # XXX: Eventually we might want to take it from upstream.
-      url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
-      sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
-    };
-
-    # Antlr (optional) allows the Java `gjdoc' tool to be built.  We want a
-    # binary distribution here to allow the whole chain to be bootstrapped.
-    javaAntlr = fetchurl {
-      url = http://www.antlr.org/download/antlr-3.1.3.jar;
-      sha256 = "1f41j0y4kjydl71lqlvr73yagrs2jsg1fjymzjz66mjy7al5lh09";
-    };
-
-    xlibs = [
-      libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
-      xproto renderproto xextproto inputproto randrproto
-    ];
-
-    javaAwtGtk = langJava && gtk2 != null;
-
-    /* Platform flags */
-    platformFlags = let
-        gccArch = stdenv.lib.attrByPath [ "platform" "gcc" "arch" ] null stdenv;
-        gccCpu = stdenv.lib.attrByPath [ "platform" "gcc" "cpu" ] null stdenv;
-        gccAbi = stdenv.lib.attrByPath [ "platform" "gcc" "abi" ] null stdenv;
-        gccFpu = stdenv.lib.attrByPath [ "platform" "gcc" "fpu" ] null stdenv;
-        gccFloat = stdenv.lib.attrByPath [ "platform" "gcc" "float" ] null stdenv;
-        withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
-        withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
-        withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
-        withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
-        withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
-      in
-        (withArch +
-        withCpu +
-        withAbi +
-        withFpu +
-        withFloat);
-
-    /* Cross-gcc settings */
-    crossMingw = (cross != null && cross.libc == "msvcrt");
-    crossConfigureFlags = let
-        gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
-        gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
-        gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross;
-        gccFpu = stdenv.lib.attrByPath [ "gcc" "fpu" ] null cross;
-        withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
-        withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
-        withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
-        withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
-      in
-        "--target=${cross.config}" +
-        withArch +
-        withCpu +
-        withAbi +
-        withFpu +
-        (if crossMingw && crossStageStatic then
-          " --with-headers=${libcCross}/include" +
-          " --with-gcc" +
-          " --with-gnu-as" +
-          " --with-gnu-ld" +
-          " --with-gnu-ld" +
-          " --disable-shared" +
-          " --disable-nls" +
-          " --disable-debug" +
-          " --enable-sjlj-exceptions" +
-          " --enable-threads=win32" +
-          " --disable-win32-registry"
-          else if crossStageStatic then
-          " --disable-libssp --disable-nls" +
-          " --without-headers" +
-          " --disable-threads " +
-          " --disable-libmudflap " +
-          " --disable-libgomp " +
-          " --disable-libquadmath" +
-          " --disable-shared" +
-          " --disable-decimal-float" # libdecnumber requires libc
-          else
-          " --with-headers=${libcCross}/include" +
-          " --enable-__cxa_atexit" +
-          " --enable-long-long" +
-          (if crossMingw then
-            " --enable-threads=win32" +
-            " --enable-sjlj-exceptions" +
-            " --enable-hash-synchronization" +
-            " --disable-libssp" +
-            " --disable-nls" +
-            " --with-dwarf2" +
-            # I think noone uses shared gcc libs in mingw, so we better do the same.
-            # In any case, mingw32 g++ linking is broken by default with shared libs,
-            # unless adding "-lsupc++" to any linking command. I don't know why.
-            " --disable-shared" +
-            # To keep ABI compatibility with upstream mingw-w64
-            " --enable-fully-dynamic-string"
-            else (if cross.libc == "uclibc" then
-              # In uclibc cases, libgomp needs an additional '-ldl'
-              # and as I don't know how to pass it, I disable libgomp.
-              " --disable-libgomp" else "") +
-            " --enable-threads=posix" +
-            " --enable-nls" +
-            " --disable-decimal-float") # No final libdecnumber (it may work only in 386)
-          );
-    stageNameAddon = if crossStageStatic then "-stage-static" else
-      "-stage-final";
-    crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
-
-    bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips && !stdenv.isDarwin;
-
-in
-
-# We need all these X libraries when building AWT with GTK+.
-assert gtk2 != null -> (filter (x: x == null) xlibs) == [];
-
-stdenv.mkDerivation ({
-  name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
-
-  builder = ./builder.sh;
-
-  srcs = (import ./sources.nix) {
-    inherit fetchurl optional version;
-    inherit langC langCC langFortran langJava langAda langGo;
-  };
-
-  outputs = [ "out" "lib" ];
-
-  setOutputFlags = false;
-
-  inherit patches enableMultilib;
-
-  hardeningDisable = [ "format" ];
-
-  libc_dev = stdenv.cc.libc_dev;
-
-  postPatch =
-    if (stdenv.isGNU
-        || (libcCross != null                  # e.g., building `gcc.crossDrv'
-            && libcCross ? crossConfig
-            && libcCross.crossConfig == "i586-pc-gnu")
-        || (crossGNU && libcCross != null))
-    then
-      # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not
-      # in glibc, so add the right `-I' flags to the default spec string.
-      assert libcCross != null -> libpthreadCross != null;
-      let
-        libc = if libcCross != null then libcCross else stdenv.glibc;
-        gnu_h = "gcc/config/gnu.h";
-        i386_gnu_h = "gcc/config/i386/gnu.h";
-        extraCPPDeps =
-             libc.propagatedBuildInputs
-          ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross
-          ++ stdenv.lib.optional (libpthread != null) libpthread;
-        extraCPPSpec =
-          concatStrings (intersperse " "
-                          (map (x: "-I${x.dev or x}/include") extraCPPDeps));
-        extraLibSpec =
-          if libpthreadCross != null
-          then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
-          else "-L${libpthread}/lib";
-      in
-        '' echo "augmenting \`CPP_SPEC' in \`${i386_gnu_h}' with \`${extraCPPSpec}'..."
-           sed -i "${i386_gnu_h}" \
-               -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g'
-
-           echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..."
-           sed -i "${gnu_h}" \
-               -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
-
-           echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..."
-           sed -i "${gnu_h}" \
-               -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g'
-           sed -i gcc/config/t-gnu \
-               -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc.dev}/include|g'
-        ''
-    else if cross != null || stdenv.cc.libc != null then
-      # On NixOS, use the right path to the dynamic linker instead of
-      # `/lib/ld*.so'.
-      let
-        libc = if libcCross != null then libcCross else stdenv.cc.libc;
-      in
-        '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
-           for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
-           do
-             grep -q LIBC_DYNAMIC_LINKER "$header" || continue
-             echo "  fixing \`$header'..."
-             sed -i "$header" \
-                 -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
-           done
-        ''
-    else null;
-
-  inherit noSysDirs staticCompiler langJava crossStageStatic
-    libcCross crossMingw;
-
-  nativeBuildInputs = [ texinfo which gettext ]
-    ++ (optional (perl != null) perl)
-    ++ (optional javaAwtGtk pkgconfig);
-
-  buildInputs = [ gmp mpfr libmpc libelf ]
-    ++ (optional (ppl != null) ppl)
-    ++ (optional (cloog != null) cloog)
-    ++ (optional (zlib != null) zlib)
-    ++ (optionals langJava [ boehmgc zip unzip ])
-    ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
-    ++ (optionals (cross != null) [binutilsCross])
-    ++ (optionals langAda [gnatboot])
-    ++ (optionals langVhdl [gnat])
-
-    # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
-    # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
-    ++ (optional stdenv.isDarwin gnused)
-    ;
-
-  configureFlagsArray = stdenv.lib.optionals
-    (ppl != null && ppl ? dontDisableStatic && ppl.dontDisableStatic)
-        [ "--with-host-libstdcxx=-lstdc++ -lgcc_s" ];
-
-  configureFlags = "
-    ${if enableMultilib then "--disable-libquadmath" else "--disable-multilib"}
-    ${if enableShared then "" else "--disable-shared"}
-    ${if enablePlugin then "--enable-plugin" else ""}
-    ${if ppl != null then "--with-ppl=${ppl}" else ""}
-    ${if cloog != null then
-      "--with-cloog=${cloog} --enable-cloog-backend=isl"
-      else ""}
-    ${if langJava then
-      "--with-ecj-jar=${javaEcj} " +
-
-      # Follow Sun's layout for the convenience of IcedTea/OpenJDK.  See
-      # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
-      "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
-      else ""}
-    ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
-    ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
-    --with-gmp=${gmp.dev}
-    --with-mpfr=${mpfr.dev}
-    --with-mpc=${libmpc}
-    ${if libelf != null then "--with-libelf=${libelf}" else ""}
-    --disable-libstdcxx-pch
-    --without-included-gettext
-    --with-system-zlib
-    --enable-languages=${
-      concatStrings (intersperse ","
-        (  optional langC        "c"
-        ++ optional langCC       "c++"
-        ++ optional langFortran  "fortran"
-        ++ optional langJava     "java"
-        ++ optional langAda      "ada"
-        ++ optional langVhdl     "vhdl"
-        ++ optional langGo       "go"
-        )
-      )
-    }
-    ${if langAda then " --enable-libada" else ""}
-    ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
-    ${if cross != null then crossConfigureFlags else ""}
-    ${if !bootstrap then "--disable-bootstrap" else ""}
-    ${if cross == null then platformFlags else ""}
-  ";
-
-  targetConfig = if cross != null then cross.config else null;
-
-  buildFlags = if bootstrap then
-    (if profiledCompiler then "profiledbootstrap" else "bootstrap")
-    else "";
-
-  installTargets =
-    if stripped
-    then "install-strip"
-    else "install";
-
-  crossAttrs = {
-    patches = patches ++ [ ./hurd-sigrtmin.patch ];
-    postPatch = "";
-    AR = "${stdenv.cross.config}-ar";
-    LD = "${stdenv.cross.config}-ld";
-    CC = "${stdenv.cross.config}-gcc";
-    CXX = "${stdenv.cross.config}-gcc";
-    AR_FOR_TARGET = "${stdenv.cross.config}-ar";
-    LD_FOR_TARGET = "${stdenv.cross.config}-ld";
-    CC_FOR_TARGET = "${stdenv.cross.config}-gcc";
-    NM_FOR_TARGET = "${stdenv.cross.config}-nm";
-    CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
-    # If we are making a cross compiler, cross != null
-    NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
-    dontStrip = true;
-    configureFlags = ''
-      ${if enableMultilib then "" else "--disable-multilib"}
-      ${if enableShared then "" else "--disable-shared"}
-      ${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
-      ${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" else ""}
-      ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
-      ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
-      ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
-      --with-gmp=${gmp.crossDrv}
-      --with-mpfr=${mpfr.crossDrv}
-      --with-mpc=${libmpc.crossDrv}
-      --disable-libstdcxx-pch
-      --without-included-gettext
-      --with-system-zlib
-      --enable-languages=${
-        concatStrings (intersperse ","
-          (  optional langC        "c"
-          ++ optional langCC       "c++"
-          ++ optional langFortran  "fortran"
-          ++ optional langJava     "java"
-          ++ optional langAda      "ada"
-          ++ optional langVhdl     "vhdl"
-          ++ optional langGo       "go"
-          )
-        )
-      }
-      ${if langAda then " --enable-libada" else ""}
-      ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
-      ${if cross != null then crossConfigureFlags else ""}
-      --target=${stdenv.cross.config}
-    '';
-    buildFlags = "";
-  };
-
-
-  # Needed for the cross compilation to work
-  AR = "ar";
-  LD = "ld";
-  CC = "gcc";
-
-  # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
-  # the library headers and binaries, regarless of the language being
-  # compiled.
-
-  # Note: When building the Java AWT GTK+ peer, the build system doesn't
-  # honor `--with-gmp' et al., e.g., when building
-  # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just
-  # add them to $CPATH and $LIBRARY_PATH in this case.
-  #
-  # Likewise, the LTO code doesn't find zlib.
-
-  CPATH = concatStrings
-            (intersperse ":" (map (x: "${x.dev or x}/include")
-                                  (optionals (zlib != null) [ zlib ]
-                                   ++ optionals langJava [ boehmgc ]
-                                   ++ optionals javaAwtGtk xlibs
-                                   ++ optionals javaAwtGtk [ gmp mpfr ]
-                                   ++ optional (libpthread != null) libpthread
-                                   ++ optional (libpthreadCross != null) libpthreadCross
-
-                                   # On GNU/Hurd glibc refers to Mach & Hurd
-                                   # headers.
-                                   ++ optionals (libcCross != null &&
-                                                 hasAttr "propagatedBuildInputs" libcCross)
-                                        libcCross.propagatedBuildInputs)));
-
-  LIBRARY_PATH = concatStrings
-                   (intersperse ":" (map (x: x + "/lib")
-                                         (optionals (zlib != null) [ zlib ]
-                                          ++ optionals langJava [ boehmgc ]
-                                          ++ optionals javaAwtGtk xlibs
-                                          ++ optionals javaAwtGtk [ gmp mpfr ]
-                                          ++ optional (libpthread != null) libpthread)));
-
-  EXTRA_TARGET_CFLAGS =
-    if cross != null && libcCross != null then [
-        "-idirafter ${libcCross.dev}/include"
-      ]
-      ++ optionals (! crossStageStatic) [
-        "-B${libcCross.out}/lib"
-      ]
-    else null;
-
-  EXTRA_TARGET_LDFLAGS =
-    if cross != null && libcCross != null then [
-        "-Wl,-L${libcCross.out}/lib"
-      ]
-      ++ (if crossStageStatic then [
-        "-B${libcCross.out}/lib"
-      ] else [
-        "-Wl,-rpath,${libcCross.out}/lib"
-        "-Wl,-rpath-link,${libcCross.out}/lib"
-      ])
-      ++ optionals (libpthreadCross != null) [
-        "-L${libpthreadCross}/lib"
-        "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
-      ]
-    else null;
-
-  passthru = { inherit langC langCC langAda langFortran langVhdl
-      langGo version; isGNU = true; };
-
-  enableParallelBuilding = false;
-
-  inherit (stdenv) is64bit;
-
-  meta = {
-    homepage = http://gcc.gnu.org/;
-    license = stdenv.lib.licenses.gpl3Plus;  # runtime support libraries are typically LGPLv3+
-    description = "GNU Compiler Collection, version ${version}"
-      + (if stripped then "" else " (with debugging info)");
-
-    longDescription = ''
-      The GNU Compiler Collection includes compiler front ends for C, C++,
-      Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
-      as libraries for these languages (libstdc++, libgcj, libgomp,...).
-
-      GCC development is a part of the GNU Project, aiming to improve the
-      compiler used in the GNU system including the GNU/Linux variant.
-    '';
-
-    maintainers = [
-      stdenv.lib.maintainers.viric
-    ];
-
-    # Volunteers needed for the {Cyg,Dar}win ports of *PPL.
-    # gnatboot is not available out of linux platforms, so we disable the darwin build
-    # for the gnat (ada compiler).
-    platforms =
-      stdenv.lib.platforms.linux ++
-      stdenv.lib.platforms.freebsd ++
-      optionals (langAda == false) stdenv.lib.platforms.darwin;
-  };
-}
-
-// optionalAttrs (cross != null && cross.libc == "msvcrt" && crossStageStatic) {
-  makeFlags = [ "all-gcc" "all-target-libgcc" ];
-  installTargets = "install-gcc install-target-libgcc";
-}
-
-# Strip kills static libs of other archs (hence cross != null)
-// optionalAttrs (!stripped || cross != null) { dontStrip = true; NIX_STRIP_DEBUG = 0; }
-
-// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
-
-// optionalAttrs langVhdl rec {
-  name = "ghdl-0.29";
-
-  ghdlSrc = fetchurl {
-    url = "http://ghdl.free.fr/ghdl-0.29.tar.bz2";
-    sha256 = "15mlinr1lwljwll9ampzcfcrk9bk0qpdks1kxlvb70xf9zhh2jva";
-  };
-
-  # Ghdl has some timestamps checks, storing file timestamps in '.cf' files.
-  # As we will change the timestamps to 1970-01-01 00:00:01, we also set the
-  # content of that .cf to that value. This way ghdl does not complain on
-  # the installed object files from the basic libraries (ieee, ...)
-  postInstallGhdl = ''
-    pushd $out
-    find . -name "*.cf" -exec \
-        sed 's/[0-9]*\.000" /19700101000001.000" /g' -i {} \;
-    popd
-  '';
-
-  postUnpack = ''
-    tar xvf ${ghdlSrc}
-    mv ghdl-*/vhdl gcc*/gcc
-    rm -Rf ghdl-*
-  '';
-
-  meta = {
-    homepage = "http://ghdl.free.fr/";
-    license = stdenv.lib.licenses.gpl2Plus;
-    description = "Complete VHDL simulator, using the GCC technology (gcc ${version})";
-    maintainers = with stdenv.lib.maintainers; [viric];
-    platforms = with stdenv.lib.platforms; linux;
-  };
-
-})
diff --git a/pkgs/development/compilers/gcc/4.6/ghdl-ortho-cflags.patch b/pkgs/development/compilers/gcc/4.6/ghdl-ortho-cflags.patch
deleted file mode 100644
index 901534591c8f..000000000000
--- a/pkgs/development/compilers/gcc/4.6/ghdl-ortho-cflags.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
-index 8f481df..681ac59 100644
---- a/gcc/vhdl/Make-lang.in
-+++ b/gcc/vhdl/Make-lang.in
-@@ -96,7 +96,7 @@ AGCC_GCCOBJ_DIR=../
- AGCC_INC_FLAGS=-I$(AGCC_GCCOBJ_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/include \
-  -I$(AGCC_GCCSRC_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/gcc/config \
-  -I$(AGCC_GCCSRC_DIR)/libcpp/include
--AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS)
-+AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS) $(CFLAGS) $(INCLUDES)
- 
- AGCC_LOCAL_OBJS=ortho-lang.o
- 
-@@ -140,7 +140,7 @@ ghdl$(exeext): force
- 
- # Ghdl libraries.
- ghdllib: ghdl$(exeext) $(GCC_PASSES) force
--	$(MAKE_IN_VHDL) GRT_FLAGS="-O -g" ghdllib
-+	$(MAKE_IN_VHDL) GRT_FLAGS="-O -g $(CFLAGS)" ghdllib
- 
- # Build hooks:
- 
-diff --git a/gcc/vhdl/Makefile.in b/gcc/vhdl/Makefile.in
-index d754c6c..07abc4a 100644
---- a/gcc/vhdl/Makefile.in
-+++ b/gcc/vhdl/Makefile.in
-@@ -80,7 +80,8 @@ T_CPPFLAGS =
- X_ADAFLAGS =
- T_ADAFLAGS =
- 
--ADAC = $(CC)
-+# Never use the bootstrapped compiler, as it may not be built for ada
-+ADAC = gcc
- 
- ECHO = echo
- CHMOD = chmod
-diff --git a/gcc/vhdl/ortho-lang.c b/gcc/vhdl/ortho-lang.c
-index 84aeb92..8eddd42 100644
---- a/gcc/vhdl/ortho-lang.c
-+++ b/gcc/vhdl/ortho-lang.c
-@@ -16,6 +16,7 @@
- #include "options.h"
- #include "real.h"
--#include "tree-gimple.h"
-+#include "gimple.h"
-+#include "tree.h"
- #include "function.h"
- #include "cgraph.h"
- #include "target.h"
-@@ -680,38 +681,10 @@ type_for_mode (enum machine_mode mode, int unsignedp)
- 
- const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
- 
--/* Tree code classes.  */
--
--#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
--
--const enum tree_code_class tree_code_type[] = {
--#include "tree.def"
--  'x'
--};
--#undef DEFTREECODE
--
--/* Table indexed by tree code giving number of expression
--   operands beyond the fixed part of the node structure.
--   Not used for types or decls.  */
--
--#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
--
--const unsigned char tree_code_length[] = {
--#include "tree.def"
--  0
--};
--#undef DEFTREECODE
--
--#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) NAME,
--const char * const tree_code_name[] = {
--#include "tree.def"
--  "@@dummy"
--};
--#undef DEFTREECODE
- 
- union lang_tree_node 
-   GTY((desc ("0"),
--       chain_next ("(union lang_tree_node *) GENERIC_NEXT (&%h.generic)")))
-+       chain_next ("(union lang_tree_node *) TREE_CHAIN (&%h.generic)")))
- {
-   union tree_node GTY ((tag ("0"))) generic;
- };
-@@ -1162,7 +1135,7 @@ new_access_type (tree dtype)
-       res = make_node (POINTER_TYPE);
-       TREE_TYPE (res) = NULL_TREE;
-       /* Seems necessary.  */
--      TYPE_MODE (res) = Pmode;
-+      SET_TYPE_MODE (res, Pmode);
-       layout_type (res);
-       return res;
-     }
-diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
-index e201f64..f36fb97 100644
---- a/gcc/vhdl/Make-lang.in
-+++ b/gcc/vhdl/Make-lang.in
-@@ -132,7 +132,7 @@ ghdl1$(exeext): $(AGCC_OBJS) $(AGCC_DEPS) force
- 	 -cargs $(CFLAGS) $(GHDL_ADAFLAGS)
- 	$(GNATMAKE) -o $@ -aI$(srcdir)/vhdl -aOvhdl ortho_gcc-main \
- 	 -bargs -E -cargs $(CFLAGS) $(GHDL_ADAFLAGS) \
--	 -largs $(AGCC_OBJS) $(LIBS) $(GMPLIBS)
-+	 -largs $(AGCC_OBJS) $(LIBS) $(GMPLIBS) $(CLOOGLIBS) $(PPLLIBS)
- 
- # The driver for ghdl.
- ghdl$(exeext): force
diff --git a/pkgs/development/compilers/gcc/4.6/hurd-sigrtmin.patch b/pkgs/development/compilers/gcc/4.6/hurd-sigrtmin.patch
deleted file mode 100644
index dc8236d2b99f..000000000000
--- a/pkgs/development/compilers/gcc/4.6/hurd-sigrtmin.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-GNU libc on GNU/Hurd doesn't define `__SIGRTMIN'.
-From <http://patch-tracker.debian.org/patch/series/view/gcc-4.6/4.6.3-1/hurd-fixes.diff>.
-
---- a/libgcc/generic-morestack.c	2011-12-19 21:14:52.000000000 +0100
-+++ b/libgcc/generic-morestack.c	2011-12-19 21:15:35.000000000 +0100
-@@ -507,7 +507,7 @@
-   sigemptyset (&__morestack_initial_sp.mask);
- 
-   sigfillset (&__morestack_fullmask);
--#ifdef __GLIBC__
-+#if defined(__GLIBC__) && defined(__SIGRTMIN)
-   /* In glibc, the first two real time signals are used by the NPTL
-      threading library.  By taking them out of the set of signals, we
-      avoiding copying the signal mask in pthread_sigmask.  More
diff --git a/pkgs/development/compilers/gcc/4.6/no-sys-dirs.patch b/pkgs/development/compilers/gcc/4.6/no-sys-dirs.patch
deleted file mode 100644
index 8128fa87da5f..000000000000
--- a/pkgs/development/compilers/gcc/4.6/no-sys-dirs.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff -ru gcc-4.3.1-orig/gcc/cppdefault.c gcc-4.3.1/gcc/cppdefault.c
---- gcc-4.3.1-orig/gcc/cppdefault.c	2007-07-26 10:37:01.000000000 +0200
-+++ gcc-4.3.1/gcc/cppdefault.c	2008-06-25 17:48:23.000000000 +0200
-@@ -41,6 +41,10 @@
- # undef CROSS_INCLUDE_DIR
- #endif
- 
-+#undef LOCAL_INCLUDE_DIR
-+#undef SYSTEM_INCLUDE_DIR
-+#undef STANDARD_INCLUDE_DIR
-+
- const struct default_include cpp_include_defaults[]
- #ifdef INCLUDE_DEFAULTS
- = INCLUDE_DEFAULTS;
-diff -ru gcc-4.3.1-orig/gcc/gcc.c gcc-4.3.1/gcc/gcc.c
---- gcc-4.3.1-orig/gcc/gcc.c	2008-03-02 23:55:19.000000000 +0100
-+++ gcc-4.3.1/gcc/gcc.c	2008-06-25 17:52:53.000000000 +0200
-@@ -1478,10 +1478,10 @@
- /* Default prefixes to attach to command names.  */
- 
- #ifndef STANDARD_STARTFILE_PREFIX_1
--#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#define STANDARD_STARTFILE_PREFIX_1 ""
- #endif
- #ifndef STANDARD_STARTFILE_PREFIX_2
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
-+#define STANDARD_STARTFILE_PREFIX_2 ""
- #endif
- 
- #ifdef CROSS_DIRECTORY_STRUCTURE  /* Don't use these prefixes for a cross compiler.  */
---- gcc-4.3.1-orig/gcc/Makefile.in	2008-05-11 20:54:15.000000000 +0200
-+++ gcc-4.3.1/gcc/Makefile.in	2008-06-25 17:48:23.000000000 +0200
-@@ -378,7 +378,11 @@
- MD5_H	    = $(srcdir)/../include/md5.h
- 
- # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
--NATIVE_SYSTEM_HEADER_DIR = /usr/include
-+# Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
-+# `fixinc' from fixing header files in /usr/include.  However,
-+# NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
-+# it to some dummy directory.
-+NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
- # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
- CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
- 
-@@ -3277,7 +3281,7 @@
-   -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-   -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
-   -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
--  -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
-+  -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
-   -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
-   -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
-   -DPREFIX=\"$(prefix)/\" \
diff --git a/pkgs/development/compilers/gcc/4.6/sources.nix b/pkgs/development/compilers/gcc/4.6/sources.nix
deleted file mode 100644
index ca50160def46..000000000000
--- a/pkgs/development/compilers/gcc/4.6/sources.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Automatically generated by `update-gcc.sh', do not edit.
-   For GCC 4.6.4.  */
-{ fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda,
-  langGo }:
-
-assert version == "4.6.4";
-optional /* langC */ true (fetchurl {
-  url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2";
-  sha256 = "48b566f1288f099dff8fba868499a320f83586245ec69b8c82a9042566a5bf62";
-}) ++
-optional langCC (fetchurl {
-  url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2";
-  sha256 = "4eaa347f9cd3ab7d5e14efbb9c5c03009229cd714b558fc55fa56e8996b74d42";
-}) ++
-optional langFortran (fetchurl {
-  url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2";
-  sha256 = "4f402e0d27995a02354570f0a63047f27463c72c62f1ba3c08ef5a7c6c9c3d1c";
-}) ++
-optional langJava (fetchurl {
-  url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2";
-  sha256 = "4441d0c3cc04f2162f981c6b4bf29cdd9f6c16d294ce24c6bc4a05d8277abf28";
-}) ++
-optional langAda (fetchurl {
-  url = "mirror://gcc/releases/gcc-${version}/gcc-ada-${version}.tar.bz2";
-  sha256 = "2a09bbf942b2557839722d4807e67559123037356f5cb1a3b12f44539968d0ad";
-}) ++
-[]
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix
index e4e38022a6bf..a0def65d5313 100644
--- a/pkgs/development/compilers/gcc/4.8/default.nix
+++ b/pkgs/development/compilers/gcc/4.8/default.nix
@@ -33,6 +33,7 @@
 , libpthread ? null, libpthreadCross ? null  # required for GNU/Hurd
 , stripped ? true
 , gnused ? null
+, darwin ? null
 }:
 
 assert langJava     -> zip != null && unzip != null
@@ -198,7 +199,7 @@ let version = "4.8.5";
     stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
     crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
 
-    bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips && !stdenv.isDarwin;
+    bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips;
 
 in
 
@@ -332,8 +333,10 @@ stdenv.mkDerivation ({
       else ""}
     ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
     ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
-    --with-gmp=${gmp.dev}
-    --with-mpfr=${mpfr.dev}
+    --with-gmp-include=${gmp.dev}/include
+    --with-gmp-lib=${gmp.out}/lib
+    --with-mpfr-include=${mpfr.dev}/include
+    --with-mpfr-lib=${mpfr.out}/lib
     --with-mpc=${libmpc}
     ${if libelf != null then "--with-libelf=${libelf}" else ""}
     --disable-libstdcxx-pch
@@ -355,8 +358,10 @@ stdenv.mkDerivation ({
         )
       )
     }
-    ${if (stdenv ? glibc && cross == null)
-      then " --with-native-system-header-dir=${stdenv.glibc.dev}/include"
+    ${if cross == null
+      then if stdenv.isDarwin
+        then " --with-native-system-header-dir=${darwin.usr-include}"
+        else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
       else ""}
     ${if langAda then " --enable-libada" else ""}
     ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
@@ -454,27 +459,25 @@ stdenv.mkDerivation ({
   #
   # Likewise, the LTO code doesn't find zlib.
 
-  CPATH = concatStrings
-            (intersperse ":" (map (x: "${x.dev or x}/include")
-                                  (optionals (zlib != null) [ zlib ]
-                                   ++ optionals langJava [ boehmgc ]
-                                   ++ optionals javaAwtGtk xlibs
-                                   ++ optionals javaAwtGtk [ gmp mpfr ]
-                                   ++ optional (libpthread != null) libpthread
-                                   ++ optional (libpthreadCross != null) libpthreadCross
-
-                                   # On GNU/Hurd glibc refers to Mach & Hurd
-                                   # headers.
-                                   ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
-                                        libcCross.propagatedBuildInputs)));
-
-  LIBRARY_PATH = concatStrings
-                   (intersperse ":" (map (x: x + "/lib")
-                                         (optionals (zlib != null) [ zlib ]
-                                          ++ optionals langJava [ boehmgc ]
-                                          ++ optionals javaAwtGtk xlibs
-                                          ++ optionals javaAwtGtk [ gmp mpfr ]
-                                          ++ optional (libpthread != null) libpthread)));
+  CPATH = makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+    ++ optional (libpthread != null) libpthread
+    ++ optional (libpthreadCross != null) libpthreadCross
+
+    # On GNU/Hurd glibc refers to Mach & Hurd
+    # headers.
+    ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
+                 libcCross.propagatedBuildInputs);
+
+  LIBRARY_PATH = makeLibraryPath ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+    ++ optional (libpthread != null) libpthread);
 
   EXTRA_TARGET_CFLAGS =
     if cross != null && libcCross != null then [
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix
index 01755a74e1ec..4b53bc35599f 100644
--- a/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/pkgs/development/compilers/gcc/4.9/default.nix
@@ -33,6 +33,7 @@
 , libpthread ? null, libpthreadCross ? null  # required for GNU/Hurd
 , stripped ? true
 , gnused ? null
+, darwin ? null
 }:
 
 assert langJava     -> zip != null && unzip != null
@@ -202,7 +203,7 @@ let version = "4.9.4";
     stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
     crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
 
-  bootstrap = cross == null && !stdenv.isDarwin;
+  bootstrap = cross == null;
 
 in
 
@@ -364,8 +365,10 @@ stdenv.mkDerivation ({
         )
       )
     }
-    ${if (stdenv ? glibc && cross == null)
-      then " --with-native-system-header-dir=${stdenv.glibc.dev}/include"
+    ${if cross == null
+      then if stdenv.isDarwin
+        then " --with-native-system-header-dir=${darwin.usr-include}"
+        else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
       else ""}
     ${if langAda then " --enable-libada" else ""}
     ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
@@ -463,27 +466,25 @@ stdenv.mkDerivation ({
   #
   # Likewise, the LTO code doesn't find zlib.
 
-  CPATH = concatStrings
-            (intersperse ":" (map (x: "${x.dev or x}/include")
-                                  (optionals (zlib != null) [ zlib ]
-                                   ++ optionals langJava [ boehmgc ]
-                                   ++ optionals javaAwtGtk xlibs
-                                   ++ optionals javaAwtGtk [ gmp mpfr ]
-                                   ++ optional (libpthread != null) libpthread
-                                   ++ optional (libpthreadCross != null) libpthreadCross
-
-                                   # On GNU/Hurd glibc refers to Mach & Hurd
-                                   # headers.
-                                   ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
-                                        libcCross.propagatedBuildInputs)));
-
-  LIBRARY_PATH = concatStrings
-                   (intersperse ":" (map (x: x + "/lib")
-                                         (optionals (zlib != null) [ zlib ]
-                                          ++ optionals langJava [ boehmgc ]
-                                          ++ optionals javaAwtGtk xlibs
-                                          ++ optionals javaAwtGtk [ gmp mpfr ]
-                                          ++ optional (libpthread != null) libpthread)));
+  CPATH = makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+    ++ optional (libpthread != null) libpthread
+    ++ optional (libpthreadCross != null) libpthreadCross
+
+    # On GNU/Hurd glibc refers to Mach & Hurd
+    # headers.
+    ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
+                 libcCross.propagatedBuildInputs);
+
+  LIBRARY_PATH = makeLibraryPath ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+    ++ optional (libpthread != null) libpthread);
 
   EXTRA_TARGET_CFLAGS =
     if cross != null && libcCross != null then [
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix
index f5c69d24d63e..3d75c0e76daa 100644
--- a/pkgs/development/compilers/gcc/5/default.nix
+++ b/pkgs/development/compilers/gcc/5/default.nix
@@ -35,6 +35,7 @@
 , gnused ? null
 , binutils ? null
 , cloog # unused; just for compat with gcc4, as we override the parameter on some places
+, darwin ? null
 }:
 
 assert langJava     -> zip != null && unzip != null
@@ -202,7 +203,7 @@ let version = "5.4.0";
     stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
     crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
 
-  bootstrap = cross == null && !stdenv.isDarwin;
+  bootstrap = cross == null;
 
 in
 
@@ -337,8 +338,10 @@ stdenv.mkDerivation ({
       else ""}
     ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
     ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
-    --with-gmp=${gmp.dev}
-    --with-mpfr=${mpfr.dev}
+    --with-gmp-include=${gmp.dev}/include
+    --with-gmp-lib=${gmp.out}/lib
+    --with-mpfr-include=${mpfr.dev}/include
+    --with-mpfr-lib=${mpfr.out}/lib
     --with-mpc=${libmpc}
     ${if libelf != null then "--with-libelf=${libelf}" else ""}
     --disable-libstdcxx-pch
@@ -360,8 +363,10 @@ stdenv.mkDerivation ({
         )
       )
     }
-    ${if (stdenv ? glibc && cross == null)
-      then " --with-native-system-header-dir=${stdenv.glibc.dev}/include"
+    ${if cross == null
+      then if stdenv.isDarwin
+        then " --with-native-system-header-dir=${darwin.usr-include}"
+        else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
       else ""}
     ${if langAda then " --enable-libada" else ""}
     ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
@@ -458,27 +463,25 @@ stdenv.mkDerivation ({
   #
   # Likewise, the LTO code doesn't find zlib.
 
-  CPATH = concatStrings
-            (intersperse ":" (map (x: "${x.dev or x}/include")
-                                  (optionals (zlib != null) [ zlib ]
-                                   ++ optionals langJava [ boehmgc ]
-                                   ++ optionals javaAwtGtk xlibs
-                                   ++ optionals javaAwtGtk [ gmp mpfr ]
-                                   ++ optional (libpthread != null) libpthread
-                                   ++ optional (libpthreadCross != null) libpthreadCross
-
-                                   # On GNU/Hurd glibc refers to Mach & Hurd
-                                   # headers.
-                                   ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
-                                        libcCross.propagatedBuildInputs)));
-
-  LIBRARY_PATH = concatStrings
-                   (intersperse ":" (map (x: x + "/lib")
-                                         (optionals (zlib != null) [ zlib ]
-                                          ++ optionals langJava [ boehmgc ]
-                                          ++ optionals javaAwtGtk xlibs
-                                          ++ optionals javaAwtGtk [ gmp mpfr ]
-                                          ++ optional (libpthread != null) libpthread)));
+  CPATH = makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+    ++ optionals langJava [ boehmgc ]
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+    ++ optional (libpthread != null) libpthread
+    ++ optional (libpthreadCross != null) libpthreadCross
+
+    # On GNU/Hurd glibc refers to Mach & Hurd
+    # headers.
+    ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
+                 libcCross.propagatedBuildInputs);
+
+  LIBRARY_PATH = makeLibraryPath ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+    ++ optional (libpthread != null) libpthread);
 
   EXTRA_TARGET_CFLAGS =
     if cross != null && libcCross != null then [
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index 129bde908faf..acddc9081be0 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -35,6 +35,7 @@
 , gnused ? null
 , binutils ? null
 , cloog # unused; just for compat with gcc4, as we override the parameter on some places
+, darwin ? null
 }:
 
 assert langJava     -> zip != null && unzip != null
@@ -201,7 +202,7 @@ let version = "6.2.0";
     stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
     crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
 
-  bootstrap = cross == null && !stdenv.isDarwin;
+  bootstrap = cross == null;
 
 in
 
@@ -335,8 +336,10 @@ stdenv.mkDerivation ({
       else ""}
     ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
     ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
-    --with-gmp=${gmp.dev}
-    --with-mpfr=${mpfr.dev}
+    --with-gmp-include=${gmp.dev}/include
+    --with-gmp-lib=${gmp.out}/lib
+    --with-mpfr-include=${mpfr.dev}/include
+    --with-mpfr-lib=${mpfr.out}/lib
     --with-mpc=${libmpc}
     ${if libelf != null then "--with-libelf=${libelf}" else ""}
     --disable-libstdcxx-pch
@@ -358,8 +361,10 @@ stdenv.mkDerivation ({
         )
       )
     }
-    ${if (stdenv ? glibc && cross == null)
-      then " --with-native-system-header-dir=${stdenv.glibc.dev}/include"
+    ${if cross == null
+      then if stdenv.isDarwin
+        then " --with-native-system-header-dir=${darwin.usr-include}"
+        else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
       else ""}
     ${if langAda then " --enable-libada" else ""}
     ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
@@ -456,27 +461,25 @@ stdenv.mkDerivation ({
   #
   # Likewise, the LTO code doesn't find zlib.
 
-  CPATH = concatStrings
-            (intersperse ":" (map (x: "${x.dev or x}/include")
-                                  (optionals (zlib != null) [ zlib ]
-                                   ++ optionals langJava [ boehmgc ]
-                                   ++ optionals javaAwtGtk xlibs
-                                   ++ optionals javaAwtGtk [ gmp mpfr ]
-                                   ++ optional (libpthread != null) libpthread
-                                   ++ optional (libpthreadCross != null) libpthreadCross
-
-                                   # On GNU/Hurd glibc refers to Mach & Hurd
-                                   # headers.
-                                   ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
-                                        libcCross.propagatedBuildInputs)));
-
-  LIBRARY_PATH = concatStrings
-                   (intersperse ":" (map (x: x + "/lib")
-                                         (optionals (zlib != null) [ zlib ]
-                                          ++ optionals langJava [ boehmgc ]
-                                          ++ optionals javaAwtGtk xlibs
-                                          ++ optionals javaAwtGtk [ gmp mpfr ]
-                                          ++ optional (libpthread != null) libpthread)));
+  CPATH = makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+    ++ optional (libpthread != null) libpthread
+    ++ optional (libpthreadCross != null) libpthreadCross
+
+    # On GNU/Hurd glibc refers to Mach & Hurd
+    # headers.
+    ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs")
+                 libcCross.propagatedBuildInputs);
+
+  LIBRARY_PATH = makeLibraryPath ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+    ++ optional (libpthread != null) libpthread);
 
   EXTRA_TARGET_CFLAGS =
     if cross != null && libcCross != null then [
diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh
index 0371630f3f69..de3e9ba3ef5f 100644
--- a/pkgs/development/compilers/gcc/builder.sh
+++ b/pkgs/development/compilers/gcc/builder.sh
@@ -218,6 +218,15 @@ postInstall() {
         substituteInPlace "$i" --replace "$out" "$lib"
     done
 
+    if [ -n "$enableMultilib" ]; then
+        moveToOutput "lib64/lib*.so*" "$lib"
+        moveToOutput "lib64/lib*.la"  "$lib"
+
+        for i in "$lib"/lib64/*.{la,py}; do
+            substituteInPlace "$i" --replace "$out" "$lib"
+        done
+    fi
+
     # Remove `fixincl' to prevent a retained dependency on the
     # previous gcc.
     rm -rf $out/libexec/gcc/*/*/install-tools
@@ -227,19 +236,19 @@ postInstall() {
     rm -rf $out/bin/gccbug
 
     if type "patchelf"; then
-	# Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
-	for i in $(find "$out"/libexec/gcc/*/*/* -type f -a \! -name '*.la'); do
+        # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
+        for i in $(find "$out"/libexec/gcc/*/*/* -type f -a \! -name '*.la'); do
             PREV_RPATH=`patchelf --print-rpath "$i"`
             NEW_RPATH=`echo "$PREV_RPATH" | sed 's,:[^:]*bootstrap-tools/lib,,g'`
             patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK
-	done
+        done
 
-	# For some reason the libs retain RPATH to $out
-	for i in "$lib"/lib/{libtsan,libasan,libubsan}.so.*.*.*; do
+        # For some reason the libs retain RPATH to $out
+        for i in "$lib"/lib/{libtsan,libasan,libubsan}.so.*.*.*; do
             PREV_RPATH=`patchelf --print-rpath "$i"`
             NEW_RPATH=`echo "$PREV_RPATH" | sed "s,:${out}[^:]*,,g"`
             patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK
-	done
+        done
     fi
 
     # Get rid of some "fixed" header files
diff --git a/pkgs/development/compilers/llvm/3.8/clang/default.nix b/pkgs/development/compilers/llvm/3.8/clang/default.nix
index 9282a64c8a56..8128bfd23925 100644
--- a/pkgs/development/compilers/llvm/3.8/clang/default.nix
+++ b/pkgs/development/compilers/llvm/3.8/clang/default.nix
@@ -29,12 +29,20 @@ let
       sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
     '';
 
+    outputs = [ "out" "python" ];
+
     # Clang expects to find LLVMgold in its own prefix
     # Clang expects to find sanitizer libraries in its own prefix
     postInstall = ''
       ln -sv ${llvm}/lib/LLVMgold.so $out/lib
       ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
       ln -sv $out/bin/clang $out/bin/cpp
+
+      mkdir -p $python/bin $python/share/clang/
+      mv $out/bin/{git-clang-format,scan-view,set-xcode-analyzer} $python/bin
+      mv $out/share/clang/*.py $python/share/clang
+
+      rm $out/bin/c-index-test
     '';
 
     enableParallelBuilding = true;
diff --git a/pkgs/development/compilers/llvm/3.9/clang/default.nix b/pkgs/development/compilers/llvm/3.9/clang/default.nix
index e75da0e9717e..6eadb91141d9 100644
--- a/pkgs/development/compilers/llvm/3.9/clang/default.nix
+++ b/pkgs/development/compilers/llvm/3.9/clang/default.nix
@@ -16,7 +16,6 @@ let
     buildInputs = [ cmake libedit libxml2 llvm python ];
 
     cmakeFlags = [
-      "-DCMAKE_BUILD_TYPE=Release"
       "-DCMAKE_CXX_FLAGS=-std=c++11"
     ] ++
     # Maybe with compiler-rt this won't be needed?
diff --git a/pkgs/development/compilers/llvm/3.9/libc++/default.nix b/pkgs/development/compilers/llvm/3.9/libc++/default.nix
index 97cf65ad2090..3b7caaa24bf5 100644
--- a/pkgs/development/compilers/llvm/3.9/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/3.9/libc++/default.nix
@@ -18,8 +18,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
 
-  cmakeFlags =
-    [ "-DCMAKE_BUILD_TYPE=Release"
+  cmakeFlags = [
       "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
       "-DLIBCXX_LIBCPPABI_VERSION=2"
       "-DLIBCXX_CXX_ABI=libcxxabi"
diff --git a/pkgs/development/compilers/llvm/3.9/lldb.nix b/pkgs/development/compilers/llvm/3.9/lldb.nix
index bb92a6eed6c0..0acef48f57b4 100644
--- a/pkgs/development/compilers/llvm/3.9/lldb.nix
+++ b/pkgs/development/compilers/llvm/3.9/lldb.nix
@@ -41,7 +41,6 @@ stdenv.mkDerivation {
   hardeningDisable = [ "format" ];
 
   cmakeFlags = [
-    "-DCMAKE_BUILD_TYPE=Release"
     "-DLLVM_MAIN_INCLUDE_DIR=${llvm}/include"
   ];
 
diff --git a/pkgs/development/compilers/llvm/3.9/llvm-outputs.patch b/pkgs/development/compilers/llvm/3.9/llvm-outputs.patch
new file mode 100644
index 000000000000..40096fa3497f
--- /dev/null
+++ b/pkgs/development/compilers/llvm/3.9/llvm-outputs.patch
@@ -0,0 +1,26 @@
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 94d426b..37f7794 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -333,6 +333,21 @@ int main(int argc, char **argv) {
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
++  /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared
++  if (!IsInDevelopmentTree) {
++    bool WantShared = true;
++    for (int i = 1; i < argc; ++i) {
++      StringRef Arg = argv[i];
++      if (Arg == "--link-shared")
++        WantShared = true;
++      else if (Arg == "--link-static")
++        WantShared = false; // the last one wins
++    }
++
++    if (WantShared)
++      ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX;
++  }
++
+   /// We only use `shared library` mode in cases where the static library form
+   /// of the components provided are not available; note however that this is
+   /// skipped if we're run from within the build dir. However, once installed,
diff --git a/pkgs/development/compilers/llvm/3.9/llvm.nix b/pkgs/development/compilers/llvm/3.9/llvm.nix
index 41d655015e46..22dea611c796 100644
--- a/pkgs/development/compilers/llvm/3.9/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.9/llvm.nix
@@ -30,16 +30,24 @@ in stdenv.mkDerivation rec {
     mv compiler-rt-* $sourceRoot/projects/compiler-rt
   '';
 
+  outputs = [ "out" ] ++ stdenv.lib.optional enableSharedLibraries "lib";
+
   buildInputs = [ perl groff cmake libxml2 python libffi ]
     ++ stdenv.lib.optional stdenv.isDarwin libcxxabi;
 
   propagatedBuildInputs = [ ncurses zlib ];
 
+  postPatch = ""
   # hacky fix: New LLVM releases require a newer OS X SDK than
   # 10.9. This is a temporary measure until nixpkgs darwin support is
   # updated.
-  patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
+  + stdenv.lib.optionalString stdenv.isDarwin ''
         sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
+  ''
+  # Patch llvm-config to return correct library path based on --link-{shared,static}.
+  + stdenv.lib.optionalString (enableSharedLibraries) ''
+    substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
+    patch -p1 < ./llvm-outputs.patch
   '';
 
   # hacky fix: created binaries need to be run before installation
@@ -59,7 +67,7 @@ in stdenv.mkDerivation rec {
     "-DLLVM_LINK_LLVM_DYLIB=ON"
   ] ++ stdenv.lib.optional (!isDarwin)
     "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
-    ++ stdenv.lib.optionals ( isDarwin) [
+    ++ stdenv.lib.optionals (isDarwin) [
     "-DLLVM_ENABLE_LIBCXX=ON"
     "-DCAN_TARGET_i386=false"
   ];
@@ -70,7 +78,14 @@ in stdenv.mkDerivation rec {
     paxmark m bin/{lli,llvm-rtdyld}
   '';
 
-  postInstall = stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+  postInstall = ""
+  + stdenv.lib.optionalString (enableSharedLibraries) ''
+    moveToOutput "lib/libLLVM-*" "$lib"
+    moveToOutput "lib/libLLVM.so" "$lib"
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
+  ''
+  + stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
     install_name_tool -id $out/lib/libLLVM.dylib $out/lib/libLLVM.dylib
     ln -s $out/lib/libLLVM.dylib $out/lib/libLLVM-${version}.dylib
   '';
diff --git a/pkgs/development/interpreters/python/cpython/2.6/default.nix b/pkgs/development/interpreters/python/cpython/2.6/default.nix
index 5311be697afe..64f2b80d09fa 100644
--- a/pkgs/development/interpreters/python/cpython/2.6/default.nix
+++ b/pkgs/development/interpreters/python/cpython/2.6/default.nix
@@ -8,10 +8,14 @@ with stdenv.lib;
 
 let
   majorVersion = "2.6";
-  version = "${majorVersion}.9";
+  minorVersion = "9";
+  minorVersionSuffix = "";
+  pythonVersion = majorVersion;
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   src = fetchurl {
-    url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.xz";
+    url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
     sha256 = "0hbfs2691b60c7arbysbzr0w9528d5pl8a4x7mq5psh6a2cvprya";
   };
 
@@ -90,16 +94,19 @@ let
 
         paxmark E $out/bin/python${majorVersion}
 
+        # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+        echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
+
         ${ optionalString includeModules "$out/bin/python ./setup.py build_ext"}
       '';
 
     passthru = rec {
+      inherit libPrefix;
       inherit zlibSupport;
       isPy2 = true;
       isPy26 = true;
       buildEnv = callPackage ../../wrapper.nix { python = self; };
       withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python26Packages; };
-      libPrefix = "python${majorVersion}";
       executable = libPrefix;
       sitePackages = "lib/${libPrefix}/site-packages";
       interpreter = "${self}/bin/${executable}";
diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix
index 5f15db26ebc3..4c28e977b495 100644
--- a/pkgs/development/interpreters/python/cpython/2.7/default.nix
+++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, self, callPackage, python27Packages
+{ stdenv, fetchurl, fetchpatch, self, callPackage, python27Packages
 , bzip2, openssl, gettext
 
 , includeModules ? false
@@ -22,10 +22,14 @@ with stdenv.lib;
 
 let
   majorVersion = "2.7";
-  version = "${majorVersion}.12";
+  minorVersion = "12";
+  minorVersionSuffix = "";
+  pythonVersion = majorVersion;
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   src = fetchurl {
-    url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.xz";
+    url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
     sha256 = "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp";
   };
 
@@ -44,6 +48,14 @@ let
       ./deterministic-build.patch
 
       ./properly-detect-curses.patch
+
+      # FIXME: get rid of this after the next release, when the commit referenced here makes
+      # it in. We need it until then because it breaks compilation of programs that use
+      # locale with clang 3.8 and higher.
+      (fetchpatch {
+        url    = "https://hg.python.org/cpython/raw-rev/e0ec3471cb09";
+        sha256 = "1jdgb70jw942r4kmr01qll7mk1di8jx0qiabmp20jhnmha246ivq";
+      })
     ] ++ optionals stdenv.isLinux [
 
       # Disable the use of ldconfig in ctypes.util.find_library (since
@@ -150,18 +162,21 @@ let
 
         paxmark E $out/bin/python${majorVersion}
 
+        # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+        echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
+
         ${optionalString includeModules "$out/bin/python ./setup.py build_ext"}
 
         rm "$out"/lib/python*/plat-*/regen # refers to glibc.dev
       '';
 
     passthru = rec {
+      inherit libPrefix;
       inherit zlibSupport;
       isPy2 = true;
       isPy27 = true;
       buildEnv = callPackage ../../wrapper.nix { python = self; };
       withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python27Packages; };
-      libPrefix = "python${majorVersion}";
       executable = libPrefix;
       sitePackages = "lib/${libPrefix}/site-packages";
       interpreter = "${self}/bin/${executable}";
diff --git a/pkgs/development/interpreters/python/cpython/3.3/default.nix b/pkgs/development/interpreters/python/cpython/3.3/default.nix
index cb48186a69e7..3be1209b636e 100644
--- a/pkgs/development/interpreters/python/cpython/3.3/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.3/default.nix
@@ -21,8 +21,11 @@ with stdenv.lib;
 
 let
   majorVersion = "3.3";
+  minorVersion = "6";
+  minorVersionSuffix = "";
   pythonVersion = majorVersion;
-  version = "${majorVersion}.6";
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   buildInputs = filter (p: p != null) [
     zlib bzip2 lzma gdbm sqlite db readline ncurses openssl tcl tk libX11 xproto
@@ -37,7 +40,7 @@ stdenv.mkDerivation {
   inherit buildInputs;
 
   src = fetchurl {
-    url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.xz";
+    url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
     sha256 = "0gsxpgd5p4mwd01gw501vsyahncyw3h9836ypkr3y32kgazy89jj";
   };
 
@@ -71,17 +74,20 @@ stdenv.mkDerivation {
     touch $out/lib/python${majorVersion}/test/__init__.py
     ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
     paxmark E $out/bin/python${majorVersion}
+
+    # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+    echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
   '';
 
   passthru = rec {
+    inherit libPrefix;
     zlibSupport = zlib != null;
     sqliteSupport = sqlite != null;
     dbSupport = db != null;
     readlineSupport = readline != null;
     opensslSupport = openssl != null;
     tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
-    libPrefix = "python${majorVersion}";
-    executable = "python3.3m";
+    executable = "${libPrefix}m";
     buildEnv = callPackage ../../wrapper.nix { python = self; };
     withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python33Packages; };
     isPy3 = true;
diff --git a/pkgs/development/interpreters/python/cpython/3.4/default.nix b/pkgs/development/interpreters/python/cpython/3.4/default.nix
index 2e7d3a03141e..78f5972e10fb 100644
--- a/pkgs/development/interpreters/python/cpython/3.4/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.4/default.nix
@@ -23,9 +23,11 @@ with stdenv.lib;
 
 let
   majorVersion = "3.4";
+  minorVersion = "5";
+  minorVersionSuffix = "";
   pythonVersion = majorVersion;
-  version = "${majorVersion}.5";
-  fullVersion = "${version}";
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   buildInputs = filter (p: p != null) [
     zlib
@@ -45,14 +47,14 @@ let
 
 in
 stdenv.mkDerivation {
-  name = "python3-${fullVersion}";
+  name = "python3-${version}";
   pythonVersion = majorVersion;
   inherit majorVersion version;
 
   inherit buildInputs;
 
   src = fetchurl {
-    url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz";
+    url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.xz";
     sha256 = "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f";
   };
 
@@ -95,17 +97,20 @@ stdenv.mkDerivation {
 
     ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
     paxmark E $out/bin/python${majorVersion}
+
+    # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+    echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
   '';
 
   passthru = rec {
+    inherit libPrefix;
     zlibSupport = zlib != null;
     sqliteSupport = sqlite != null;
     dbSupport = db != null;
     readlineSupport = readline != null;
     opensslSupport = openssl != null;
     tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
-    libPrefix = "python${majorVersion}";
-    executable = "python3.4m";
+    executable = "${libPrefix}m";
     buildEnv = callPackage ../../wrapper.nix { python = self; };
     withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python34Packages; };
     isPy3 = true;
diff --git a/pkgs/development/interpreters/python/cpython/3.5/default.nix b/pkgs/development/interpreters/python/cpython/3.5/default.nix
index 69d3df32a326..84488e7e05c3 100644
--- a/pkgs/development/interpreters/python/cpython/3.5/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.5/default.nix
@@ -22,9 +22,11 @@ with stdenv.lib;
 
 let
   majorVersion = "3.5";
+  minorVersion = "2";
+  minorVersionSuffix = "";
   pythonVersion = majorVersion;
-  version = "${majorVersion}.2";
-  fullVersion = "${version}";
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   buildInputs = filter (p: p != null) [
     zlib
@@ -42,14 +44,14 @@ let
   ] ++ optionals stdenv.isDarwin [ CF configd ];
 in
 stdenv.mkDerivation {
-  name = "python3-${fullVersion}";
+  name = "python3-${version}";
   pythonVersion = majorVersion;
   inherit majorVersion version;
 
   inherit buildInputs;
 
   src = fetchurl {
-    url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz";
+    url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
     sha256 = "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400";
   };
 
@@ -92,6 +94,9 @@ stdenv.mkDerivation {
 
     ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
     paxmark E $out/bin/python${majorVersion}
+
+    # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+    echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
   '';
 
   postFixup = ''
@@ -106,14 +111,14 @@ stdenv.mkDerivation {
   '';
 
   passthru = rec {
+    inherit libPrefix;
     zlibSupport = zlib != null;
     sqliteSupport = sqlite != null;
     dbSupport = false;
     readlineSupport = readline != null;
     opensslSupport = openssl != null;
     tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
-    libPrefix = "python${majorVersion}";
-    executable = "python${majorVersion}m";
+    executable = "${libPrefix}m";
     buildEnv = callPackage ../../wrapper.nix { python = self; };
     withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python35Packages; };
     isPy3 = true;
diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix
index 3a6635cd8b62..3f25640afeaa 100644
--- a/pkgs/development/interpreters/python/cpython/3.6/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix
@@ -24,9 +24,11 @@ with stdenv.lib;
 
 let
   majorVersion = "3.6";
+  minorVersion = "0";
+  minorVersionSuffix = "b1";
   pythonVersion = majorVersion;
-  version = "${majorVersion}.0a3";
-  fullVersion = "${version}";
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
+  libPrefix = "python${majorVersion}";
 
   buildInputs = filter (p: p != null) [
     glibc
@@ -46,15 +48,15 @@ let
   ] ++ optionals stdenv.isDarwin [ CF configd ];
 in
 stdenv.mkDerivation {
-  name = "python3-${fullVersion}";
+  name = "python3-${version}";
   pythonVersion = majorVersion;
   inherit majorVersion version;
 
   inherit buildInputs;
 
   src = fetchurl {
-    url = "https://www.python.org/ftp/python/${majorVersion}.0/Python-${fullVersion}.tar.xz";
-    sha256 = "08c3598bwihibwca9lwxq923sjq9shvgv3wxv4vkga2n6hf63l1c";
+    url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
+    sha256 = "0hjdlwkjanjagz4qggbfgal8ggmas26mx2jlgjx1z2mzi950jfx8";
   };
 
   NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s";
@@ -73,8 +75,6 @@ stdenv.mkDerivation {
        export MACOSX_DEPLOYMENT_TARGET=10.6
      ''}
 
-    substituteInPlace ./Lib/plat-generic/regen --replace "/usr/include" ${glibc.dev}/include
-
     configureFlagsArray=( --enable-shared --with-threads
                           CPPFLAGS="${concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs)}"
                           LDFLAGS="${concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs)}"
@@ -98,17 +98,20 @@ stdenv.mkDerivation {
 
     ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
     paxmark E $out/bin/python${majorVersion}
+
+    # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+    echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
   '';
 
   passthru = rec {
+    inherit libPrefix;
     zlibSupport = zlib != null;
     sqliteSupport = sqlite != null;
     dbSupport = db != null;
     readlineSupport = readline != null;
     opensslSupport = openssl != null;
     tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
-    libPrefix = "python${majorVersion}";
-    executable = "python${majorVersion}m";
+    executable = "${libPrefix}m";
     buildEnv = callPackage ../../wrapper.nix { python = self; };
     withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python36Packages; };
     isPy3 = true;
diff --git a/pkgs/development/interpreters/python/pypy/2.7/default.nix b/pkgs/development/interpreters/python/pypy/2.7/default.nix
index c0bd10a0d437..7e11ac89b167 100644
--- a/pkgs/development/interpreters/python/pypy/2.7/default.nix
+++ b/pkgs/development/interpreters/python/pypy/2.7/default.nix
@@ -5,9 +5,11 @@
 assert zlibSupport -> zlib != null;
 
 let
-
-  majorVersion = "5.4.1";
-  version = "${majorVersion}";
+  majorVersion = "5.4";
+  minorVersion = "1";
+  minorVersionSuffix = "";
+  pythonVersion = "2.7";
+  version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
   libPrefix = "pypy${majorVersion}";
 
   pypy = stdenv.mkDerivation rec {
@@ -113,6 +115,9 @@ let
 
        # verify cffi modules
        $out/bin/pypy -c "import Tkinter;import sqlite3;import curses"
+
+        # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
+        echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
     '';
 
     passthru = rec {
diff --git a/pkgs/development/libraries/db/clang-5.3.patch b/pkgs/development/libraries/db/clang-5.3.patch
index 438fa7eedd71..0a0993da13e1 100644
--- a/pkgs/development/libraries/db/clang-5.3.patch
+++ b/pkgs/development/libraries/db/clang-5.3.patch
@@ -1,6 +1,17 @@
---- a/src/dbinc/atomic.h	2013-03-12 14:07:22.000000000 -0400
-+++ b/src/dbinc/atomic.h.change	2013-03-12 14:06:35.000000000 -0400
-@@ -144,7 +144,7 @@
+diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h
+index 6a858f7..9f338dc 100644
+--- a/src/dbinc/atomic.h
++++ b/src/dbinc/atomic.h
+@@ -70,7 +70,7 @@ typedef struct {
+  * These have no memory barriers; the caller must include them when necessary.
+  */
+ #define	atomic_read(p)		((p)->value)
+-#define	atomic_init(p, val)	((p)->value = (val))
++#define	atomic_init_db(p, val)	((p)->value = (val))
+ 
+ #ifdef HAVE_ATOMIC_SUPPORT
+ 
+@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
  #define	atomic_inc(env, p)	__atomic_inc(p)
  #define	atomic_dec(env, p)	__atomic_dec(p)
  #define	atomic_compare_exchange(env, p, o, n)	\
@@ -9,7 +20,7 @@
  static inline int __atomic_inc(db_atomic_t *p)
  {
  	int	temp;
-@@ -176,7 +176,7 @@
+@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
   * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
   * which configure could be changed to use.
   */
@@ -18,3 +29,126 @@
  	db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
  {
  	atomic_value_t was;
+@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange(
+ #define	atomic_dec(env, p)	(--(p)->value)
+ #define	atomic_compare_exchange(env, p, oldval, newval)		\
+ 	(DB_ASSERT(env, atomic_read(p) == (oldval)),		\
+-	atomic_init(p, (newval)), 1)
++	atomic_init_db(p, (newval)), 1)
+ #else
+ #define atomic_inc(env, p)	__atomic_inc(env, p)
+ #define atomic_dec(env, p)	__atomic_dec(env, p)
+diff --git a/src/dbinc/db.in b/src/dbinc/db.in
+index 92ac822..f80428e 100644
+--- a/src/dbinc/db.in
++++ b/src/dbinc/db.in
+@@ -2782,7 +2782,7 @@ typedef struct {
+ #define	fetch(a)	__db_dbm_fetch@DB_VERSION_UNIQUE_NAME@(a)
+ #define	firstkey	__db_dbm_firstkey@DB_VERSION_UNIQUE_NAME@
+ #define	nextkey(a)	__db_dbm_nextkey@DB_VERSION_UNIQUE_NAME@(a)
+-#define	store(a, b)	__db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b)
++#define	store_db(a, b)	__db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b)
+ 
+ /*******************************************************
+  * Hsearch historic interface.
+diff --git a/src/mp/mp_fget.c b/src/mp/mp_fget.c
+index 16de695..d0dcc29 100644
+--- a/src/mp/mp_fget.c
++++ b/src/mp/mp_fget.c
+@@ -649,7 +649,7 @@ alloc:		/* Allocate a new buffer header and data space. */
+ 
+ 		/* Initialize enough so we can call __memp_bhfree. */
+ 		alloc_bhp->flags = 0;
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ #ifdef DIAGNOSTIC
+ 		if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
+ 			__db_errx(env, DB_STR("3025",
+@@ -955,7 +955,7 @@ alloc:		/* Allocate a new buffer header and data space. */
+ 			MVCC_MPROTECT(bhp->buf, mfp->pagesize,
+ 			    PROT_READ);
+ 
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ 		MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+ 		alloc_bhp->priority = bhp->priority;
+ 		alloc_bhp->pgno = bhp->pgno;
+diff --git a/src/mp/mp_mvcc.c b/src/mp/mp_mvcc.c
+index 770bad8..e28cce0 100644
+--- a/src/mp/mp_mvcc.c
++++ b/src/mp/mp_mvcc.c
+@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp)
+ #else
+ 	memcpy(frozen_bhp, bhp, SSZA(BH, buf));
+ #endif
+-	atomic_init(&frozen_bhp->ref, 0);
++	atomic_init_db(&frozen_bhp->ref, 0);
+ 	if (mutex != MUTEX_INVALID)
+ 		frozen_bhp->mtx_buf = mutex;
+ 	else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
+@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp)
+ #endif
+ 		alloc_bhp->mtx_buf = mutex;
+ 		MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ 		F_CLR(alloc_bhp, BH_FROZEN);
+ 	}
+ 
+diff --git a/src/mp/mp_region.c b/src/mp/mp_region.c
+index 4952030..47645f8 100644
+--- a/src/mp/mp_region.c
++++ b/src/mp/mp_region.c
+@@ -245,7 +245,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
+ 			     MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
+ 				return (ret);
+ 			SH_TAILQ_INIT(&htab[i].hash_bucket);
+-			atomic_init(&htab[i].hash_page_dirty, 0);
++			atomic_init_db(&htab[i].hash_page_dirty, 0);
+ 		}
+ 
+ 		/*
+@@ -302,7 +302,7 @@ no_prealloc:
+ 		} else
+ 			hp->mtx_hash = mtx_base + (i % dbenv->mp_mtxcount);
+ 		SH_TAILQ_INIT(&hp->hash_bucket);
+-		atomic_init(&hp->hash_page_dirty, 0);
++		atomic_init_db(&hp->hash_page_dirty, 0);
+ #ifdef HAVE_STATISTICS
+ 		hp->hash_io_wait = 0;
+ 		hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;
+diff --git a/src/mutex/mut_method.c b/src/mutex/mut_method.c
+index 09353b0..177353c 100644
+--- a/src/mutex/mut_method.c
++++ b/src/mutex/mut_method.c
+@@ -474,7 +474,7 @@ atomic_compare_exchange(env, v, oldval, newval)
+ 	MUTEX_LOCK(env, mtx);
+ 	ret = atomic_read(v) == oldval;
+ 	if (ret)
+-		atomic_init(v, newval);
++		atomic_init_db(v, newval);
+ 	MUTEX_UNLOCK(env, mtx);
+ 
+ 	return (ret);
+diff --git a/src/mutex/mut_tas.c b/src/mutex/mut_tas.c
+index 106b161..fc4de9d 100644
+--- a/src/mutex/mut_tas.c
++++ b/src/mutex/mut_tas.c
+@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags)
+ 
+ #ifdef HAVE_SHARED_LATCHES
+ 	if (F_ISSET(mutexp, DB_MUTEX_SHARED))
+-		atomic_init(&mutexp->sharecount, 0);
++		atomic_init_db(&mutexp->sharecount, 0);
+ 	else
+ #endif
+ 	if (MUTEX_INIT(&mutexp->tas)) {
+@@ -536,7 +536,7 @@ __db_tas_mutex_unlock(env, mutex)
+ 			F_CLR(mutexp, DB_MUTEX_LOCKED);
+ 			/* Flush flag update before zeroing count */
+ 			MEMBAR_EXIT();
+-			atomic_init(&mutexp->sharecount, 0);
++			atomic_init_db(&mutexp->sharecount, 0);
+ 		} else {
+ 			DB_ASSERT(env, sharecount > 0);
+ 			MEMBAR_EXIT();
diff --git a/pkgs/development/libraries/db/db-5.3.nix b/pkgs/development/libraries/db/db-5.3.nix
index 98002c244612..91adfa24b58d 100644
--- a/pkgs/development/libraries/db/db-5.3.nix
+++ b/pkgs/development/libraries/db/db-5.3.nix
@@ -3,6 +3,9 @@
 import ./generic.nix (args // rec {
   version = "5.3.28";
   sha256 = "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0";
-  extraPatches = [ ./clang-5.3.patch ];
   branch = "5.3";
+  # https://community.oracle.com/thread/3952592
+  # this patch renames some sybols that conflict with libc++-3.8
+  # symbols: atomic_compare_exchange, atomic_init, store
+  extraPatches = [ ./clang-5.3.patch ];
 })
diff --git a/pkgs/development/libraries/glib-networking/default.nix b/pkgs/development/libraries/glib-networking/default.nix
index 5c7b3123cb6f..422b7f4c58c6 100644
--- a/pkgs/development/libraries/glib-networking/default.nix
+++ b/pkgs/development/libraries/glib-networking/default.nix
@@ -2,15 +2,15 @@
 , gsettings_desktop_schemas }:
 
 let
-  ver_maj = "2.46";
-  ver_min = "1";
+  ver_maj = "2.50";
+  ver_min = "0";
 in
 stdenv.mkDerivation rec {
   name = "glib-networking-${ver_maj}.${ver_min}";
 
   src = fetchurl {
     url = "mirror://gnome/sources/glib-networking/${ver_maj}/${name}.tar.xz";
-    sha256 = "1cchmi08jpjypgmm9i7xzh5qfg2q5k61kry9ns8mhw3z44a440ym";
+    sha256 = "3f1a442f3c2a734946983532ce59ed49120319fdb10c938447c373d5e5286bee";
   };
 
   outputs = [ "out" "dev" ]; # to deal with propagatedBuildInputs
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index c678309e90a6..c47a02ef5e47 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -1,5 +1,7 @@
 { stdenv, fetchurl, pkgconfig, gettext, perl, python
 , libiconv, libintlOrEmpty, zlib, libffi, pcre, libelf
+# use utillinuxMinimal to avoid circular dependency (utillinux, systemd, glib)
+, utillinuxMinimal ? null
 
 # this is just for tests (not in closure of any regular package)
 , coreutils, dbus_daemon, libxml2, tzdata, desktop_file_utils, shared_mime_info, doCheck ? false
@@ -8,6 +10,7 @@
 with stdenv.lib;
 
 assert stdenv.isFreeBSD || stdenv.isDarwin || stdenv.cc.isGNU;
+assert stdenv.isLinux -> utillinuxMinimal != null;
 
 # TODO:
 # * Add gio-module-fam
@@ -39,8 +42,8 @@ let
     ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true
   '';
 
-  ver_maj = "2.48";
-  ver_min = "2";
+  ver_maj = "2.50";
+  ver_min = "0";
 in
 
 stdenv.mkDerivation rec {
@@ -48,7 +51,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnome/sources/glib/${ver_maj}/${name}.tar.xz";
-    sha256 = "f25e751589cb1a58826eac24fbd4186cda4518af772806b666a3f91f66e6d3f4";
+    sha256 = "830b551fa626bda06e12729205b3c5bb0d82b924a8cf64d948945878f01b7d70";
   };
 
   patches = optional stdenv.isDarwin ./darwin-compilation.patch ++ optional doCheck ./skip-timer-test.patch;
@@ -59,6 +62,7 @@ stdenv.mkDerivation rec {
   setupHook = ./setup-hook.sh;
 
   buildInputs = [ libelf setupHook pcre ]
+    ++ optionals stdenv.isLinux [ utillinuxMinimal ] # for libmount
     ++ optionals doCheck [ tzdata libxml2 desktop_file_utils shared_mime_info ];
 
   nativeBuildInputs = [ pkgconfig gettext perl python ];
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index 15c455b7afb8..4e03293fdf96 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -82,7 +82,7 @@ stdenv.mkDerivation ({
       "--enable-add-ons"
       "--enable-obsolete-rpc"
       "--sysconfdir=/etc"
-      "libc_cv_ssp=no"
+      "--enable-stackguard-randomization"
       (if linuxHeaders != null
        then "--with-headers=${linuxHeaders}/include"
        else "--without-headers")
diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix
index 1c116c8d9870..d6c496819da5 100644
--- a/pkgs/development/libraries/glibc/default.nix
+++ b/pkgs/development/libraries/glibc/default.nix
@@ -33,6 +33,9 @@ in
       makeFlagsArray+=("bindir=$bin/bin" "sbindir=$bin/sbin" "rootsbindir=$bin/sbin")
     '';
 
+    # The stackprotector and fortify hardening flags are autodetected by glibc
+    # and enabled by default if supported. Setting it for every gcc invocation
+    # does not work.
     hardeningDisable = [ "stackprotector" "fortify" ];
 
     # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for
diff --git a/pkgs/development/libraries/glibmm/default.nix b/pkgs/development/libraries/glibmm/default.nix
index ba26a9a58515..0b966c65f38d 100644
--- a/pkgs/development/libraries/glibmm/default.nix
+++ b/pkgs/development/libraries/glibmm/default.nix
@@ -1,15 +1,15 @@
 { stdenv, fetchurl, pkgconfig, gnum4, glib, libsigcxx }:
 
 let
-  ver_maj = "2.48";
-  ver_min = "1";
+  ver_maj = "2.50";
+  ver_min = "0";
 in
 stdenv.mkDerivation rec {
   name = "glibmm-${ver_maj}.${ver_min}";
 
   src = fetchurl {
     url = "mirror://gnome/sources/glibmm/${ver_maj}/${name}.tar.xz";
-    sha256 = "1pvw2mrm03p51p03179rb6fk9p42iykkwj1jcdv7jr265xymy8nw";
+    sha256 = "df726e3c6ef42b7621474b03b644a2e40ec4eef94a1c5a932c1e740a78f95e94";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix
index 57c42ee21efe..7154db626aac 100644
--- a/pkgs/development/libraries/gobject-introspection/default.nix
+++ b/pkgs/development/libraries/gobject-introspection/default.nix
@@ -7,7 +7,7 @@
 # In that case its about 6MB which could be separated
 
 let
-  ver_maj = "1.48";
+  ver_maj = "1.50";
   ver_min = "0";
 in
 with stdenv.lib;
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnome/sources/gobject-introspection/${ver_maj}/${name}.tar.xz";
-    sha256 = "0xsqwxhfqzr79av89mg766kxpb2i41bd0vwspk01xjdzrnn5l9zs";
+    sha256 = "1c6597c666f543c70ef3d7c893ab052968afae620efdc080c36657f4226337c5";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix
index df645f109613..91407e556c05 100644
--- a/pkgs/development/libraries/gtk+/2.x.nix
+++ b/pkgs/development/libraries/gtk+/2.x.nix
@@ -44,6 +44,8 @@ stdenv.mkDerivation rec {
 
   postInstall = ''
     moveToOutput share/gtk-2.0/demo "$devdoc"
+    # The updater is needed for nixos env and it's tiny.
+    moveToOutput bin/gtk-update-icon-cache "$out"
   '';
 
   passthru = {
diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix
index df223688d46d..9882cd7692c1 100644
--- a/pkgs/development/libraries/gtk+/3.x.nix
+++ b/pkgs/development/libraries/gtk+/3.x.nix
@@ -12,8 +12,8 @@ assert cupsSupport -> cups != null;
 with stdenv.lib;
 
 let
-  ver_maj = "3.20";
-  ver_min = "9";
+  ver_maj = "3.22";
+  ver_min = "1";
   version = "${ver_maj}.${ver_min}";
 in
 stdenv.mkDerivation rec {
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnome/sources/gtk+/${ver_maj}/gtk+-${version}.tar.xz";
-    sha256 = "05xcwvy68p7f4hdhi4bgdm3aycvqqr4pr5kkkr8ba91l5yx0k9l3";
+    sha256 = "127c8c5cfc32681f9ab3cb542eb0d5c16c1c02faba68bf8fcac9a3cf278ef471";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/gtkmm/2.x.nix b/pkgs/development/libraries/gtkmm/2.x.nix
index b87b60c59da9..422fdebd9c86 100644
--- a/pkgs/development/libraries/gtkmm/2.x.nix
+++ b/pkgs/development/libraries/gtkmm/2.x.nix
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
     sha256 = "1vpmjqv0aqb1ds0xi6nigxnhlr0c74090xzi15b92amlzkrjyfj4";
   };
 
+  patches = [ ./gtkmm-2.24.4-missing-operator.patch ];
+
   nativeBuildInputs = [pkgconfig];
 
   propagatedBuildInputs = [ glibmm gtk2 atkmm cairomm pangomm ];
diff --git a/pkgs/development/libraries/gtkmm/gtkmm-2.24.4-missing-operator.patch b/pkgs/development/libraries/gtkmm/gtkmm-2.24.4-missing-operator.patch
new file mode 100644
index 000000000000..c1e8cf59dde1
--- /dev/null
+++ b/pkgs/development/libraries/gtkmm/gtkmm-2.24.4-missing-operator.patch
@@ -0,0 +1,11 @@
+--- gtkmm-2.24.4/gtk/gtkmm/menushell.cc.orig	2016-08-26 21:55:08.858311055 +0000
++++ gtkmm-2.24.4/gtk/gtkmm/menushell.cc	2016-08-26 21:55:33.206310578 +0000
+@@ -130,7 +130,7 @@ MenuList::iterator MenuList::insert(Menu
+ {
+   const Glib::RefPtr<Gtk::MenuItem> item = element.get_child();
+ 
+-  g_return_val_if_fail(item != 0, position);
++  g_return_val_if_fail(!!item, position);
+   g_return_val_if_fail(gparent() != 0, position);
+ 
+   int pos = -1;
\ No newline at end of file
diff --git a/pkgs/development/libraries/kde-frameworks/default.nix b/pkgs/development/libraries/kde-frameworks/default.nix
index 0b12e42db868..cb48738dc10d 100644
--- a/pkgs/development/libraries/kde-frameworks/default.nix
+++ b/pkgs/development/libraries/kde-frameworks/default.nix
@@ -40,6 +40,7 @@ let
       let
         inherit (args) name;
         inherit (srcs."${name}") src version;
+        qtVersion = (builtins.parseDrvName self.qtbase.name).version;
       in kdeDerivation (args // {
         name = "${name}-${version}";
         inherit src;
@@ -50,6 +51,7 @@ let
           ];
           platforms = lib.platforms.linux;
           homepage = "http://www.kde.org";
+          broken = builtins.compareVersions qtVersion "5.6.0" < 0;
         } // (args.meta or {});
       });
 
diff --git a/pkgs/development/libraries/kde-frameworks/fetch.sh b/pkgs/development/libraries/kde-frameworks/fetch.sh
index 4a01d1d83147..2ccc172c0748 100644
--- a/pkgs/development/libraries/kde-frameworks/fetch.sh
+++ b/pkgs/development/libraries/kde-frameworks/fetch.sh
@@ -1 +1 @@
-WGET_ARGS=( http://download.kde.org/stable/frameworks/5.24/ -A '*.tar.xz' )
+WGET_ARGS=( http://download.kde.org/stable/frameworks/5.26/ -A '*.tar.xz' )
diff --git a/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix b/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix
index 8ac0adafbd18..bbb480c31658 100644
--- a/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix
+++ b/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix
@@ -1,11 +1,7 @@
-{ kdeFramework, lib
-, ecm
-, kconfig
-, kcoreaddons
-, kcrash
-, kdbusaddons
-, kwindowsystem
-, qtx11extras
+{
+  kdeFramework, lib, ecm,
+  kconfig, kcoreaddons, kcrash, kdbusaddons, kservice, kwindowsystem,
+  qtx11extras
 }:
 
 kdeFramework {
@@ -13,6 +9,6 @@ kdeFramework {
   meta = { maintainers = [ lib.maintainers.ttuegel ]; };
   nativeBuildInputs = [ ecm ];
   propagatedBuildInputs = [
-    kconfig kcoreaddons kcrash kdbusaddons kwindowsystem qtx11extras
+    kconfig kcoreaddons kcrash kdbusaddons kservice kwindowsystem qtx11extras
   ];
 }
diff --git a/pkgs/development/libraries/kde-frameworks/kservice/default.nix b/pkgs/development/libraries/kde-frameworks/kservice/default.nix
index 12e617a7d9af..ca840fc8b71a 100644
--- a/pkgs/development/libraries/kde-frameworks/kservice/default.nix
+++ b/pkgs/development/libraries/kde-frameworks/kservice/default.nix
@@ -1,12 +1,13 @@
 {
-  kdeFramework, lib, copyPathsToStore, ecm,
+  kdeFramework, lib, copyPathsToStore,
+  bison, ecm, flex,
   kconfig, kcoreaddons, kcrash, kdbusaddons, kdoctools, ki18n, kwindowsystem
 }:
 
 kdeFramework {
   name = "kservice";
   meta = { maintainers = [ lib.maintainers.ttuegel ]; };
-  propagatedNativeBuildInputs = [ ecm ];
+  propagatedNativeBuildInputs = [ bison ecm flex ];
   nativeBuildInputs = [ kdoctools ];
   propagatedBuildInputs = [ kconfig kcoreaddons kcrash kdbusaddons ki18n kwindowsystem ];
   patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
diff --git a/pkgs/development/libraries/kde-frameworks/solid.nix b/pkgs/development/libraries/kde-frameworks/solid.nix
index aad6e5eb601b..de10a7345581 100644
--- a/pkgs/development/libraries/kde-frameworks/solid.nix
+++ b/pkgs/development/libraries/kde-frameworks/solid.nix
@@ -1,11 +1,12 @@
-{ kdeFramework, lib
-, ecm
-, qtdeclarative
+{
+  kdeFramework, lib,
+  bison, ecm, flex,
+  qtdeclarative
 }:
 
 kdeFramework {
   name = "solid";
   meta = { maintainers = [ lib.maintainers.ttuegel ]; };
-  nativeBuildInputs = [ ecm ];
+  nativeBuildInputs = [ bison ecm flex ];
   propagatedBuildInputs = [ qtdeclarative ];
 }
diff --git a/pkgs/development/libraries/kde-frameworks/srcs.nix b/pkgs/development/libraries/kde-frameworks/srcs.nix
index 5c48ece1e99e..ec1602d5aa22 100644
--- a/pkgs/development/libraries/kde-frameworks/srcs.nix
+++ b/pkgs/development/libraries/kde-frameworks/srcs.nix
@@ -1,581 +1,581 @@
-# DO NOT EDIT! This file is generated automatically by fetchsrcs.sh
+# DO NOT EDIT! This file is generated automatically by fetch-kde-qt.sh
 { fetchurl, mirror }:
 
 {
   attica = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/attica-5.24.0.tar.xz";
-      sha256 = "0d368gmds7m7k5pnn625wqsij38cvxk1gkm4zv24phnk9f67v7cw";
-      name = "attica-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/attica-5.26.0.tar.xz";
+      sha256 = "1z7718vzknp25lzx4kh0k7xw7jgx5q8afwhfcdqhfrbydbch5ilc";
+      name = "attica-5.26.0.tar.xz";
     };
   };
   baloo = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/baloo-5.24.0.tar.xz";
-      sha256 = "1ayfdg6j9lvas17ryjdv4a0kaj6vw3bxfy2x9nadl0gkc9pak4nh";
-      name = "baloo-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/baloo-5.26.0.tar.xz";
+      sha256 = "0cgk2fmm1hivzjajih3f09x901cncl2rxxp4qq7wz6g7d2s59pfy";
+      name = "baloo-5.26.0.tar.xz";
     };
   };
   bluez-qt = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/bluez-qt-5.24.0.tar.xz";
-      sha256 = "0gy0m7lcwwklf021l5i3v7j0cl7qz7cgvzrwpj87ix3kyw5xs80z";
-      name = "bluez-qt-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/bluez-qt-5.26.0.tar.xz";
+      sha256 = "0n235jsx6vw4v13y3hkbiz5fh4453avgvrwd1zzs4yc5mkz5w837";
+      name = "bluez-qt-5.26.0.tar.xz";
     };
   };
   breeze-icons = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/breeze-icons-5.24.0.tar.xz";
-      sha256 = "1dh7bijx99sdb3vn6394wmm5cq0fvvmz8h17sx4hakmbga849cx2";
-      name = "breeze-icons-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/breeze-icons-5.26.0.tar.xz";
+      sha256 = "1kbbiid89inb7dpn0z612gb7v4p2msbvp9g5varb7wvyld1dgh59";
+      name = "breeze-icons-5.26.0.tar.xz";
     };
   };
   extra-cmake-modules = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/extra-cmake-modules-5.24.0.tar.xz";
-      sha256 = "01m12ml529pwr2sal951r5z6yb1rwbpid1y4k14nlk3xqgmdakwa";
-      name = "extra-cmake-modules-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/extra-cmake-modules-5.26.0.tar.xz";
+      sha256 = "1v3riz49r7pwvnj1ls6wnw0c4g69iky9yck2m4hgr9641k0rqlnd";
+      name = "extra-cmake-modules-5.26.0.tar.xz";
     };
   };
   frameworkintegration = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/frameworkintegration-5.24.0.tar.xz";
-      sha256 = "0brqgq05m06d98qqvyh30727f5z7hlzxgqysfhfvqzcf3x7f6yzj";
-      name = "frameworkintegration-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/frameworkintegration-5.26.0.tar.xz";
+      sha256 = "0lqnwgsd6ads17qzdbd75azpk1h5ky3924ygzhbam1llnvcvfk9p";
+      name = "frameworkintegration-5.26.0.tar.xz";
     };
   };
   kactivities = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kactivities-5.24.0.tar.xz";
-      sha256 = "0s8g43zk6h35bq1am1nnhj0qvmhd6kz42gs8l7ybga0367jghzhf";
-      name = "kactivities-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kactivities-5.26.0.tar.xz";
+      sha256 = "0cnciipmflnn1dxz69iqc2xy6g27sw4yr17yq3hp0r6kkycmpf71";
+      name = "kactivities-5.26.0.tar.xz";
     };
   };
   kactivities-stats = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kactivities-stats-5.24.0.tar.xz";
-      sha256 = "1z3xvpifxbd05b2xaxxyiypcpid7jgjb1qpwiyjj1gnfp4rjmzpc";
-      name = "kactivities-stats-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kactivities-stats-5.26.0.tar.xz";
+      sha256 = "0vpbsg6jswaw3ax4ypp6ak823iymh9jqdf7ssn9kqljynnjhnfv8";
+      name = "kactivities-stats-5.26.0.tar.xz";
     };
   };
   kapidox = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kapidox-5.24.0.tar.xz";
-      sha256 = "19a7alvn71nxflsyi7y3hghx1iw04qqc77qy54mcxcpkiyvpsggf";
-      name = "kapidox-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kapidox-5.26.0.tar.xz";
+      sha256 = "1snz4szrgbdzy03jc0sax9r7b1jynj2npil1ngpr40xchs70vnb8";
+      name = "kapidox-5.26.0.tar.xz";
     };
   };
   karchive = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/karchive-5.24.0.tar.xz";
-      sha256 = "1n5nfhrfvqnrdjgjjy7arqik4fya5bp3dvxa16mlhqr19azkavzq";
-      name = "karchive-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/karchive-5.26.0.tar.xz";
+      sha256 = "1sysk9zznnahrdjfxxp3aaw6qy9c5l7agh1nbhnk0j5xm31js25g";
+      name = "karchive-5.26.0.tar.xz";
     };
   };
   kauth = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kauth-5.24.0.tar.xz";
-      sha256 = "14sjjfgl3arqyqcr77w9qhpnd8mrnh53r5rfss6bvlk26bmihs49";
-      name = "kauth-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kauth-5.26.0.tar.xz";
+      sha256 = "08k1x943z7a044ihv79lm1c0vas5x9wc9wr4qirhllkrxd87nsc1";
+      name = "kauth-5.26.0.tar.xz";
     };
   };
   kbookmarks = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kbookmarks-5.24.0.tar.xz";
-      sha256 = "10d8dnhvbrwp0dbmz93cqfdff6ir8iy3yiwaf9ihj6ma124qlyjn";
-      name = "kbookmarks-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kbookmarks-5.26.0.tar.xz";
+      sha256 = "0phhf5xv11iyf5vi8x6xwx7rqlxc27451bwmm2sr0c65bnnkj57j";
+      name = "kbookmarks-5.26.0.tar.xz";
     };
   };
   kcmutils = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kcmutils-5.24.0.tar.xz";
-      sha256 = "0aws1c76s6wbp0xpr6qv6cfwq8dw82v00pkf9gy84sbxknwjnizk";
-      name = "kcmutils-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kcmutils-5.26.0.tar.xz";
+      sha256 = "1pymbf50idnrz8vyy9lm9535h6s7ssd3p70fdg8dicx7lx6s5grd";
+      name = "kcmutils-5.26.0.tar.xz";
     };
   };
   kcodecs = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kcodecs-5.24.0.tar.xz";
-      sha256 = "1qpzjh3qc2zz80j2bmlinipbispms14k9bmqw8v61zhi6in9z14c";
-      name = "kcodecs-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kcodecs-5.26.0.tar.xz";
+      sha256 = "18xzxi5y47rn3wlxz3m98ix7sd20vmxnqsm3lksgakk08qcv47wk";
+      name = "kcodecs-5.26.0.tar.xz";
     };
   };
   kcompletion = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kcompletion-5.24.0.tar.xz";
-      sha256 = "1qln0v31gn86kzwhnkijr1ydf129n32jmiybbckrp4w6hyx6xfxv";
-      name = "kcompletion-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kcompletion-5.26.0.tar.xz";
+      sha256 = "1f3h6qrpqsdds5zf99qkzxan2lh1y83d67pdswqvbfvwhr3bnl7s";
+      name = "kcompletion-5.26.0.tar.xz";
     };
   };
   kconfig = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kconfig-5.24.0.tar.xz";
-      sha256 = "1dc2i6icyigw1j6qxgdza6j2g8afh390qmxsa2a54mwl84fkfmxv";
-      name = "kconfig-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kconfig-5.26.0.tar.xz";
+      sha256 = "0rsym5196agxzxzfxzywvsqlgvarnvw91zx04xvlsy70fnj70c4d";
+      name = "kconfig-5.26.0.tar.xz";
     };
   };
   kconfigwidgets = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kconfigwidgets-5.24.0.tar.xz";
-      sha256 = "0v25r50gh5i984lzlv0rradghglcfqf0gsfmnkn23h87b86fm9l2";
-      name = "kconfigwidgets-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kconfigwidgets-5.26.0.tar.xz";
+      sha256 = "08jr6rhh8fi85827bqxh8v4pavq63i2kzwbvqcfpvrrncj5aj4ci";
+      name = "kconfigwidgets-5.26.0.tar.xz";
     };
   };
   kcoreaddons = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kcoreaddons-5.24.0.tar.xz";
-      sha256 = "06sx7by3nvaridnavj5p0bxv4nh47n708jlacfw8ydaikmd9i03h";
-      name = "kcoreaddons-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kcoreaddons-5.26.0.tar.xz";
+      sha256 = "10krqzrmbzzkj0xg5rxgs6i4ngg57ydqn3fkmpyz0x6g4yl3raqz";
+      name = "kcoreaddons-5.26.0.tar.xz";
     };
   };
   kcrash = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kcrash-5.24.0.tar.xz";
-      sha256 = "1lahgfwlp9b5rsl244kzp7rsl4ybv1q4qlvpv0xxz5ygssk48l0w";
-      name = "kcrash-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kcrash-5.26.0.tar.xz";
+      sha256 = "0x60rw2zy37s38fpa8agggl9mm4kgvdabbcgr673p7b6k6vj46j8";
+      name = "kcrash-5.26.0.tar.xz";
     };
   };
   kdbusaddons = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kdbusaddons-5.24.0.tar.xz";
-      sha256 = "183nxqrhz4qk4qfp1w4an0scp2dvfqcaqbpg4cgbgk0z590q0pkk";
-      name = "kdbusaddons-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kdbusaddons-5.26.0.tar.xz";
+      sha256 = "0wl5lpqqcckn003kqfz1wapi40wkn4xjk878zwykg3lplxfdlsqw";
+      name = "kdbusaddons-5.26.0.tar.xz";
     };
   };
   kdeclarative = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kdeclarative-5.24.0.tar.xz";
-      sha256 = "00ik9q1r6y6g5rkdq96yczgrxmcg85x00lipyljvc3x6xw6bixbz";
-      name = "kdeclarative-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kdeclarative-5.26.0.tar.xz";
+      sha256 = "0hmj0aj559i9flsw72zzwb2s95ajnzqh11rrs6wmcraywd4xywk8";
+      name = "kdeclarative-5.26.0.tar.xz";
     };
   };
   kded = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kded-5.24.0.tar.xz";
-      sha256 = "0ngpxdxb596myn5r4kjxahx195bwklq33yvgjvcbxi2clg2wccaj";
-      name = "kded-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kded-5.26.0.tar.xz";
+      sha256 = "0rk8jh0bg6wqfpjcg0g1i2frmhprc8pmnj6bwdifx119kh894n0l";
+      name = "kded-5.26.0.tar.xz";
     };
   };
   kdelibs4support = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/portingAids/kdelibs4support-5.24.0.tar.xz";
-      sha256 = "12sis63mq6i372bhx64x8y0pw6czrv64hdhjscx27cx65a4ir451";
-      name = "kdelibs4support-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/portingAids/kdelibs4support-5.26.0.tar.xz";
+      sha256 = "0jc05qzpcn72rvfyink7x56hvc7g21dcmgkfdx9w84brvqjnscz8";
+      name = "kdelibs4support-5.26.0.tar.xz";
     };
   };
   kdesignerplugin = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kdesignerplugin-5.24.0.tar.xz";
-      sha256 = "0i0s8pwwhwh5hyyvkv0cnj0yyv0g5bnm5xw18knv2yagiy4bvb2j";
-      name = "kdesignerplugin-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kdesignerplugin-5.26.0.tar.xz";
+      sha256 = "10c8d83zl8qlg785rxn4d5ps18p0zplf5l00jnq8ikpa4ijnyn2j";
+      name = "kdesignerplugin-5.26.0.tar.xz";
     };
   };
   kdesu = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kdesu-5.24.0.tar.xz";
-      sha256 = "1ivcnhgvq75xvl0w9g7m45qzallz42ijaq0n1ap09lpdfmjbnrxk";
-      name = "kdesu-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kdesu-5.26.0.tar.xz";
+      sha256 = "0kxqrzbhjahp0cx3n828q2gh1bdxsp7gmhahbhfzasknkvp1nqqs";
+      name = "kdesu-5.26.0.tar.xz";
     };
   };
   kdewebkit = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kdewebkit-5.24.0.tar.xz";
-      sha256 = "1xq36zv7vnllhqbisl6kcna8z6qzlvy29a47g0hbzgl8rc93qskf";
-      name = "kdewebkit-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kdewebkit-5.26.0.tar.xz";
+      sha256 = "1z66jm8zpmksbdk7yzvcps712wd8d85r0dxw8zj3vw0z5yd68cmm";
+      name = "kdewebkit-5.26.0.tar.xz";
     };
   };
   kdnssd = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kdnssd-5.24.0.tar.xz";
-      sha256 = "01b650g031apxc3vd2m91g2fxqk9l8ap67z6rafniphfwy8i0d5m";
-      name = "kdnssd-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kdnssd-5.26.0.tar.xz";
+      sha256 = "0jamzv7wxp50awjzk1vwhmj8pldnm6hjxx5zvsjfif26va30w0q3";
+      name = "kdnssd-5.26.0.tar.xz";
     };
   };
   kdoctools = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kdoctools-5.24.0.tar.xz";
-      sha256 = "1r129kpq0d11b9l87cqbal6fm5ycwhsps1g3r1a7jsxz70scz4ri";
-      name = "kdoctools-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kdoctools-5.26.0.tar.xz";
+      sha256 = "1306ag1waw0cxkvwbb0n9gb9yc9nw6zzjssjrn19z366yp1z9ja8";
+      name = "kdoctools-5.26.0.tar.xz";
     };
   };
   kemoticons = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kemoticons-5.24.0.tar.xz";
-      sha256 = "0gmc52k5jb553jvzxwsq79v5y87kgav8i5qqv4bqc9yl7p866zhn";
-      name = "kemoticons-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kemoticons-5.26.0.tar.xz";
+      sha256 = "09qpw3vr4l80hp4j6v73nsncmsrsxww2hab9c24i3167ygsvca5s";
+      name = "kemoticons-5.26.0.tar.xz";
     };
   };
   kfilemetadata = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kfilemetadata-5.24.0.tar.xz";
-      sha256 = "02n9qhpr0jlwdgdbid0k34abhs3bzhlsa56ybl5dq1aib6izk1sy";
-      name = "kfilemetadata-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kfilemetadata-5.26.0.tar.xz";
+      sha256 = "1y80llazn66f7vndyzspz7w0n1g2xhi8g13qwakws278wsi04p1l";
+      name = "kfilemetadata-5.26.0.tar.xz";
     };
   };
   kglobalaccel = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kglobalaccel-5.24.0.tar.xz";
-      sha256 = "123v0ld1q88hbm3d0mqgq6lcivfkqh7pbz4hb4n76ab5v43qc15c";
-      name = "kglobalaccel-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kglobalaccel-5.26.0.tar.xz";
+      sha256 = "0a1q9pif4n8fmp9kw8sbiaia2znc657fm1mi9gyvp5amphjjkzdd";
+      name = "kglobalaccel-5.26.0.tar.xz";
     };
   };
   kguiaddons = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kguiaddons-5.24.0.tar.xz";
-      sha256 = "0ig96ah20ybg5rwpswj9va2klvkh2q4amwxmgy3z4niwfsm2g3ic";
-      name = "kguiaddons-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kguiaddons-5.26.0.tar.xz";
+      sha256 = "0gaaxkzjpdqk8534dpbn6dxb83nckh1g7w62nssv4a2jwfkyrmgp";
+      name = "kguiaddons-5.26.0.tar.xz";
     };
   };
   khtml = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/portingAids/khtml-5.24.0.tar.xz";
-      sha256 = "0f19m8ycaa41p61i0j43gafn364abral8dbiqhr0qcj33nsa4134";
-      name = "khtml-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/portingAids/khtml-5.26.0.tar.xz";
+      sha256 = "1h1dacbwix1j9r0hgnpxhgjfbffh545852n2yn8kl25bf2ppx3m8";
+      name = "khtml-5.26.0.tar.xz";
     };
   };
   ki18n = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/ki18n-5.24.0.tar.xz";
-      sha256 = "0cw24spmwsqa3ppkw03cm6yjd3sfll0dbbk2ya76fd4nw9hb00dv";
-      name = "ki18n-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/ki18n-5.26.0.tar.xz";
+      sha256 = "1f5xr2zskmi9x0xp6drg4mx41hs3ssyskpkd5x01b6s51av0i247";
+      name = "ki18n-5.26.0.tar.xz";
     };
   };
   kiconthemes = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kiconthemes-5.24.0.tar.xz";
-      sha256 = "1k5zig2n6wzfyv6pc8dpas2862mxjyxxza00m31myrfw5i1a1h6m";
-      name = "kiconthemes-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kiconthemes-5.26.0.tar.xz";
+      sha256 = "0zccfdwy12zssbca4szwypykzvz3yiqwi69sz1ndpiwsvvp575b7";
+      name = "kiconthemes-5.26.0.tar.xz";
     };
   };
   kidletime = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kidletime-5.24.0.tar.xz";
-      sha256 = "09jsj0pj27h93nr8v46savs6b93h8frydinfr7wlijkvpsl02jb4";
-      name = "kidletime-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kidletime-5.26.0.tar.xz";
+      sha256 = "13wpfkr3jsj3p16c67jfiy60pi0j1b85wrkc9bqx91wl8a22xy02";
+      name = "kidletime-5.26.0.tar.xz";
     };
   };
   kimageformats = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kimageformats-5.24.0.tar.xz";
-      sha256 = "12mhgckmhnvcnm8k7mk15mipxrnm7i9ip7ykbjh8nxjiwyk1pmwc";
-      name = "kimageformats-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kimageformats-5.26.0.tar.xz";
+      sha256 = "13ibvrfjxm799sis1cilyaqc6cnb9wr464z605skn7qd2gqz7xfx";
+      name = "kimageformats-5.26.0.tar.xz";
     };
   };
   kinit = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kinit-5.24.0.tar.xz";
-      sha256 = "1i7l6gid5hrrfglw1c461gpjg51dwz7cl4lx7ll8vz2ha8mz4d3n";
-      name = "kinit-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kinit-5.26.0.tar.xz";
+      sha256 = "031wjnniqmvix70da4x019r21zcv99xa4njzk0nccfihpn6i2nx9";
+      name = "kinit-5.26.0.tar.xz";
     };
   };
   kio = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kio-5.24.0.tar.xz";
-      sha256 = "0zncj9yf8zaylazlwvirylpk9vki3j889b1x2s0aav54vvj7vdi5";
-      name = "kio-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kio-5.26.0.tar.xz";
+      sha256 = "1kvn570gcpzvm4fc8jygvf3w5jbgsjm4sr2bysbvw4zk983ldma0";
+      name = "kio-5.26.0.tar.xz";
     };
   };
   kitemmodels = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kitemmodels-5.24.0.tar.xz";
-      sha256 = "1s1p4nw1pqdzbdwvjnka17p9avf00wadr437p4f96md1lvh3sh69";
-      name = "kitemmodels-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kitemmodels-5.26.0.tar.xz";
+      sha256 = "1qizknavlgnhc5dqrq5ins6k4s43s815v7inzwhs4qrgv175qcjv";
+      name = "kitemmodels-5.26.0.tar.xz";
     };
   };
   kitemviews = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kitemviews-5.24.0.tar.xz";
-      sha256 = "0y3fx9hk1x27arrmwfzq783a44cs7p8dpmhxrwzh0di4mwa8jafw";
-      name = "kitemviews-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kitemviews-5.26.0.tar.xz";
+      sha256 = "1z4j1h0bykb3544iy48halb9mrjmkrd40x2c09qsm2r1kc7n3312";
+      name = "kitemviews-5.26.0.tar.xz";
     };
   };
   kjobwidgets = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kjobwidgets-5.24.0.tar.xz";
-      sha256 = "1mcvrz66xcqjgbp08zpqsf943cm462wbqm5gh719p9s25hx8hwrc";
-      name = "kjobwidgets-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kjobwidgets-5.26.0.tar.xz";
+      sha256 = "0l2h7ghnrs3w8md5yajnbfl6na5ldg17sh9ifvhcwg6n9s57mibb";
+      name = "kjobwidgets-5.26.0.tar.xz";
     };
   };
   kjs = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/portingAids/kjs-5.24.0.tar.xz";
-      sha256 = "1qd5sdfrdg7id0g5mwf3ijwlfvh3g36kwnckw6kwns1nf4q6gwlz";
-      name = "kjs-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/portingAids/kjs-5.26.0.tar.xz";
+      sha256 = "1f8mhhzq5k3ifpa1b0yspy886j9b82isz0vw16zl611fr564jln2";
+      name = "kjs-5.26.0.tar.xz";
     };
   };
   kjsembed = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/portingAids/kjsembed-5.24.0.tar.xz";
-      sha256 = "1nx8ch8mzd1jyx8pd46364ij0bsbsclbipbgr6jm9aak3n13b0nw";
-      name = "kjsembed-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/portingAids/kjsembed-5.26.0.tar.xz";
+      sha256 = "030wrrxsdfkyalydi39s85hm0rgfx7647c4a4c1cck2v67k8iq3d";
+      name = "kjsembed-5.26.0.tar.xz";
     };
   };
   kmediaplayer = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/portingAids/kmediaplayer-5.24.0.tar.xz";
-      sha256 = "147xrffkvkyv3h8ighc1vlwksysfrqc0g55k8zrd72l6r0kjjh0p";
-      name = "kmediaplayer-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/portingAids/kmediaplayer-5.26.0.tar.xz";
+      sha256 = "0zq9xx6g0lfdyxrkrjqyrq6hnygpd7n0grrm6a75hdmyh3lklrvv";
+      name = "kmediaplayer-5.26.0.tar.xz";
     };
   };
   knewstuff = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/knewstuff-5.24.0.tar.xz";
-      sha256 = "0xdv3wh3100vzsx8p2zihy1dvh0wzfmrjkjq71v8igwz5d291zsj";
-      name = "knewstuff-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/knewstuff-5.26.0.tar.xz";
+      sha256 = "0jd80wmdz241ddk4wdqwrb655r5lzxbxbp0mjyljgi1mwlrhkry4";
+      name = "knewstuff-5.26.0.tar.xz";
     };
   };
   knotifications = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/knotifications-5.24.0.tar.xz";
-      sha256 = "0qryp41phnpx4r9wa6rfhmnzy7nxl0ijnyrafadf2n2xb53ipkpa";
-      name = "knotifications-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/knotifications-5.26.0.tar.xz";
+      sha256 = "01fvbi4dlqhia5iqj0iddbvkzjafw698pmh2ii9ynb071sqyb2pq";
+      name = "knotifications-5.26.0.tar.xz";
     };
   };
   knotifyconfig = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/knotifyconfig-5.24.0.tar.xz";
-      sha256 = "1dij841fnqia4p44x2wnpdvl8cn3nkj833y0fah50fmipjc8r70b";
-      name = "knotifyconfig-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/knotifyconfig-5.26.0.tar.xz";
+      sha256 = "14ri2zkzc1b3wqvfb3v6rv0ri5srm7zjk06v9j5bwz778vdh436z";
+      name = "knotifyconfig-5.26.0.tar.xz";
     };
   };
   kpackage = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kpackage-5.24.0.tar.xz";
-      sha256 = "03aqzkpqz3c1v4qgwfbs3ncdbapiyg7psrkhxqv3z48rklavk1ri";
-      name = "kpackage-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kpackage-5.26.0.tar.xz";
+      sha256 = "1laq92gi67gn6gjz9nw51idq0wwyfwy6syfch0mssw3nbv7araqg";
+      name = "kpackage-5.26.0.tar.xz";
     };
   };
   kparts = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kparts-5.24.0.tar.xz";
-      sha256 = "0z7qr93aq02i7g7cxgypx2rzlnsvbsx9cjblb0ijmad1nb8w3mix";
-      name = "kparts-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kparts-5.26.0.tar.xz";
+      sha256 = "1ni17k02152axvkx666lx77zwpbsfahknrhgy8y8sy2dbn47jvya";
+      name = "kparts-5.26.0.tar.xz";
     };
   };
   kpeople = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kpeople-5.24.0.tar.xz";
-      sha256 = "0iknzkj23y927xh24kw5sjxyirhy6pkmfcmmgwzd78rba8a54qp2";
-      name = "kpeople-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kpeople-5.26.0.tar.xz";
+      sha256 = "1zx9mvy1j2ynbj7gg4hnvxrjr5akmrh0l82xh73l4b12l0b775ap";
+      name = "kpeople-5.26.0.tar.xz";
     };
   };
   kplotting = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kplotting-5.24.0.tar.xz";
-      sha256 = "0gpypq9kh4b5s6dc7py3m117k3nbxczsfkxgxd9zxvr35kig7ya2";
-      name = "kplotting-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kplotting-5.26.0.tar.xz";
+      sha256 = "1f695bb5n46mn362wwvwf636xjy87s63w5ac97lm1c9ndiins394";
+      name = "kplotting-5.26.0.tar.xz";
     };
   };
   kpty = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kpty-5.24.0.tar.xz";
-      sha256 = "1ybvdzqpa53kkki9p5da0ff9x3c63rmksk7865wqwlgy8apzi2fs";
-      name = "kpty-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kpty-5.26.0.tar.xz";
+      sha256 = "1f1z4z73l4xb5vymg5hsqxcgv7jm81jnjgwn0v85alfcx94dax3m";
+      name = "kpty-5.26.0.tar.xz";
     };
   };
   kross = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/portingAids/kross-5.24.0.tar.xz";
-      sha256 = "0f29dpmfcj173vqnmrbpvdmfmzzbfsds1lbl546qfx9a5acdpf2p";
-      name = "kross-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/portingAids/kross-5.26.0.tar.xz";
+      sha256 = "05ilcgq74l5m3jjr047zwz7ij60yw5xxp5cpd12892mi054ijb31";
+      name = "kross-5.26.0.tar.xz";
     };
   };
   krunner = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/krunner-5.24.0.tar.xz";
-      sha256 = "0ff87ijjd47jxf6zw2ggqgngnbyx1rj59wdfgy5wbi3acws6bafl";
-      name = "krunner-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/krunner-5.26.0.tar.xz";
+      sha256 = "050qq146g9wj51615m22l9jjxmgh3gsah3v7iflbdda5nrnzhz3v";
+      name = "krunner-5.26.0.tar.xz";
     };
   };
   kservice = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kservice-5.24.0.tar.xz";
-      sha256 = "0w0nsg64d6xhgijr2vh0j5p544qi0q55jpqa9v9mv956zrrdssdk";
-      name = "kservice-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kservice-5.26.0.tar.xz";
+      sha256 = "103hjnwh4zwpf8vz3si27jb34j6dm0ff445nc9xafnl1nkwisvgr";
+      name = "kservice-5.26.0.tar.xz";
     };
   };
   ktexteditor = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/ktexteditor-5.24.0.tar.xz";
-      sha256 = "1ykj1kvm7k1vxb1w235d5hp2swwdqjyp2y4c3pxbvkn999h9x5q5";
-      name = "ktexteditor-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/ktexteditor-5.26.0.tar.xz";
+      sha256 = "0q84vbdkhg1sjhyrcv9y8cdv5qx09f1pz5wiw7dzdw06q9xgi3v4";
+      name = "ktexteditor-5.26.0.tar.xz";
     };
   };
   ktextwidgets = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/ktextwidgets-5.24.0.tar.xz";
-      sha256 = "1q10xav2gkii6s3m31c9xvxf1988l7k2lpib6pyhgsidflmwjm02";
-      name = "ktextwidgets-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/ktextwidgets-5.26.0.tar.xz";
+      sha256 = "0qafnlzkdqbp1par1s6mish46arbqwbl4xclvql168dlwxgd6b42";
+      name = "ktextwidgets-5.26.0.tar.xz";
     };
   };
   kunitconversion = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kunitconversion-5.24.0.tar.xz";
-      sha256 = "03dfjn4lm6sl2zcdrvw0b9irzvkyc2w2j5xixag5j8nw373742h8";
-      name = "kunitconversion-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kunitconversion-5.26.0.tar.xz";
+      sha256 = "08nd2i76l4mvgav69qcsq0rwc0r9rkmqy0d4d3b4bc9957yfhk4i";
+      name = "kunitconversion-5.26.0.tar.xz";
     };
   };
   kwallet = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kwallet-5.24.0.tar.xz";
-      sha256 = "0zad5h4vsvcl2xv3vxsjwh42b71xbp6x6rj8cvmw8szr2rzz9gsx";
-      name = "kwallet-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kwallet-5.26.0.tar.xz";
+      sha256 = "0a3l079zry8bmwkd2lx0cvmkj8p3pvrvpffikca6z4qdw4mnnxjs";
+      name = "kwallet-5.26.0.tar.xz";
     };
   };
   kwayland = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kwayland-5.24.0.tar.xz";
-      sha256 = "1h5anbqrxcl1s8kx1l53vcsfr8ifamcjqd47dk8a7lwr1ga6myq2";
-      name = "kwayland-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kwayland-5.26.0.tar.xz";
+      sha256 = "1ca2f0k1qsra3c014c3lrn2qxsdq1whk5lqrxqc9dqbpvpyjy939";
+      name = "kwayland-5.26.0.tar.xz";
     };
   };
   kwidgetsaddons = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kwidgetsaddons-5.24.0.tar.xz";
-      sha256 = "1kppx0ppfhnb6q6sijs2dffyar86wkkx8miqavsjsgw1l2wiymcx";
-      name = "kwidgetsaddons-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kwidgetsaddons-5.26.0.tar.xz";
+      sha256 = "1jam478939cibyhnwg6n3fwyqg8lx1njjbqmlqq4cmp9j62100cn";
+      name = "kwidgetsaddons-5.26.0.tar.xz";
     };
   };
   kwindowsystem = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kwindowsystem-5.24.0.tar.xz";
-      sha256 = "0w5ym8msl80v3q65253pdpj9f1fmb658rnndlbkrgpmm1rv1n6dz";
-      name = "kwindowsystem-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kwindowsystem-5.26.0.tar.xz";
+      sha256 = "1jmacixr2il5wpw7wzaqswslvmxam3qf7mih271qzbx6k6ngdyk3";
+      name = "kwindowsystem-5.26.0.tar.xz";
     };
   };
   kxmlgui = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kxmlgui-5.24.0.tar.xz";
-      sha256 = "1qhixldhhcbklmrpjh67440h1rrzqy70h57hw6ialjdsr3pl6ihp";
-      name = "kxmlgui-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kxmlgui-5.26.0.tar.xz";
+      sha256 = "18w41iyfg2iphav2g7qikg4ccv2cr0wl5a6r9h460f45vq9aph4z";
+      name = "kxmlgui-5.26.0.tar.xz";
     };
   };
   kxmlrpcclient = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/kxmlrpcclient-5.24.0.tar.xz";
-      sha256 = "06ap6ipzqimz1rfrcr7z8zc7idy7sg4a97dws7h52i34ms7jqnc8";
-      name = "kxmlrpcclient-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/kxmlrpcclient-5.26.0.tar.xz";
+      sha256 = "001rvsmxi1mnbrs1kplsb8vx1wfpjp9g4kwm7714w3yh6vmr9j7p";
+      name = "kxmlrpcclient-5.26.0.tar.xz";
     };
   };
   modemmanager-qt = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/modemmanager-qt-5.24.0.tar.xz";
-      sha256 = "0khz5bf84xxa8aqpzwb6x839xx6dbiadwqhyj7cvgha65fh2xinh";
-      name = "modemmanager-qt-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/modemmanager-qt-5.26.0.tar.xz";
+      sha256 = "1x4h334fcyqnclc9sxff73b79fsgg7a0r98c9palr787qvaafjv2";
+      name = "modemmanager-qt-5.26.0.tar.xz";
     };
   };
   networkmanager-qt = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/networkmanager-qt-5.24.0.tar.xz";
-      sha256 = "11wy0ds0hqbba900ggkcxjfqc9n65xlzc3h1zv9433nn5d75v6fy";
-      name = "networkmanager-qt-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/networkmanager-qt-5.26.0.tar.xz";
+      sha256 = "0yqhchkava6jsyl0gpa62x4856qszdiglwjxsba9dgl5lasfyrg0";
+      name = "networkmanager-qt-5.26.0.tar.xz";
     };
   };
   oxygen-icons5 = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/oxygen-icons5-5.24.0.tar.xz";
-      sha256 = "1c7spjbzk04725vv0ly7vmyvwa96mfa5ki2pm146ld4888a896wm";
-      name = "oxygen-icons5-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/oxygen-icons5-5.26.0.tar.xz";
+      sha256 = "0lwwl26xiya7fr5ga5kf45zvj40lm10jpd7p523v2dm0xmqbkf8n";
+      name = "oxygen-icons5-5.26.0.tar.xz";
     };
   };
   plasma-framework = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/plasma-framework-5.24.0.tar.xz";
-      sha256 = "0981vm00541dzihlr1fsax05biwp2ddpwjrmvnfysx5jagdc65cb";
-      name = "plasma-framework-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/plasma-framework-5.26.0.tar.xz";
+      sha256 = "0mjmzca0n51vwy9gxxanxfi2dvvzzdpwfjw0zdwmjm69znc870ja";
+      name = "plasma-framework-5.26.0.tar.xz";
     };
   };
   solid = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/solid-5.24.0.tar.xz";
-      sha256 = "00wvsxcnvhdx7ijzpcz5wny2ypkxr1drdpr4yvawgpwa678l1107";
-      name = "solid-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/solid-5.26.0.tar.xz";
+      sha256 = "1dlln9dqyf7md32s6a7pd23dbs6jrvv59ylldxcxgkyjyyb2g0j3";
+      name = "solid-5.26.0.tar.xz";
     };
   };
   sonnet = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/sonnet-5.24.0.tar.xz";
-      sha256 = "152xz7fb1iwhb5w1n4xqvc648iaxi0inrl4kavxcsir61das1xyl";
-      name = "sonnet-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/sonnet-5.26.0.tar.xz";
+      sha256 = "0akvlrbbk0nbyh12rmcjch122xqa3926gz3l31bvhqgm50b683z2";
+      name = "sonnet-5.26.0.tar.xz";
     };
   };
   threadweaver = {
-    version = "5.24.0";
+    version = "5.26.0";
     src = fetchurl {
-      url = "${mirror}/stable/frameworks/5.24/threadweaver-5.24.0.tar.xz";
-      sha256 = "02g60zr9cc4bg1p90giich4n0qvqaiakz0y94qrnyj9f7fg0yksl";
-      name = "threadweaver-5.24.0.tar.xz";
+      url = "${mirror}/stable/frameworks/5.26/threadweaver-5.26.0.tar.xz";
+      sha256 = "1bzlw3m1f207967pjmzlx1k0v38fwjvga9jg88iqh43zb60ks03a";
+      name = "threadweaver-5.26.0.tar.xz";
     };
   };
 }
diff --git a/pkgs/development/libraries/libcaca/default.nix b/pkgs/development/libraries/libcaca/default.nix
index ee76b79ced8c..5ff3157272ee 100644
--- a/pkgs/development/libraries/libcaca/default.nix
+++ b/pkgs/development/libraries/libcaca/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses, zlib }:
+{ stdenv, fetchurl, ncurses, zlib, imlib2, pkgconfig, libX11 }:
 
 stdenv.mkDerivation rec {
   name = "libcaca-0.99.beta19";
@@ -13,9 +13,7 @@ stdenv.mkDerivation rec {
 
   outputs = [ "bin" "dev" "out" "man" ];
 
-  configureFlags = "--disable-x11 --disable-imlib2 --disable-doc";
-
-  propagatedBuildInputs = [ ncurses zlib ];
+  propagatedBuildInputs = [ ncurses zlib imlib2 pkgconfig libX11 ];
 
   postInstall = ''
     mkdir -p $dev/bin
diff --git a/pkgs/development/libraries/libevent/default.nix b/pkgs/development/libraries/libevent/default.nix
index f273a511aafc..364ff28f9a62 100644
--- a/pkgs/development/libraries/libevent/default.nix
+++ b/pkgs/development/libraries/libevent/default.nix
@@ -1,36 +1,34 @@
-{ stdenv, fetchurl, autoreconfHook, openssl, python, findutils }:
+{ stdenv, fetchurl, autoreconfHook, openssl, findutils }:
 
 let version = "2.0.22"; in
 stdenv.mkDerivation {
   name = "libevent-${version}";
 
   src = fetchurl {
-    url = "mirror://sourceforge/levent/libevent-${version}-stable.tar.gz";
+    url = "https://github.com/libevent/libevent/releases/download/release-${version}-stable/libevent-${version}-stable.tar.gz";
     sha256 = "18qz9qfwrkakmazdlwxvjmw8p76g70n3faikwvdwznns1agw9hki";
   };
-  postPatch = "patchShebangs event_rpcgen.py";
 
   outputs = [ "out" "dev" ];
   outputBin = "dev";
 
   nativeBuildInputs = [ autoreconfHook ];
-  buildInputs = [ openssl python ] ++ stdenv.lib.optional stdenv.isCygwin findutils;
+  buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isCygwin findutils;
 
   meta = with stdenv.lib; {
     description = "Event notification library";
-
-    longDescription =
-      '' The libevent API provides a mechanism to execute a callback function
-         when a specific event occurs on a file descriptor or after a timeout
-         has been reached.  Furthermore, libevent also support callbacks due
-         to signals or regular timeouts.
-
-         libevent is meant to replace the event loop found in event driven
-         network servers.  An application just needs to call event_dispatch()
-         and then add or remove events dynamically without having to change
-         the event loop.
-      '';
-
+    longDescription = ''
+      The libevent API provides a mechanism to execute a callback function
+      when a specific event occurs on a file descriptor or after a timeout
+      has been reached.  Furthermore, libevent also support callbacks due
+      to signals or regular timeouts.
+
+      libevent is meant to replace the event loop found in event driven
+      network servers.  An application just needs to call event_dispatch()
+      and then add or remove events dynamically without having to change
+      the event loop.
+    '';
+    homepage = http://libevent.org/;
     license = licenses.bsd3;
     platforms = platforms.all;
     maintainers = with maintainers; [ wkennington ];
diff --git a/pkgs/development/libraries/libsigcxx/default.nix b/pkgs/development/libraries/libsigcxx/default.nix
index e062e2db5c29..4a309a87f2ec 100644
--- a/pkgs/development/libraries/libsigcxx/default.nix
+++ b/pkgs/development/libraries/libsigcxx/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, fetchpatch, pkgconfig, gnum4 }:
 let
-  ver_maj = "2.8"; # odd major numbers are unstable
+  ver_maj = "2.10"; # odd major numbers are unstable
   ver_min = "0";
 in
 stdenv.mkDerivation rec {
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnome/sources/libsigc++/${ver_maj}/${name}.tar.xz";
-    sha256 = "0lcnzzdq6718znfshs1hflpwqq6awbzwdyp4kv5lfaf54z880jbp";
+    sha256 = "f843d6346260bfcb4426259e314512b99e296e8ca241d771d21ac64f28298d81";
   };
   patches = [(fetchpatch {
     url = "https://anonscm.debian.org/cgit/collab-maint/libsigc++-2.0.git/plain"
diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix
index 3f5d1b917239..947a10c0e470 100644
--- a/pkgs/development/libraries/libusb1/default.nix
+++ b/pkgs/development/libraries/libusb1/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit }:
 
 stdenv.mkDerivation rec {
-  name = "libusb-1.0.19";
+  name = "libusb-1.0.20";
 
   src = fetchurl {
     url = "mirror://sourceforge/libusb/${name}.tar.bz2";
-    sha256 = "0h38p9rxfpg9vkrbyb120i1diq57qcln82h5fr7hvy82c20jql3c";
+    sha256 = "1zzp6hc7r7m3gl6zjbmzn92zkih4664cckaf49l1g5hapa8721fb";
   };
 
   outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix
index f1b69447fac5..2afbfc2fe997 100644
--- a/pkgs/development/libraries/libxslt/default.nix
+++ b/pkgs/development/libraries/libxslt/default.nix
@@ -1,27 +1,14 @@
 { stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs }:
 
 stdenv.mkDerivation rec {
-  name = "libxslt-1.1.28";
+  name = "libxslt-1.1.29";
 
   src = fetchurl {
     url = "http://xmlsoft.org/sources/${name}.tar.gz";
-    sha256 = "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz";
+    sha256 = "1klh81xbm9ppzgqk339097i39b7fnpmlj8lzn8bpczl3aww6x5xm";
   };
 
-  patches = stdenv.lib.optional stdenv.isSunOS ./patch-ah.patch
-    ++ stdenv.lib.optional (stdenv.cross.libc or null == "msvcrt")
-        (fetchpatch {
-          name = "mingw.patch";
-          url = "http://git.gnome.org/browse/libxslt/patch/?id=ab5810bf27cd63";
-          sha256 = "0kkqq3fv2k3q86al38vp6zwxazpvp5kslcjnmrq4ax5cm2zvsjk3";
-        })
-    ++ [
-      (fetchpatch {
-        name = "CVE-2015-7995.patch";
-        url = "http://git.gnome.org/browse/libxslt/patch/?id=7ca19df892ca22";
-        sha256 = "1xzg0q94dzbih9nvqp7g9ihz0a3qb0w23l1158m360z9smbi8zbd";
-      })
-    ];
+  patches = stdenv.lib.optional stdenv.isSunOS ./patch-ah.patch;
 
   outputs = [ "bin" "dev" "out" "doc" ];
 
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index 7231cf96302d..4e464907c6b4 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -26,7 +26,7 @@ if ! lists.elem stdenv.system platforms.mesaPlatforms then
 else
 
 let
-  version = "12.0.2";
+  version = "12.0.3";
   branch  = head (splitString "." version);
   driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32";
 in
@@ -40,7 +40,7 @@ stdenv.mkDerivation {
       "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
       "https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz"
     ];
-    sha256 = "d957a5cc371dcd7ff2aa0d87492f263aece46f79352f4520039b58b1f32552cb";
+    sha256 = "1dc86dd9b51272eee1fad3df65e18cda2e556ef1bc0b6e07cd750b9757f493b1";
   };
 
   prePatch = "patchShebangs .";
diff --git a/pkgs/development/libraries/nettle/default.nix b/pkgs/development/libraries/nettle/default.nix
index 6d5e36d726c2..152c592f591a 100644
--- a/pkgs/development/libraries/nettle/default.nix
+++ b/pkgs/development/libraries/nettle/default.nix
@@ -1,10 +1,10 @@
 { callPackage, fetchurl, ... } @ args:
 
 callPackage ./generic.nix (args // rec {
-  version = "3.1.1";
+  version = "3.2";
 
   src = fetchurl {
     url = "mirror://gnu/nettle/nettle-${version}.tar.gz";
-    sha256 = "0k1x57zviysvi91lkk66cg8v819vywm5g5yqs22wppfqcifx5m2z";
+    sha256 = "15wxhk52yc62rx0pddmry66hqm6z5brrrkx4npd3wh9nybg86hpa";
   };
 })
diff --git a/pkgs/development/libraries/nghttp2/default.nix b/pkgs/development/libraries/nghttp2/default.nix
index 2eff4b3b5a41..a761106d9b16 100644
--- a/pkgs/development/libraries/nghttp2/default.nix
+++ b/pkgs/development/libraries/nghttp2/default.nix
@@ -7,12 +7,12 @@
 
 stdenv.mkDerivation rec {
   name = "nghttp2-${version}";
-  version = "1.10.0";
+  version = "1.14.1";
 
   # Don't use fetchFromGitHub since this needs a bootstrap curl
   src = fetchurl {
     url = "https://github.com/nghttp2/nghttp2/releases/download/v${version}/nghttp2-${version}.tar.bz2";
-    sha256 = "1m95j3lhxp6k16aa2m03rsky13nmj8ky1kk96cwl88vbsrliz4mh";
+    sha256 = "0d7sk3pfkajhkmcqa7zx4rjg1pkwqraxxs7bxbwbm67r8wwqw87j";
   };
 
   # Configure script searches for a symbol which does not exist in jemalloc on Darwin
diff --git a/pkgs/development/libraries/pcre/CVE-2016-1283.patch b/pkgs/development/libraries/pcre/CVE-2016-1283.patch
deleted file mode 100644
index 2c2dad29e929..000000000000
--- a/pkgs/development/libraries/pcre/CVE-2016-1283.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Index: pcre_compile.c
-===================================================================
---- a/pcre_compile.c	(revision 1635)
-+++ b/pcre_compile.c	(revision 1636)
-@@ -7311,7 +7311,12 @@
-           so far in order to get the number. If the name is not found, leave
-           the value of recno as 0 for a forward reference. */
- 
--          else
-+          /* This patch (removing "else") fixes a problem when a reference is
-+          to multiple identically named nested groups from within the nest.
-+          Once again, it is not the "proper" fix, and it results in an
-+          over-allocation of memory. */
-+
-+          /* else */
-             {
-             ng = cd->named_groups;
-             for (i = 0; i < cd->names_found; i++, ng++)
diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix
index 7e2bec80c3ca..d3499f3e15c1 100644
--- a/pkgs/development/libraries/pcre/default.nix
+++ b/pkgs/development/libraries/pcre/default.nix
@@ -7,7 +7,7 @@ with stdenv.lib;
 assert elem variant [ null "cpp" "pcre16" "pcre32" ];
 
 let
-  version = "8.38";
+  version = "8.39";
   pname = if (variant == null) then "pcre"
     else  if (variant == "cpp") then "pcre-cpp"
     else  variant;
@@ -17,13 +17,9 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${version}.tar.bz2";
-    sha256 = "1pvra19ljkr5ky35y2iywjnsckrs9ch2anrf5b0dc91hw8v2vq5r";
+    sha256 = "12wyajlqx2v7dsh39ra9v9m5hibjkrl129q90bp32c28haghjn5q";
   };
 
-  patches = [
-    ./CVE-2016-1283.patch
-  ];
-
   outputs = [ "bin" "dev" "out" "doc" "man" ];
 
   configureFlags = [
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix
index d36a7ef82734..138faf86506f 100644
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix
@@ -7,7 +7,7 @@
 , openssl, dbus, glib, udev, libxml2, libxslt, pcre16
 , zlib, libjpeg, libpng, libtiff, sqlite, icu
 
-, coreutils, bison, flex, gdb, gperf, lndir, ruby
+, coreutils, bison, flex, gdb, gperf, lndir
 , patchelf, perl, pkgconfig, python
 
 # optional dependencies
@@ -205,7 +205,7 @@ stdenv.mkDerivation {
   ++ lib.optional mesaSupported mesa;
 
   buildInputs =
-    [ bison flex gperf ruby ]
+    [ bison flex gperf ]
     ++ lib.optional developerBuild gdb
     ++ lib.optional (cups != null) cups
     ++ lib.optional (mysql != null) mysql.lib
@@ -256,7 +256,7 @@ stdenv.mkDerivation {
 
   postFixup =
     ''
-      # Don't retain build-time dependencies like gdb and ruby.
+      # Don't retain build-time dependencies like gdb.
       sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri
 
       # Move libtool archives and qmake projects
diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix
index 2f414efc3142..25e94c44ad2c 100644
--- a/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix
+++ b/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix
@@ -7,7 +7,7 @@
 , openssl, dbus, glib, udev, libxml2, libxslt, pcre16
 , zlib, libjpeg, libpng, libtiff, sqlite, icu
 
-, coreutils, bison, flex, gdb, gperf, lndir, ruby
+, coreutils, bison, flex, gdb, gperf, lndir
 , patchelf, perl, pkgconfig, python
 
 # optional dependencies
@@ -180,7 +180,7 @@ stdenv.mkDerivation {
   ++ lib.optional mesaSupported mesa;
 
   buildInputs =
-    [ bison flex gperf ruby ]
+    [ bison flex gperf ]
     ++ lib.optional developerBuild gdb
     ++ lib.optional (cups != null) cups
     ++ lib.optional (mysql != null) mysql.lib
@@ -213,7 +213,7 @@ stdenv.mkDerivation {
 
   postFixup =
     ''
-      # Don't retain build-time dependencies like gdb and ruby.
+      # Don't retain build-time dependencies like gdb.
       sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri
 
       # Move libtool archives and qmake projects
diff --git a/pkgs/development/libraries/qt-5/5.7/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.7/qtbase/default.nix
index a31452e6d9bb..81d0e446f2a8 100644
--- a/pkgs/development/libraries/qt-5/5.7/qtbase/default.nix
+++ b/pkgs/development/libraries/qt-5/5.7/qtbase/default.nix
@@ -189,7 +189,7 @@ stdenv.mkDerivation {
     ++ lib.optional (postgresql != null) postgresql;
 
   nativeBuildInputs =
-    [ bison flex gperf lndir patchelf perl pkgconfig python ruby ];
+    [ bison flex gperf lndir patchelf perl pkgconfig python ];
 
   # freetype-2.5.4 changed signedness of some struct fields
   NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare";
@@ -216,7 +216,7 @@ stdenv.mkDerivation {
 
   postFixup =
     ''
-      # Don't retain build-time dependencies like gdb and ruby.
+      # Don't retain build-time dependencies like gdb.
       sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri
 
       # Move libtool archives and qmake projects
diff --git a/pkgs/development/libraries/readline/7.0.nix b/pkgs/development/libraries/readline/7.0.nix
new file mode 100644
index 000000000000..9d1c1c57f8c1
--- /dev/null
+++ b/pkgs/development/libraries/readline/7.0.nix
@@ -0,0 +1,66 @@
+{ fetchurl, stdenv, ncurses }:
+
+stdenv.mkDerivation rec {
+  name = "readline-${version}";
+  version = "7.0p0";
+
+  src = fetchurl {
+    url = "mirror://gnu/readline/readline-${meta.branch}.tar.gz";
+    sha256 = "0d13sg9ksf982rrrmv5mb6a2p4ys9rvg9r71d6il0vr8hmql63bm";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  propagatedBuildInputs = [ncurses];
+
+  patchFlags = "-p0";
+
+  patches =
+    [ ./link-against-ncurses.patch
+      ./no-arch_only-6.3.patch
+    ]
+    ;
+    /*
+    ++
+    (let
+       patch = nr: sha256:
+         fetchurl {
+           url = "mirror://gnu/readline/readline-${meta.branch}-patches/readline70-${nr}";
+           inherit sha256;
+         };
+     in
+       import ./readline-7.0-patches.nix patch);
+    */
+
+  # Don't run the native `strip' when cross-compiling.
+  dontStrip = stdenv ? cross;
+  bash_cv_func_sigsetjmp = if stdenv.isCygwin then "missing" else null;
+
+  meta = with stdenv.lib; {
+    description = "Library for interactive line editing";
+
+    longDescription = ''
+      The GNU Readline library provides a set of functions for use by
+      applications that allow users to edit command lines as they are
+      typed in.  Both Emacs and vi editing modes are available.  The
+      Readline library includes additional functions to maintain a
+      list of previously-entered command lines, to recall and perhaps
+      reedit those lines, and perform csh-like history expansion on
+      previous commands.
+
+      The history facilities are also placed into a separate library,
+      the History library, as part of the build process.  The History
+      library may be used without Readline in applications which
+      desire its capabilities.
+    '';
+
+    homepage = http://savannah.gnu.org/projects/readline/;
+
+    license = licenses.gpl3Plus;
+
+    maintainers = [ ];
+
+    platforms = platforms.unix;
+    branch = "7.0";
+  };
+}
diff --git a/pkgs/development/libraries/udns/default.nix b/pkgs/development/libraries/udns/default.nix
index 9d781b301a0a..9c899eb21ba7 100644
--- a/pkgs/development/libraries/udns/default.nix
+++ b/pkgs/development/libraries/udns/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
   '';
 
   # keep man3
-  outputDocdev = "out";
+  outputDevdoc = "out";
 
   meta = with stdenv.lib; {
     homepage = http://www.corpit.ru/mjt/udns.html;
diff --git a/pkgs/development/tools/analysis/rr/default.nix b/pkgs/development/tools/analysis/rr/default.nix
index 8cd38a152ecf..7606705edd85 100644
--- a/pkgs/development/tools/analysis/rr/default.nix
+++ b/pkgs/development/tools/analysis/rr/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, libpfm, zlib, python, pkgconfig, pythonPackages, which, procps, gdb }:
+{ stdenv, fetchFromGitHub, cmake, libpfm, zlib, pkgconfig, python2Packages, which, procps, gdb }:
 
 stdenv.mkDerivation rec {
   version = "4.3.0";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
     patchShebangs .
   '';
 
-  buildInputs = [ cmake libpfm zlib python pkgconfig pythonPackages.pexpect which procps gdb ];
+  buildInputs = [ cmake libpfm zlib python2Packages.python pkgconfig python2Packages.pexpect which procps gdb ];
   cmakeFlags = [
     "-DCMAKE_C_FLAGS_RELEASE:STRING="
     "-DCMAKE_CXX_FLAGS_RELEASE:STRING="
diff --git a/pkgs/development/tools/documentation/gtk-doc/default.nix b/pkgs/development/tools/documentation/gtk-doc/default.nix
index b080be846cd9..b46b0be748ad 100644
--- a/pkgs/development/tools/documentation/gtk-doc/default.nix
+++ b/pkgs/development/tools/documentation/gtk-doc/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y";
   };
 
-  outputDocdev = "out";
+  outputDevdoc = "out";
 
   # maybe there is a better way to pass the needed dtd and xsl files
   # "-//OASIS//DTD DocBook XML V4.1.2//EN" and "http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"
diff --git a/pkgs/development/tools/misc/help2man/default.nix b/pkgs/development/tools/misc/help2man/default.nix
index 6839335245fc..8bf3db59147b 100644
--- a/pkgs/development/tools/misc/help2man/default.nix
+++ b/pkgs/development/tools/misc/help2man/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnu/help2man/${name}.tar.xz";
-    sha256 = "0miqq77ssk5rgsc9xlv7k5n2wk2c5wv2m1kh4zhbwrggfmjaycn2";
+    sha256 = "0lvp4306f5nq08f3snffs5pp1zwv8l35z6f5g0dds51zs6bzdv6l";
   };
 
   buildInputs = [ makeWrapper perl gettext LocaleGettext ];
diff --git a/pkgs/development/tools/misc/texinfo/6.1.nix b/pkgs/development/tools/misc/texinfo/6.3.nix
index e3001ffba7bd..b75878b8d332 100644
--- a/pkgs/development/tools/misc/texinfo/6.1.nix
+++ b/pkgs/development/tools/misc/texinfo/6.3.nix
@@ -3,11 +3,11 @@
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  name = "texinfo-6.1";
+  name = "texinfo-6.3";
 
   src = fetchurl {
     url = "mirror://gnu/texinfo/${name}.tar.xz";
-    sha256 = "1ll3d0l8izygdxqz96wfr2631kxahifwdknpgsx2090vw963js5c";
+    sha256 = "0fpr9kdjjl6nj2pc50k2zr7134hvqz8bi8pfqa7131a9lpzz6v14";
   };
 
   buildInputs = [ perl xz ]
diff --git a/pkgs/development/tools/parsing/flex/default.nix b/pkgs/development/tools/parsing/flex/default.nix
index 64d5f2f551b1..7ee2e27e60ad 100644
--- a/pkgs/development/tools/parsing/flex/default.nix
+++ b/pkgs/development/tools/parsing/flex/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, bison, m4 }:
 
 stdenv.mkDerivation rec {
-  name = "flex-2.6.0";
+  name = "flex-2.6.1";
 
   src = fetchurl {
-    url = "mirror://sourceforge/flex/${name}.tar.bz2";
-    sha256 = "1sdqx63yadindzafrq1w31ajblf9gl1c301g068s20s7bbpi3ri4";
+    url = "https://github.com/westes/flex/releases/download/v2.6.1/flex-2.6.1.tar.gz";
+    sha256 = "0fy14c35yz2m1n1m4f02by3501fn0cca37zn7jp8lpp4b3kgjhrw";
   };
 
   buildInputs = [ bison ];
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
   };
 
   meta = {
-    homepage = http://flex.sourceforge.net/;
+    homepage = https://github.com/westes/flex;
     description = "A fast lexical analyser generator";
     platforms = stdenv.lib.platforms.unix;
   };