about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorJohn Boehr <jbboehr@gmail.com>2017-11-07 14:01:39 -0800
committerJohn Boehr <jbboehr@gmail.com>2017-11-07 14:01:39 -0800
commit24c6407883631c30fff9e399274fcddac55d5491 (patch)
treefb5235054cbb08ff142aacfbcdb708f5dca32196 /pkgs/development
parent41cd4f2459d63c5ad19a227c3dd5d7704df6161c (diff)
parent80ae60a34bbf9855b76c457e32eaba0f55a05acd (diff)
downloadnixlib-24c6407883631c30fff9e399274fcddac55d5491.tar
nixlib-24c6407883631c30fff9e399274fcddac55d5491.tar.gz
nixlib-24c6407883631c30fff9e399274fcddac55d5491.tar.bz2
nixlib-24c6407883631c30fff9e399274fcddac55d5491.tar.lz
nixlib-24c6407883631c30fff9e399274fcddac55d5491.tar.xz
nixlib-24c6407883631c30fff9e399274fcddac55d5491.tar.zst
nixlib-24c6407883631c30fff9e399274fcddac55d5491.zip
Merge branch 'master' of https://github.com/NixOS/nixpkgs into php-mysqlnd-m
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/elm/packages/elm-format.nix43
-rw-r--r--pkgs/development/compilers/gcc/4.5/default.nix1
-rw-r--r--pkgs/development/compilers/gcc/4.8/default.nix6
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix1
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix4
-rw-r--r--pkgs/development/compilers/gcc/res_state-not-declared.patch13
-rw-r--r--pkgs/development/compilers/gcc/sigsegv-not-declared.patch13
-rw-r--r--pkgs/development/compilers/gcc/struct-sigaltstack-4.9.patch78
-rw-r--r--pkgs/development/compilers/gcc/struct-sigaltstack.patch87
-rw-r--r--pkgs/development/compilers/gcc/struct-ucontext-4.5.patch107
-rw-r--r--pkgs/development/compilers/gcc/struct-ucontext-4.8.patch177
-rw-r--r--pkgs/development/compilers/gcc/struct-ucontext.patch190
-rw-r--r--pkgs/development/compilers/llvm/3.7/llvm.nix13
-rw-r--r--pkgs/development/compilers/llvm/3.8/llvm.nix13
-rw-r--r--pkgs/development/compilers/llvm/3.9/llvm.nix14
-rw-r--r--pkgs/development/compilers/llvm/4/llvm.nix14
-rw-r--r--pkgs/development/compilers/ponyc/pony-stable.nix4
-rw-r--r--pkgs/development/interpreters/php/default.nix4
-rw-r--r--pkgs/development/libraries/SDL2/default.nix4
-rw-r--r--pkgs/development/libraries/expat/default.nix4
-rw-r--r--pkgs/development/libraries/git2/0.25.nix33
-rw-r--r--pkgs/development/libraries/git2/default.nix33
-rw-r--r--pkgs/development/libraries/git2/disable-security.framework.patch58
-rw-r--r--pkgs/development/libraries/glibc/2.25-49.patch.gzbin89721 -> 0 bytes
-rw-r--r--pkgs/development/libraries/glibc/2.26-75.patch.gzbin0 -> 289084 bytes
-rw-r--r--pkgs/development/libraries/glibc/common.nix17
-rw-r--r--pkgs/development/libraries/icu/base.nix5
-rw-r--r--pkgs/development/libraries/iniparser/default.nix27
-rw-r--r--pkgs/development/libraries/libnsl/default.nix24
-rw-r--r--pkgs/development/libraries/live555/default.nix7
-rw-r--r--pkgs/development/libraries/ti-rpc/default.nix4
-rw-r--r--pkgs/development/libraries/vigra/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/zed/default.nix4
-rw-r--r--pkgs/development/python-modules/betamax-matchers/default.nix21
-rw-r--r--pkgs/development/python-modules/betamax-serializers/default.nix20
-rw-r--r--pkgs/development/python-modules/devpi-common/default.nix2
-rw-r--r--pkgs/development/python-modules/fastimport/default.nix22
-rw-r--r--pkgs/development/python-modules/h2/default.nix21
-rw-r--r--pkgs/development/python-modules/hyperframe/default.nix17
-rw-r--r--pkgs/development/python-modules/kaitaistruct/default.nix18
-rw-r--r--pkgs/development/python-modules/keepkey/default.nix18
-rw-r--r--pkgs/development/python-modules/ldap3/default.nix24
-rw-r--r--pkgs/development/python-modules/libagent/default.nix10
-rw-r--r--pkgs/development/python-modules/praw/default.nix43
-rw-r--r--pkgs/development/python-modules/prawcore/default.nix38
-rw-r--r--pkgs/development/python-modules/pyasn1-modules/default.nix22
-rw-r--r--pkgs/development/python-modules/pyasn1/default.nix19
-rw-r--r--pkgs/development/python-modules/pyfeed/default.nix23
-rw-r--r--pkgs/development/python-modules/pygit2/default.nix31
-rw-r--r--pkgs/development/python-modules/pylibacl/default.nix27
-rw-r--r--pkgs/development/python-modules/python-fuse/default.nix27
-rw-r--r--pkgs/development/python-modules/pyxattr/default.nix26
-rw-r--r--pkgs/development/python-modules/selenium/default.nix50
-rw-r--r--pkgs/development/python-modules/sybil/default.nix24
-rw-r--r--pkgs/development/python-modules/testfixtures/default.nix23
-rw-r--r--pkgs/development/python-modules/trezor/default.nix4
-rw-r--r--pkgs/development/python-modules/update_checker/default.nix22
-rw-r--r--pkgs/development/python-modules/urwid/default.nix16
-rw-r--r--pkgs/development/tools/continuous-integration/jenkins/default.nix6
-rw-r--r--pkgs/development/tools/database/sqlitebrowser/default.nix27
-rw-r--r--pkgs/development/tools/geckodriver/default.nix25
-rw-r--r--pkgs/development/tools/git-series/default.nix2
-rw-r--r--pkgs/development/tools/misc/d-feet/default.nix4
-rw-r--r--pkgs/development/tools/parsing/flex/default.nix14
-rw-r--r--pkgs/development/tools/rtags/default.nix4
65 files changed, 1462 insertions, 192 deletions
diff --git a/pkgs/development/compilers/elm/packages/elm-format.nix b/pkgs/development/compilers/elm/packages/elm-format.nix
index a9340fc94fe4..56db835ac10a 100644
--- a/pkgs/development/compilers/elm/packages/elm-format.nix
+++ b/pkgs/development/compilers/elm/packages/elm-format.nix
@@ -1,37 +1,40 @@
-{ mkDerivation, aeson, ansi-terminal, ansi-wl-pprint, base, binary
-, bytestring, containers, directory, edit-distance, fetchgit
-, filemanip, filepath, HUnit, indents, mtl, optparse-applicative
-, parsec, pretty, process, QuickCheck, quickcheck-io
-, regex-applicative, split, stdenv, tasty, tasty-golden
-, tasty-hunit, tasty-quickcheck, text, union-find, wl-pprint
+{ mkDerivation, ansi-terminal, ansi-wl-pprint, base, binary
+, bytestring, Cabal, cmark, containers, directory, fetchgit
+, filepath, free, HUnit, indents, json, mtl, optparse-applicative
+, parsec, process, QuickCheck, quickcheck-io, split, stdenv, tasty
+, tasty-golden, tasty-hunit, tasty-quickcheck, text
 }:
 mkDerivation {
   pname = "elm-format";
-  version = "0.5.2";
+  version = "0.7.0";
   src = fetchgit {
     url = "http://github.com/avh4/elm-format";
-    sha256 = "0lman7h6wr75y90javcc4y1scvwgv125gqqaqvfrd5xrfmm43gg8";
-    rev = "e452ed9342620e7bb0bc822983b96411d57143ef";
+    sha256 = "1snl2lrrzdwgzi68agi3sdw84aslj04pzzxpm1mam9ic6dzhn3jf";
+    rev = "da4b415c6a2b7e77b7d9f00beca3e45230e603fb";
   };
-  isLibrary = false;
+
+  doHaddock = false;
+  isLibrary = true;
   isExecutable = true;
-  executableHaskellDepends = [
-    aeson ansi-terminal ansi-wl-pprint base binary bytestring
-    containers directory edit-distance filemanip filepath indents mtl
-    optparse-applicative parsec pretty process regex-applicative split
-    text
+  setupHaskellDepends = [ base Cabal directory filepath process ];
+  libraryHaskellDepends = [
+    ansi-terminal ansi-wl-pprint base binary bytestring containers
+    directory filepath free indents json mtl optparse-applicative
+    parsec process split text
   ];
+  executableHaskellDepends = [ base ];
   testHaskellDepends = [
-    aeson ansi-terminal ansi-wl-pprint base binary bytestring
-    containers directory edit-distance filemanip filepath HUnit indents
-    mtl optparse-applicative parsec pretty process QuickCheck
-    quickcheck-io regex-applicative split tasty tasty-golden
-    tasty-hunit tasty-quickcheck text union-find wl-pprint
+    base cmark containers HUnit mtl parsec QuickCheck quickcheck-io
+    split tasty tasty-golden tasty-hunit tasty-quickcheck text
   ];
   jailbreak = true;
   postInstall = ''
     ln -s $out/bin/elm-format-0.18 $out/bin/elm-format
   '';
+  postPatch = ''
+    sed -i "s|desc <-.*||" ./Setup.hs
+    sed -i "s|gitDescribe = .*|gitDescribe = \\\\\"da4b415c\\\\\"\"|" ./Setup.hs
+  '';
   homepage = http://elm-lang.org;
   description = "A source code formatter for Elm";
   license = stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix
index 5bad03d30252..41d31888bde1 100644
--- a/pkgs/development/compilers/gcc/4.5/default.nix
+++ b/pkgs/development/compilers/gcc/4.5/default.nix
@@ -153,6 +153,7 @@ stdenv.mkDerivation ({
     # target libraries and tools.
     ++ optional langAda ../gnat-cflags.patch
     ++ optional langVhdl ./ghdl-ortho-cflags.patch
+    ++ [ ../struct-ucontext-4.5.patch ] # glibc-2.26
     ;
 
   postPatch =
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix
index 72e37f18a178..3031df56150b 100644
--- a/pkgs/development/compilers/gcc/4.8/default.nix
+++ b/pkgs/development/compilers/gcc/4.8/default.nix
@@ -78,7 +78,11 @@ let version = "4.8.5";
           sha256 = "01jd7pdarh54ki498g6sz64ijl9a1l5f9v8q2696aaxalvh2vwzl";
           excludes = [ "gcc/cp/ChangeLog" ];
         })]
-      ;
+      ++ [ # glibc-2.26
+        ../struct-ucontext-4.8.patch
+        ../sigsegv-not-declared.patch
+        ../res_state-not-declared.patch
+      ];
 
     javaEcj = fetchurl {
       # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix
index d7684a61a2ac..4675787912e8 100644
--- a/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/pkgs/development/compilers/gcc/4.9/default.nix
@@ -72,6 +72,7 @@ let version = "4.9.4";
       # target libraries and tools.
       ++ optional langAda ../gnat-cflags.patch
       ++ optional langFortran ../gfortran-driving.patch
+      ++ [ ../struct-ucontext.patch ../struct-sigaltstack-4.9.patch ] # glibc-2.26
       ;
 
     javaEcj = fetchurl {
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index 47cb93c19953..7d019c7fe848 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -72,7 +72,9 @@ let version = "6.4.0";
       # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
       # target libraries and tools.
       ++ optional langAda ../gnat-cflags.patch
-      ++ optional langFortran ../gfortran-driving.patch;
+      ++ optional langFortran ../gfortran-driving.patch
+      ++ [ ../struct-ucontext.patch ../struct-sigaltstack.patch ] # glibc-2.26
+      ;
 
     javaEcj = fetchurl {
       # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
diff --git a/pkgs/development/compilers/gcc/res_state-not-declared.patch b/pkgs/development/compilers/gcc/res_state-not-declared.patch
new file mode 100644
index 000000000000..e970487786d0
--- /dev/null
+++ b/pkgs/development/compilers/gcc/res_state-not-declared.patch
@@ -0,0 +1,13 @@
+diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
+index fe69430..49f5270 100644
+--- a/libsanitizer/tsan/tsan_platform_linux.cc
++++ b/libsanitizer/tsan/tsan_platform_linux.cc
+@@ -351,7 +351,7 @@ bool IsGlobalVar(uptr addr) {
+ // closes within glibc. The code is a pure hack.
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+   int cnt = 0;
+-  __res_state *statp = (__res_state*)state;
++  struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
+       fds[cnt++] = statp->_u._ext.nssocks[i];
diff --git a/pkgs/development/compilers/gcc/sigsegv-not-declared.patch b/pkgs/development/compilers/gcc/sigsegv-not-declared.patch
new file mode 100644
index 000000000000..f9cfaec82026
--- /dev/null
+++ b/pkgs/development/compilers/gcc/sigsegv-not-declared.patch
@@ -0,0 +1,13 @@
+error: 'SIGSEGV' was not declared in this scope
+diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
+index 0692eb1..472f734 100644
+--- a/libsanitizer/asan/asan_linux.cc
++++ b/libsanitizer/asan/asan_linux.cc
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <pthread.h>
++#include <signal.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <unwind.h>
diff --git a/pkgs/development/compilers/gcc/struct-sigaltstack-4.9.patch b/pkgs/development/compilers/gcc/struct-sigaltstack-4.9.patch
new file mode 100644
index 000000000000..fc126b4813d6
--- /dev/null
+++ b/pkgs/development/compilers/gcc/struct-sigaltstack-4.9.patch
@@ -0,0 +1,78 @@
+hand-resolved trivial conflicts for 4.9 from the upstream patch
+72edc2c02f8b4768ad660f46a1c7e2400c0a8e06
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+index 69c9c10..8e53673 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+@@ -599,8 +599,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
+   return internal_syscall(__NR_prctl, option, arg2, arg3, arg4, arg5);
+ }
+ 
+-uptr internal_sigaltstack(const struct sigaltstack *ss,
+-                         struct sigaltstack *oss) {
++uptr internal_sigaltstack(const void *ss, void *oss) {
+   return internal_syscall(__NR_sigaltstack, (uptr)ss, (uptr)oss);
+ }
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
+index 6422df1..8e111d1 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
++++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
+@@ -18,7 +18,6 @@
+ #include "sanitizer_platform_limits_posix.h"
+ 
+ struct link_map;  // Opaque type returned by dlopen().
+-struct sigaltstack;
+ 
+ namespace __sanitizer {
+ // Dirent structure for getdents(). Note that this structure is different from
+@@ -28,8 +27,7 @@ struct linux_dirent;
+ // Syscall wrappers.
+ uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
+ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5);
+-uptr internal_sigaltstack(const struct sigaltstack* ss,
+-                          struct sigaltstack* oss);
++uptr internal_sigaltstack(const void* ss, void* oss);
+ uptr internal_sigaction(int signum, const __sanitizer_kernel_sigaction_t *act,
+     __sanitizer_kernel_sigaction_t *oldact);
+ uptr internal_sigprocmask(int how, __sanitizer_kernel_sigset_t *set,
+diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+index 891386dc..234e8c6 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+@@ -273,7 +273,7 @@ static int TracerThread(void* argument) {
+ 
+   // Alternate stack for signal handling.
+   InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
+-  struct sigaltstack handler_stack;
++  stack_t handler_stack;
+   internal_memset(&handler_stack, 0, sizeof(handler_stack));
+   handler_stack.ss_sp = handler_stack_memory.data();
+   handler_stack.ss_size = kHandlerStackSize;
+diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
+index 2ed5718..6f972ab 100644
+--- a/libsanitizer/tsan/tsan_platform_linux.cc
++++ b/libsanitizer/tsan/tsan_platform_linux.cc
+@@ -287,7 +287,7 @@ void InitializePlatform() {
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   int cnt = 0;
+-  __res_state *statp = (__res_state*)state;
++  struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
+       fds[cnt++] = statp->_u._ext.nssocks[i];
+
+error: 'SIGSEGV' was not declared in this scope
+diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
+index 0692eb1..472f734 100644
+--- a/libsanitizer/asan/asan_linux.cc
++++ b/libsanitizer/asan/asan_linux.cc
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <pthread.h>
++#include <signal.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <unwind.h>
diff --git a/pkgs/development/compilers/gcc/struct-sigaltstack.patch b/pkgs/development/compilers/gcc/struct-sigaltstack.patch
new file mode 100644
index 000000000000..6e1ddb252c24
--- /dev/null
+++ b/pkgs/development/compilers/gcc/struct-sigaltstack.patch
@@ -0,0 +1,87 @@
+From 72edc2c02f8b4768ad660f46a1c7e2400c0a8e06 Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 17 Jul 2017 19:41:08 +0000
+Subject: [PATCH] 	Backported from mainline 	2017-07-14  Jakub
+ Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/81066
+	* sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
+	* sanitizer_common/sanitizer_linux.cc: Likewise.
+	* sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
+	* tsan/tsan_platform_linux.cc: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@250287 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libsanitizer/ChangeLog  (REMOVED)                             | 11 +++++++++++
+ libsanitizer/sanitizer_common/sanitizer_linux.cc              |  3 +--
+ libsanitizer/sanitizer_common/sanitizer_linux.h               |  4 +---
+ .../sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc  |  2 +-
+ libsanitizer/tsan/tsan_platform_linux.cc                      |  2 +-
+ 5 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+index 806fcd5..5b6f186 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+@@ -605,8 +605,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
+ }
+ #endif
+ 
+-uptr internal_sigaltstack(const struct sigaltstack *ss,
+-                         struct sigaltstack *oss) {
++uptr internal_sigaltstack(const void *ss, void *oss) {
+   return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
+ }
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
+index 895bfc1..a42df57 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
++++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
+@@ -19,7 +19,6 @@
+ #include "sanitizer_platform_limits_posix.h"
+ 
+ struct link_map;  // Opaque type returned by dlopen().
+-struct sigaltstack;
+ 
+ namespace __sanitizer {
+ // Dirent structure for getdents(). Note that this structure is different from
+@@ -28,8 +27,7 @@ struct linux_dirent;
+ 
+ // Syscall wrappers.
+ uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
+-uptr internal_sigaltstack(const struct sigaltstack* ss,
+-                          struct sigaltstack* oss);
++uptr internal_sigaltstack(const void* ss, void* oss);
+ uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
+     __sanitizer_sigset_t *oldset);
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+index 891386dc..234e8c6 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+@@ -273,7 +273,7 @@ static int TracerThread(void* argument) {
+ 
+   // Alternate stack for signal handling.
+   InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
+-  struct sigaltstack handler_stack;
++  stack_t handler_stack;
+   internal_memset(&handler_stack, 0, sizeof(handler_stack));
+   handler_stack.ss_sp = handler_stack_memory.data();
+   handler_stack.ss_size = kHandlerStackSize;
+diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
+index 2ed5718..6f972ab 100644
+--- a/libsanitizer/tsan/tsan_platform_linux.cc
++++ b/libsanitizer/tsan/tsan_platform_linux.cc
+@@ -287,7 +287,7 @@ void InitializePlatform() {
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   int cnt = 0;
+-  __res_state *statp = (__res_state*)state;
++  struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
+       fds[cnt++] = statp->_u._ext.nssocks[i];
+-- 
+2.9.3
+
diff --git a/pkgs/development/compilers/gcc/struct-ucontext-4.5.patch b/pkgs/development/compilers/gcc/struct-ucontext-4.5.patch
new file mode 100644
index 000000000000..a84e9ffe2681
--- /dev/null
+++ b/pkgs/development/compilers/gcc/struct-ucontext-4.5.patch
@@ -0,0 +1,107 @@
+Trivally backported the upstream commit
+b685411208e0aaa79190d54faf945763514706b8
+(different directory, some files not present, etc.)
+We only really use x86* from those, probably, so I didn't bother much.
+diff --git a/gcc/config/alpha/linux-unwind.h b/gcc/config/alpha/linux-unwind.h
+index bdbba4a..e84812e 100644
+--- a/gcc/config/alpha/linux-unwind.h
++++ b/gcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       sc = &rt_->uc.uc_mcontext;
+     }
+diff --git a/gcc/config/bfin/linux-unwind.h b/gcc/config/bfin/linux-unwind.h
+index 77b7c23..8bf5e82 100644
+--- a/gcc/config/bfin/linux-unwind.h
++++ b/gcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ 	void *puc;
+ 	char retcode[8];
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+ 
+       /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h
+index 540a0a2..29efbe3 100644
+--- a/gcc/config/i386/linux-unwind.h
++++ b/gcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+   if (*(unsigned char *)(pc+0) == 0x48
+       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+     {
+-      struct ucontext *uc_ = context->cfa;
++      ucontext_t *uc_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+          because it does not alias anything.  */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ 	siginfo_t *pinfo;
+ 	void *puc;
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/gcc/config/m68k/linux-unwind.h b/gcc/config/m68k/linux-unwind.h
+index 75b7cf7..f964e24 100644
+--- a/gcc/config/m68k/linux-unwind.h
++++ b/gcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now.  */
+ struct uw_ucontext {
+ 	unsigned long	  uc_flags;
+-	struct ucontext  *uc_link;
++	ucontext_t	 *uc_link;
+ 	stack_t		  uc_stack;
+ 	mcontext_t	  uc_mcontext;
+ 	unsigned long	  uc_filler[80];
+diff --git a/gcc/config/pa/linux-unwind.h b/gcc/config/pa/linux-unwind.h
+index 9a2657f..e47493d 100644
+--- a/gcc/config/pa/linux-unwind.h
++++ b/gcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+   struct sigcontext *sc;
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *frame;
+ 
+   /* rt_sigreturn trampoline:
+diff --git a/gcc/config/sh/linux-unwind.h b/gcc/config/sh/linux-unwind.h
+index e389cac..0bf43ba 100644
+--- a/gcc/config/sh/linux-unwind.h
++++ b/gcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/gcc/config/xtensa/linux-unwind.h b/gcc/config/xtensa/linux-unwind.h
+index 9872492..586a9d4 100644
+--- a/gcc/config/xtensa/linux-unwind.h
++++ b/gcc/config/xtensa/linux-unwind.h
+@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+ 
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *rt_;
+ 
+   /* movi a2, __NR_rt_sigreturn; syscall */
+-- 
+2.9.3
+
diff --git a/pkgs/development/compilers/gcc/struct-ucontext-4.8.patch b/pkgs/development/compilers/gcc/struct-ucontext-4.8.patch
new file mode 100644
index 000000000000..630ef6586e45
--- /dev/null
+++ b/pkgs/development/compilers/gcc/struct-ucontext-4.8.patch
@@ -0,0 +1,177 @@
+From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 4 Jul 2017 10:23:57 +0000
+Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules.  This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead.  This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead.  As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Tested compilation together with current glibc with glibc's
+build-many-glibcs.py.
+
+	* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+	config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+	config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+	config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+	x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+	uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+	config/pa/linux-unwind.h (pa32_fallback_frame_state),
+	config/sh/linux-unwind.h (sh_fallback_frame_state),
+	config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+	config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+	ucontext_t instead of struct ucontext.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/ChangeLog     (REMOVED)       | 14 ++++++++++++++
+ libgcc/config/aarch64/linux-unwind.h |  2 +-
+ libgcc/config/alpha/linux-unwind.h   |  2 +-
+ libgcc/config/bfin/linux-unwind.h    |  2 +-
+ libgcc/config/i386/linux-unwind.h    |  4 ++--
+ libgcc/config/m68k/linux-unwind.h    |  2 +-
+ libgcc/config/nios2/linux-unwind.h   |  2 +-
+ libgcc/config/pa/linux-unwind.h      |  2 +-
+ libgcc/config/sh/linux-unwind.h      |  2 +-
+ libgcc/config/tilepro/linux-unwind.h |  2 +-
+ libgcc/config/xtensa/linux-unwind.h  |  2 +-
+ 11 files changed, 25 insertions(+), 11 deletions(-)
+
+diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
+index 4512efb..06de45a 100644
+--- a/libgcc/config/aarch64/linux-unwind.h
++++ b/libgcc/config/aarch64/linux-unwind.h
+@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
+   struct rt_sigframe
+   {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   };
+ 
+   struct rt_sigframe *rt_;
+diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
+index bdbba4a..e84812e 100644
+--- a/libgcc/config/alpha/linux-unwind.h
++++ b/libgcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       sc = &rt_->uc.uc_mcontext;
+     }
+diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
+index 77b7c23..8bf5e82 100644
+--- a/libgcc/config/bfin/linux-unwind.h
++++ b/libgcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ 	void *puc;
+ 	char retcode[8];
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+ 
+       /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
+index 540a0a2..29efbe3 100644
+--- a/libgcc/config/i386/linux-unwind.h
++++ b/libgcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+   if (*(unsigned char *)(pc+0) == 0x48
+       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+     {
+-      struct ucontext *uc_ = context->cfa;
++      ucontext_t *uc_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+          because it does not alias anything.  */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ 	siginfo_t *pinfo;
+ 	void *puc;
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
+index 75b7cf7..f964e24 100644
+--- a/libgcc/config/m68k/linux-unwind.h
++++ b/libgcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now.  */
+ struct uw_ucontext {
+ 	unsigned long	  uc_flags;
+-	struct ucontext  *uc_link;
++	ucontext_t	 *uc_link;
+ 	stack_t		  uc_stack;
+ 	mcontext_t	  uc_mcontext;
+ 	unsigned long	  uc_filler[80];
+diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
+index 9a2657f..e47493d 100644
+--- a/libgcc/config/pa/linux-unwind.h
++++ b/libgcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+   struct sigcontext *sc;
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *frame;
+ 
+   /* rt_sigreturn trampoline:
+diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
+index e389cac..0bf43ba 100644
+--- a/libgcc/config/sh/linux-unwind.h
++++ b/libgcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
+index 796e976..75f8890 100644
+--- a/libgcc/config/tilepro/linux-unwind.h
++++ b/libgcc/config/tilepro/linux-unwind.h
+@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
+   struct rt_sigframe {
+     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *rt_;
+ 
+   /* Return if this is not a signal handler.  */
+diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
+index 9872492..586a9d4 100644
+--- a/libgcc/config/xtensa/linux-unwind.h
++++ b/libgcc/config/xtensa/linux-unwind.h
+@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+ 
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *rt_;
+ 
+   /* movi a2, __NR_rt_sigreturn; syscall */
+-- 
+2.9.3
+
diff --git a/pkgs/development/compilers/gcc/struct-ucontext.patch b/pkgs/development/compilers/gcc/struct-ucontext.patch
new file mode 100644
index 000000000000..c7fb6d1f71cf
--- /dev/null
+++ b/pkgs/development/compilers/gcc/struct-ucontext.patch
@@ -0,0 +1,190 @@
+From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 4 Jul 2017 10:23:57 +0000
+Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules.  This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead.  This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead.  As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Tested compilation together with current glibc with glibc's
+build-many-glibcs.py.
+
+	* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+	config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+	config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+	config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+	x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+	uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+	config/pa/linux-unwind.h (pa32_fallback_frame_state),
+	config/sh/linux-unwind.h (sh_fallback_frame_state),
+	config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+	config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+	ucontext_t instead of struct ucontext.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/ChangeLog     (REMOVED)       | 14 ++++++++++++++
+ libgcc/config/aarch64/linux-unwind.h |  2 +-
+ libgcc/config/alpha/linux-unwind.h   |  2 +-
+ libgcc/config/bfin/linux-unwind.h    |  2 +-
+ libgcc/config/i386/linux-unwind.h    |  4 ++--
+ libgcc/config/m68k/linux-unwind.h    |  2 +-
+ libgcc/config/nios2/linux-unwind.h   |  2 +-
+ libgcc/config/pa/linux-unwind.h      |  2 +-
+ libgcc/config/sh/linux-unwind.h      |  2 +-
+ libgcc/config/tilepro/linux-unwind.h |  2 +-
+ libgcc/config/xtensa/linux-unwind.h  |  2 +-
+ 11 files changed, 25 insertions(+), 11 deletions(-)
+
+diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
+index 4512efb..06de45a 100644
+--- a/libgcc/config/aarch64/linux-unwind.h
++++ b/libgcc/config/aarch64/linux-unwind.h
+@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
+   struct rt_sigframe
+   {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   };
+ 
+   struct rt_sigframe *rt_;
+diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
+index bdbba4a..e84812e 100644
+--- a/libgcc/config/alpha/linux-unwind.h
++++ b/libgcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       sc = &rt_->uc.uc_mcontext;
+     }
+diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
+index 77b7c23..8bf5e82 100644
+--- a/libgcc/config/bfin/linux-unwind.h
++++ b/libgcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ 	void *puc;
+ 	char retcode[8];
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+ 
+       /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
+index 540a0a2..29efbe3 100644
+--- a/libgcc/config/i386/linux-unwind.h
++++ b/libgcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+   if (*(unsigned char *)(pc+0) == 0x48
+       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+     {
+-      struct ucontext *uc_ = context->cfa;
++      ucontext_t *uc_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+          because it does not alias anything.  */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ 	siginfo_t *pinfo;
+ 	void *puc;
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
+index 75b7cf7..f964e24 100644
+--- a/libgcc/config/m68k/linux-unwind.h
++++ b/libgcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now.  */
+ struct uw_ucontext {
+ 	unsigned long	  uc_flags;
+-	struct ucontext  *uc_link;
++	ucontext_t	 *uc_link;
+ 	stack_t		  uc_stack;
+ 	mcontext_t	  uc_mcontext;
+ 	unsigned long	  uc_filler[80];
+diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
+index 2304142..30f25ea 100644
+--- a/libgcc/config/nios2/linux-unwind.h
++++ b/libgcc/config/nios2/linux-unwind.h
+@@ -38,7 +38,7 @@ struct nios2_mcontext {
+ 
+ struct nios2_ucontext {
+   unsigned long uc_flags;
+-  struct ucontext *uc_link;
++  ucontext_t *uc_link;
+   stack_t uc_stack;
+   struct nios2_mcontext uc_mcontext;
+   sigset_t uc_sigmask;	/* mask last for extensibility */
+diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
+index 9a2657f..e47493d 100644
+--- a/libgcc/config/pa/linux-unwind.h
++++ b/libgcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+   struct sigcontext *sc;
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *frame;
+ 
+   /* rt_sigreturn trampoline:
+diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
+index e389cac..0bf43ba 100644
+--- a/libgcc/config/sh/linux-unwind.h
++++ b/libgcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
+index 796e976..75f8890 100644
+--- a/libgcc/config/tilepro/linux-unwind.h
++++ b/libgcc/config/tilepro/linux-unwind.h
+@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
+   struct rt_sigframe {
+     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *rt_;
+ 
+   /* Return if this is not a signal handler.  */
+diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
+index 9872492..586a9d4 100644
+--- a/libgcc/config/xtensa/linux-unwind.h
++++ b/libgcc/config/xtensa/linux-unwind.h
+@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+ 
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *rt_;
+ 
+   /* movi a2, __NR_rt_sigreturn; syscall */
+-- 
+2.9.3
+
diff --git a/pkgs/development/compilers/llvm/3.7/llvm.nix b/pkgs/development/compilers/llvm/3.7/llvm.nix
index b600665cd8f6..54ab8c108773 100644
--- a/pkgs/development/compilers/llvm/3.7/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.7/llvm.nix
@@ -1,5 +1,6 @@
 { stdenv
 , fetch
+, fetchpatch
 , perl
 , groff
 , cmake
@@ -45,6 +46,18 @@ in stdenv.mkDerivation rec {
   # those always succeed has the net effect of disabling all bindings.
   prePatch = ''
     substituteInPlace cmake/config-ix.cmake --replace "if(WIN32)" "if(1)"
+  ''
+  + stdenv.lib.optionalString (stdenv ? glibc) ''
+    (
+      cd projects/compiler-rt
+      patch -p1 < ${
+        fetchpatch {
+          name = "sigaltstack.patch"; # for glibc-2.26
+          url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
+          sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
+        }
+      }
+    )
   '';
 
   # hacky fix: created binaries need to be run before installation
diff --git a/pkgs/development/compilers/llvm/3.8/llvm.nix b/pkgs/development/compilers/llvm/3.8/llvm.nix
index f8b8948e749e..a0fbdf2b706a 100644
--- a/pkgs/development/compilers/llvm/3.8/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.8/llvm.nix
@@ -1,5 +1,6 @@
 { stdenv
 , fetch
+, fetchpatch
 , perl
 , groff
 , cmake
@@ -49,6 +50,18 @@ in stdenv.mkDerivation rec {
     substituteInPlace CMakeLists.txt \
       --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \
       --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
+  ''
+  + stdenv.lib.optionalString (stdenv ? glibc) ''
+    (
+      cd projects/compiler-rt
+      patch -p1 < ${
+        fetchpatch {
+          name = "sigaltstack.patch"; # for glibc-2.26
+          url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
+          sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
+        }
+      }
+    )
   '';
 
   # hacky fix: created binaries need to be run before installation
diff --git a/pkgs/development/compilers/llvm/3.9/llvm.nix b/pkgs/development/compilers/llvm/3.9/llvm.nix
index 809c49ac24a2..495f95a5bbdb 100644
--- a/pkgs/development/compilers/llvm/3.9/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.9/llvm.nix
@@ -91,6 +91,20 @@ in stdenv.mkDerivation rec {
   + stdenv.lib.optionalString (enableSharedLibraries) ''
     substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
     patch -p1 < ./llvm-outputs.patch
+  ''
+  + stdenv.lib.optionalString (stdenv ? glibc) ''
+    (
+      cd projects/compiler-rt
+      patch -p1 < ${
+        fetchpatch {
+          name = "sigaltstack.patch"; # for glibc-2.26
+          url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
+          sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
+        }
+      }
+      substituteInPlace lib/esan/esan_sideline_linux.cpp \
+        --replace 'struct sigaltstack' 'stack_t'
+    )
   '';
 
   # hacky fix: created binaries need to be run before installation
diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix
index e90603ffefae..332fee8529ba 100644
--- a/pkgs/development/compilers/llvm/4/llvm.nix
+++ b/pkgs/development/compilers/llvm/4/llvm.nix
@@ -67,6 +67,20 @@ in stdenv.mkDerivation rec {
   + stdenv.lib.optionalString (enableSharedLibraries) ''
     substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
     patch -p1 < ./llvm-outputs.patch
+  ''
+  + stdenv.lib.optionalString (stdenv ? glibc) ''
+    (
+      cd projects/compiler-rt
+      patch -p1 < ${
+        fetchpatch {
+          name = "sigaltstack.patch"; # for glibc-2.26
+          url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
+          sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
+        }
+      }
+      substituteInPlace lib/esan/esan_sideline_linux.cpp \
+        --replace 'struct sigaltstack' 'stack_t'
+    )
   '';
 
   # hacky fix: created binaries need to be run before installation
diff --git a/pkgs/development/compilers/ponyc/pony-stable.nix b/pkgs/development/compilers/ponyc/pony-stable.nix
index 21488361f4a9..0e382efd7079 100644
--- a/pkgs/development/compilers/ponyc/pony-stable.nix
+++ b/pkgs/development/compilers/ponyc/pony-stable.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "pony-stable-${version}";
-  version = "0.0.1";
+  version = "0.1.1";
 
   src = fetchFromGitHub {
     owner = "ponylang";
     repo = "pony-stable";
     rev = version;
-    sha256 = "0q05135mnzzdwam7cnmxq34clqhmc83yp2gi63sx20c74rcw3p6v";
+    sha256 = "0v4039iijjv93m89s3dsikcbp1y0hml6g1agj44s6w2g4m8kiiw3";
   };
 
   buildInputs = [ ponyc ];
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index 0ef1c492d588..7be3cbd5effa 100644
--- a/pkgs/development/interpreters/php/default.nix
+++ b/pkgs/development/interpreters/php/default.nix
@@ -22,10 +22,12 @@ let
 
       enableParallelBuilding = true;
 
-  nativeBuildInputs = [ pkgconfig ];
+      nativeBuildInputs = [ pkgconfig ];
       buildInputs = [ flex bison ]
         ++ lib.optional stdenv.isLinux systemd;
 
+      CXXFLAGS = lib.optional stdenv.cc.isClang "-std=c++11";
+
       flags = {
 
         # much left to do here...
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index 3216a130f671..d2ffa45626be 100644
--- a/pkgs/development/libraries/SDL2/default.nix
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -2,6 +2,7 @@
 , openglSupport ? false, mesa_noglu
 , alsaSupport ? true, alsaLib
 , x11Support ? true, libICE, libXi, libXScrnSaver, libXcursor, libXinerama, libXext, libXxf86vm, libXrandr
+, waylandSupport ? true, wayland, wayland-protocols, libxkbcommon
 , dbusSupport ? false, dbus
 , udevSupport ? false, udev
 , ibusSupport ? false, ibus
@@ -17,7 +18,7 @@ assert openglSupport -> (stdenv.isDarwin || mesa_noglu != null && x11Support);
 
 let
   configureFlagsFun = attrs: [
-      "--disable-oss" "--disable-x11-shared"
+      "--disable-oss" "--disable-x11-shared" "--disable-wayland-shared"
       "--disable-pulseaudio-shared" "--disable-alsa-shared"
     ] ++ lib.optional alsaSupport "--with-alsa-prefix=${attrs.alsaLib.out}/lib"
       ++ lib.optional (!x11Support) "--without-x";
@@ -39,6 +40,7 @@ stdenv.mkDerivation rec {
 
   # Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated.
   propagatedBuildInputs = lib.optionals x11Support [ libICE libXi libXScrnSaver libXcursor libXinerama libXext libXrandr libXxf86vm ] ++
+    lib.optionals waylandSupport [ wayland wayland-protocols libxkbcommon ] ++
     lib.optional pulseaudioSupport libpulseaudio;
 
   buildInputs = [ audiofile ] ++
diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix
index 77b826acc032..01f3c11ac737 100644
--- a/pkgs/development/libraries/expat/default.nix
+++ b/pkgs/development/libraries/expat/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchpatch, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "expat-2.2.4";
+  name = "expat-2.2.5";
 
   src = fetchurl {
     url = "mirror://sourceforge/expat/${name}.tar.bz2";
-    sha256 = "17h1fb9zvqvf0sr78j211bngc6jpql5wzar8fg9b52jzjvdqbb83";
+    sha256 = "1xpd78sp7m34jqrw5x13bz7kgz0n6aj15wn4zj4gfx3ypbpk5p6r";
   };
 
   outputs = [ "out" "dev" ]; # TODO: fix referrers
diff --git a/pkgs/development/libraries/git2/0.25.nix b/pkgs/development/libraries/git2/0.25.nix
new file mode 100644
index 000000000000..679049a0e13e
--- /dev/null
+++ b/pkgs/development/libraries/git2/0.25.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, python
+, zlib, libssh2, openssl, http-parser, curl, libiconv
+}:
+
+stdenv.mkDerivation (rec {
+  version = "0.25.1";
+  name = "libgit2-${version}";
+
+  src = fetchFromGitHub {
+    owner = "libgit2";
+    repo = "libgit2";
+    rev = "v${version}";
+    sha256 = "1jhikg0gqpdzfzhgv44ybdpm24lvgkc7ki4306lc5lvmj1s2nylj";
+  };
+
+  cmakeFlags = "-DTHREADSAFE=ON";
+
+  nativeBuildInputs = [ cmake python pkgconfig ];
+
+  buildInputs = [ zlib libssh2 openssl http-parser curl ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "The Git linkable library";
+    homepage = https://libgit2.github.com/;
+    license = stdenv.lib.licenses.gpl2;
+    platforms = with stdenv.lib.platforms; all;
+  };
+} // stdenv.lib.optionalAttrs (!stdenv.isLinux) {
+  NIX_LDFLAGS = "-liconv";
+  propagatedBuildInputs = [ libiconv ];
+})
diff --git a/pkgs/development/libraries/git2/default.nix b/pkgs/development/libraries/git2/default.nix
index 0d53d00737ba..42cf181f84f1 100644
--- a/pkgs/development/libraries/git2/default.nix
+++ b/pkgs/development/libraries/git2/default.nix
@@ -1,35 +1,30 @@
-{ stdenv, fetchurl, pkgconfig, cmake, zlib, python, libssh2, openssl, curl, http-parser, libiconv }:
+{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib, python, libssh2, openssl, curl, http-parser, libiconv }:
 
 stdenv.mkDerivation (rec {
-  version = "0.25.1";
   name = "libgit2-${version}";
+  version = "0.26.0";
+  # keep the version in sync with pythonPackages.pygit2 and gnome3.libgit2-glib
 
-  src = fetchurl {
-    name = "${name}.tar.gz";
-    url = "https://github.com/libgit2/libgit2/tarball/v${version}";
-    sha256 = "100bah8picqjzyhpw4wd7z5vyidcb8aggin50bhbpn607h8n8bml";
+  src = fetchFromGitHub {
+    owner = "libgit2";
+    repo = "libgit2";
+    rev = "v${version}";
+    sha256 = "0zrrmfkfhd2xb4879z5khjb6xsdklrm01f1lscrs2ks68v25fk78";
   };
 
-  # TODO: `cargo` (rust's package manager) surfaced a serious bug in
-  # libgit2 when the `Security.framework` transport is used on Darwin.
-  # The upstream issue is tracked at
-  # https://github.com/libgit2/libgit2/issues/3885 - feel free to
-  # remove this patch as soon as it's resolved (i.E. when cargo is
-  # working fine without this patch)
-  patches = stdenv.lib.optionals stdenv.isDarwin [
-    ./disable-security.framework.patch
-  ];
-
   cmakeFlags = "-DTHREADSAFE=ON";
 
   nativeBuildInputs = [ cmake python pkgconfig ];
+
   buildInputs = [ zlib libssh2 openssl http-parser curl ];
 
-  meta = {
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
     description = "The Git linkable library";
     homepage = https://libgit2.github.com/;
-    license = stdenv.lib.licenses.gpl2;
-    platforms = with stdenv.lib.platforms; all;
+    license = licenses.gpl2;
+    platforms = with platforms; all;
   };
 } // stdenv.lib.optionalAttrs (!stdenv.isLinux) {
   NIX_LDFLAGS = "-liconv";
diff --git a/pkgs/development/libraries/git2/disable-security.framework.patch b/pkgs/development/libraries/git2/disable-security.framework.patch
deleted file mode 100644
index ce6a008b1c4c..000000000000
--- a/pkgs/development/libraries/git2/disable-security.framework.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From fbc2ea65406236a740b8734dd41dc5ddbc24f8c9 Mon Sep 17 00:00:00 2001
-From: mulrich <mulrich@entwicklerheld.local>
-Date: Mon, 8 Aug 2016 15:36:07 +0200
-Subject: [PATCH] disable security.framework
-
----
- CMakeLists.txt    | 7 +++----
- src/curl_stream.c | 9 ++++++++-
- 2 files changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 93a9e47..331e148 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -49,7 +49,8 @@ ENDIF()
- 
- IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- 	SET( USE_ICONV ON )
--	FIND_PACKAGE(Security)
-+	# FIND_PACKAGE(Security)
-+  SET(SECURITY_FOUND "NO")
- 	FIND_PACKAGE(CoreFoundation REQUIRED)
- ENDIF()
- 
-@@ -87,9 +88,7 @@ IF(MSVC)
- 	OPTION(MSVC_CRTDBG "Enable CRTDBG memory leak reporting" OFF)
- ENDIF()
- 
--IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
--	OPTION( USE_OPENSSL                     "Link with and use openssl library"             ON )
--ENDIF()
-+OPTION( USE_OPENSSL                     "Link with and use openssl library"             ON )
- 
- CHECK_STRUCT_HAS_MEMBER ("struct stat" st_mtim "sys/types.h;sys/stat.h"
- 	HAVE_STRUCT_STAT_ST_MTIM LANGUAGE C)
-diff --git a/src/curl_stream.c b/src/curl_stream.c
-index 98de187..a8a9f4c 100644
---- a/src/curl_stream.c
-+++ b/src/curl_stream.c
-@@ -309,7 +309,14 @@ int git_curl_stream_new(git_stream **out, const char *host, const char *port)
- 	curl_easy_setopt(handle, CURLOPT_HTTPPROXYTUNNEL, 1);
- 	curl_easy_setopt(handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
- 
--	/* curl_easy_setopt(handle, CURLOPT_VERBOSE, 1); */
-+  const char* cainfo = getenv("SSL_CERT_FILE");
-+  if(cainfo != NULL) {
-+    curl_easy_setopt(handle, CURLOPT_CAINFO, cainfo);
-+  }
-+
-+  /*
-+	curl_easy_setopt(handle, CURLOPT_VERBOSE, 1);
-+  */
- 
- 	st->parent.version = GIT_STREAM_VERSION;
- 	st->parent.encrypted = 0; /* we don't encrypt ourselves */
--- 
-2.3.8 (Apple Git-58)
-
diff --git a/pkgs/development/libraries/glibc/2.25-49.patch.gz b/pkgs/development/libraries/glibc/2.25-49.patch.gz
deleted file mode 100644
index 6796347e3795..000000000000
--- a/pkgs/development/libraries/glibc/2.25-49.patch.gz
+++ /dev/null
Binary files differdiff --git a/pkgs/development/libraries/glibc/2.26-75.patch.gz b/pkgs/development/libraries/glibc/2.26-75.patch.gz
new file mode 100644
index 000000000000..e2a8867e4fff
--- /dev/null
+++ b/pkgs/development/libraries/glibc/2.26-75.patch.gz
Binary files differdiff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index 5c7bbb32c330..7894d75fbe67 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -19,9 +19,9 @@
 } @ args:
 
 let
-  version = "2.25";
-  patchSuffix = "-49";
-  sha256 = "067bd9bb3390e79aa45911537d13c3721f1d9d3769931a30c2681bfee66f23a0";
+  version = "2.26";
+  patchSuffix = "-75";
+  sha256 = "1ggnj1hzjym7sn93rbwydcqd562q73lsb7g7kd199g6j9j9hlkp5";
   cross = if buildPlatform != hostPlatform then hostPlatform else null;
 in
 
@@ -46,7 +46,7 @@ stdenv.mkDerivation ({
           glibc-2.25-49-gbc5ace67fe
           $ git show --reverse glibc-2.25..release/2.25/master | gzip -n -9 --rsyncable - > 2.25-49.patch.gz
       */
-      ./2.25-49.patch.gz
+      ./2.26-75.patch.gz
 
       /* Have rpcgen(1) look for cpp(1) in $PATH.  */
       ./rpcgen-path.patch
@@ -100,15 +100,12 @@ stdenv.mkDerivation ({
       (if profilingLibraries
        then "--enable-profile"
        else "--disable-profile")
-    ] ++ lib.optionals (cross == null && withLinuxHeaders) [
-      "--enable-kernel=2.6.32"
+    ] ++ lib.optionals withLinuxHeaders [
+      "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26
     ] ++ lib.optionals (cross != null) [
       (if cross.withTLS then "--with-tls" else "--without-tls")
       (if cross ? float && cross.float == "soft" then "--without-fp" else "--with-fp")
-    ] ++ lib.optionals (cross != null
-          && cross.platform ? kernelMajor
-          && cross.platform.kernelMajor == "2.6") [
-      "--enable-kernel=2.6.0"
+    ] ++ lib.optionals (cross != null) [
       "--with-__thread"
     ] ++ lib.optionals (cross == null && stdenv.isArm) [
       "--host=arm-linux-gnueabi"
diff --git a/pkgs/development/libraries/icu/base.nix b/pkgs/development/libraries/icu/base.nix
index 78e0c5740446..8a7cf8365a5b 100644
--- a/pkgs/development/libraries/icu/base.nix
+++ b/pkgs/development/libraries/icu/base.nix
@@ -25,6 +25,11 @@ stdenv.mkDerivation {
     echo Source root reset to ''${sourceRoot}
   '';
 
+  # https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
+  postPatch = if stdenv ? glibc
+    then "substituteInPlace i18n/digitlst.cpp --replace '<xlocale.h>' '<locale.h>'"
+    else null; # won't find locale_t on darwin
+
   inherit patchFlags patches;
 
   preConfigure = ''
diff --git a/pkgs/development/libraries/iniparser/default.nix b/pkgs/development/libraries/iniparser/default.nix
index a09bcd6f039c..e586b30393e6 100644
--- a/pkgs/development/libraries/iniparser/default.nix
+++ b/pkgs/development/libraries/iniparser/default.nix
@@ -1,17 +1,14 @@
 { stdenv, fetchFromGitHub }:
 
-let
-  inherit (stdenv.lib) optional;
-
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
   name = "iniparser-${version}";
-  version = "4.0";
+  version = "4.1";
 
   src = fetchFromGitHub {
     owner = "ndevilla";
     repo = "iniparser";
     rev = "v${version}";
-    sha256 = "0339qa0qxa5z02xjcs5my8v91v0r9jm4piswrl1sa29kwyxgv5nb";
+    sha256 = "0dhab6pad6wh816lr7r3jb6z273njlgw2vpw8kcfnmi7ijaqhnr5";
   };
 
   patches = ./no-usr.patch;
@@ -19,9 +16,6 @@ in stdenv.mkDerivation rec {
   doCheck = true;
   preCheck = "patchShebangs test/make-tests.sh";
 
-  # TODO: Build dylib on Darwin
-  buildFlags = (if stdenv.isDarwin then [ "libiniparser.a" ] else [ "libiniparser.so" ]) ++ [ "CC=cc" ];
-
   installPhase = ''
     mkdir -p $out/lib
 
@@ -34,17 +28,16 @@ in stdenv.mkDerivation rec {
     done;
     cp -r html $out/share/doc/${name}
 
-  '' + (if stdenv.isDarwin then ''
     cp libiniparser.a $out/lib
-  '' else ''
-    cp libiniparser.so.0 $out/lib
-    ln -s libiniparser.so.0 $out/lib/libiniparser.so
-  '');
+    cp libiniparser.so.1 $out/lib
+    ln -s libiniparser.so.1 $out/lib/libiniparser.so
+  '';
 
-  meta = {
+  meta = with stdenv.lib; {
     inherit (src.meta) homepage;
     description = "Free standalone ini file parsing library";
-    license = stdenv.lib.licenses.mit;
-    platforms = stdenv.lib.platforms.unix;
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.primeos ];
   };
 }
diff --git a/pkgs/development/libraries/libnsl/default.nix b/pkgs/development/libraries/libnsl/default.nix
new file mode 100644
index 000000000000..d4af280c3cd8
--- /dev/null
+++ b/pkgs/development/libraries/libnsl/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, libtirpc, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "libnsl-${version}";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "thkukuk";
+    repo = "libnsl";
+    rev = "libnsl-${version}";
+    sha256 = "0h8br0gmgw3fp5fmy6bfbj1qlk9hry1ssg25ssjgxbd8spczpscs";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  buildInputs = [ libtirpc ];
+
+  meta = with stdenv.lib; {
+    description = "Client interface library for NIS(YP) and NIS+";
+    homepage = https://github.com/thkukuk/libnsl;
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.dezgeg ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/development/libraries/live555/default.nix b/pkgs/development/libraries/live555/default.nix
index de4d295ebe3b..e0f84f5080df 100644
--- a/pkgs/development/libraries/live555/default.nix
+++ b/pkgs/development/libraries/live555/default.nix
@@ -12,7 +12,12 @@ stdenv.mkDerivation {
     sha256 = "02z2f8z5cy0ajnh9pgar40lsxdknfw5cbyw52138hxnpr6adrvak";
   };
 
-  postPatch = "sed 's,/bin/rm,rm,g' -i genMakefiles";
+  postPatch = "sed 's,/bin/rm,rm,g' -i genMakefiles"
+  + stdenv.lib.optionalString (stdenv ? glibc) ''
+
+    substituteInPlace liveMedia/include/Locale.hh \
+      --replace '<xlocale.h>' '<locale.h>'
+  '';
 
   configurePhase = ''
     sed \
diff --git a/pkgs/development/libraries/ti-rpc/default.nix b/pkgs/development/libraries/ti-rpc/default.nix
index d66b5d82ff52..0d6674cce814 100644
--- a/pkgs/development/libraries/ti-rpc/default.nix
+++ b/pkgs/development/libraries/ti-rpc/default.nix
@@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
     sha256 = "1xchbxy0xql7yl7z4n1icj8r7dmly46i22fvm00vdjq64zlmqg3j";
   };
 
+  postPatch = ''
+    sed '1i#include <stdint.h>' -i src/xdr_sizeof.c
+  '';
+
   nativeBuildInputs = [ autoreconfHook ];
   propagatedBuildInputs = [ libkrb5 ];
 
diff --git a/pkgs/development/libraries/vigra/default.nix b/pkgs/development/libraries/vigra/default.nix
index 2910e8b7dbbc..324d977c72e5 100644
--- a/pkgs/development/libraries/vigra/default.nix
+++ b/pkgs/development/libraries/vigra/default.nix
@@ -24,6 +24,8 @@ in stdenv.mkDerivation rec {
             ++ stdenv.lib.optionals (stdenv.system == "x86_64-linux")
                   [ "-DCMAKE_CXX_FLAGS=-fPIC" "-DCMAKE_C_FLAGS=-fPIC" ];
 
+  enableParallelBuilding = true;
+
   meta = with stdenv.lib; {
     description = "Novel computer vision C++ library with customizable algorithms and data structures";
     homepage = http://hci.iwr.uni-heidelberg.de/vigra;
diff --git a/pkgs/development/ocaml-modules/zed/default.nix b/pkgs/development/ocaml-modules/zed/default.nix
index 85977792b4d3..1ddb6d180405 100644
--- a/pkgs/development/ocaml-modules/zed/default.nix
+++ b/pkgs/development/ocaml-modules/zed/default.nix
@@ -3,8 +3,8 @@
 let param =
   if stdenv.lib.versionAtLeast ocaml.version "4.02" then
   {
-    version = "1.5";
-    sha256 = "1nq884cxl1k4daa549bk7bxarwivbpp51k4blbiwyxwfhs29xgfr";
+    version = "1.6";
+    sha256 = "00hhxcjf3bj3w2qm8nzs9x6vrqkadf4i0277s5whzy2rmiknj63v";
     buildInputs = [ jbuilder ];
     extra = {
      buildPhase = "jbuilder build -p zed";
diff --git a/pkgs/development/python-modules/betamax-matchers/default.nix b/pkgs/development/python-modules/betamax-matchers/default.nix
new file mode 100644
index 000000000000..762154ac45d2
--- /dev/null
+++ b/pkgs/development/python-modules/betamax-matchers/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, betamax, requests_toolbelt }:
+
+buildPythonPackage rec {
+  pname = "betamax-matchers";
+  version = "0.4.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43";
+  };
+
+  buildInputs = [ betamax requests_toolbelt ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/sigmavirus24/betamax_matchers;
+    description = "A group of experimental matchers for Betamax";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/pkgs/development/python-modules/betamax-serializers/default.nix b/pkgs/development/python-modules/betamax-serializers/default.nix
new file mode 100644
index 000000000000..2ad23f1f9e65
--- /dev/null
+++ b/pkgs/development/python-modules/betamax-serializers/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, betamax, pyyaml }:
+
+buildPythonPackage rec {
+  pname = "betamax-serializers";
+  version = "0.2.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1yqzwx204m4lxlpg04cwv6iwzmcpdzr19wvj97vvxchp0g4qg83d";
+  };
+
+  buildInputs = [ betamax pyyaml ];
+
+  meta = with stdenv.lib; {
+    homepage = https://gitlab.com/betamax/serializers;
+    description = "A set of third-party serializers for Betamax";
+    license = licenses.asl20;
+  };
+}
diff --git a/pkgs/development/python-modules/devpi-common/default.nix b/pkgs/development/python-modules/devpi-common/default.nix
index 082f2baeceb8..67f8debc43a0 100644
--- a/pkgs/development/python-modules/devpi-common/default.nix
+++ b/pkgs/development/python-modules/devpi-common/default.nix
@@ -14,6 +14,8 @@ with pythonPackages;buildPythonPackage rec {
   checkInputs = [ pytest ];
 
   checkPhase = ''
+    # Don't know why this test is failing!
+    substituteInPlace testing/test_request.py --replace "test_env" "noop_test_env"
     py.test
   '';
 
diff --git a/pkgs/development/python-modules/fastimport/default.nix b/pkgs/development/python-modules/fastimport/default.nix
new file mode 100644
index 000000000000..ee1048ec5fac
--- /dev/null
+++ b/pkgs/development/python-modules/fastimport/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildPythonPackage, python, fetchurl }:
+
+buildPythonPackage rec {
+  name = "fastimport-${version}";
+  version = "0.9.6";
+
+  src = fetchurl {
+    url = "mirror://pypi/f/fastimport/${name}.tar.gz";
+    sha256 = "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43";
+  };
+
+  checkPhase = ''
+    ${python.interpreter} -m unittest discover
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://launchpad.net/python-fastimport;
+    description = "VCS fastimport/fastexport parser";
+    maintainers = with maintainers; [ koral ];
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/pkgs/development/python-modules/h2/default.nix b/pkgs/development/python-modules/h2/default.nix
new file mode 100644
index 000000000000..08cd1943eff6
--- /dev/null
+++ b/pkgs/development/python-modules/h2/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, enum34, hpack, hyperframe }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "h2";
+  version = "3.0.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0r3f43r0v7sqgdjjg5ngw0dndk2v6cyd0jncpwya54m37y42z5mj";
+  };
+
+  propagatedBuildInputs = [ enum34 hpack hyperframe ];
+
+  meta = with stdenv.lib; {
+    description = "HTTP/2 State-Machine based protocol implementation";
+    homepage = "http://hyper.rtfd.org/";
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/hyperframe/default.nix b/pkgs/development/python-modules/hyperframe/default.nix
new file mode 100644
index 000000000000..91e00a7a1461
--- /dev/null
+++ b/pkgs/development/python-modules/hyperframe/default.nix
@@ -0,0 +1,17 @@
+{ stdenv, buildPythonPackage, fetchPypi }:
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "hyperframe";
+  version = "5.1.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "017vjbb1xjak1pxcvihhilzjnmpfvhapk7k88wp6lvdkkm9l8nd2";
+  };
+
+  meta = with stdenv.lib; {
+    description = "HTTP/2 framing layer for Python";
+    homepage = "http://hyper.rtfd.org/";
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/kaitaistruct/default.nix b/pkgs/development/python-modules/kaitaistruct/default.nix
new file mode 100644
index 000000000000..c99619566175
--- /dev/null
+++ b/pkgs/development/python-modules/kaitaistruct/default.nix
@@ -0,0 +1,18 @@
+{ stdenv, kaitaistruct, buildPythonPackage, fetchPypi }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "kaitaistruct";
+  version = "0.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "19j3snmr0qbd48f7yd3cc21ffv13dahf8ys591dnalbhvnkar71i";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Kaitai Struct: runtime library for Python";
+    homepage = "https://github.com/kaitai-io/kaitai_struct_python_runtime";
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/keepkey/default.nix b/pkgs/development/python-modules/keepkey/default.nix
index 8eba12dfcea2..9ea6840c4d2c 100644
--- a/pkgs/development/python-modules/keepkey/default.nix
+++ b/pkgs/development/python-modules/keepkey/default.nix
@@ -1,21 +1,25 @@
-{ stdenv, fetchPypi, buildPythonPackage, ecdsa
-, mnemonic, protobuf, hidapi }:
+{ stdenv, fetchFromGitHub, buildPythonPackage, pytest
+, ecdsa , mnemonic, protobuf, hidapi, trezor }:
 
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "keepkey";
   version = "4.0.0";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "95c8d5127919f9fc4bb0120b05f92efc8f526d4a68122ac18e63509571ac45a2";
+  src = fetchFromGitHub {
+    owner = "keepkey";
+    repo = "python-keepkey";
+    rev = "v${version}";
+    sha256 = "144awjkc169z2n1ffirs697y6m97izh3pbh3sjhy3nji7jszh592";
   };
 
-  propagatedBuildInputs = [ protobuf hidapi ];
+  propagatedBuildInputs = [ protobuf hidapi trezor ];
 
   buildInputs = [ ecdsa mnemonic ];
 
-  # There are no actual tests: "ImportError: No module named tests"
+  checkInputs = [ pytest ];
+
+  # tests requires hardware
   doCheck = false;
 
   # Remove impossible dependency constraint
diff --git a/pkgs/development/python-modules/ldap3/default.nix b/pkgs/development/python-modules/ldap3/default.nix
new file mode 100644
index 000000000000..895272f351de
--- /dev/null
+++ b/pkgs/development/python-modules/ldap3/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchPypi, buildPythonPackage, gssapi, pyasn1 }:
+
+buildPythonPackage rec {
+  version = "2.3";
+  pname = "ldap3";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1b36lwil4iflk2ay8gi663abpnfm8id7qg4n3jkmmqbnc1sv6mn0";
+  };
+
+  buildInputs = [ gssapi ];
+
+  propagatedBuildInputs = [ pyasn1 ];
+
+  doCheck = false; # requires network
+
+  meta = with stdenv.lib; {
+    homepage = https://pypi.python.org/pypi/ldap3;
+    description = "A strictly RFC 4510 conforming LDAP V3 pure Python client library";
+    license = licenses.lgpl3;
+  };
+}
diff --git a/pkgs/development/python-modules/libagent/default.nix b/pkgs/development/python-modules/libagent/default.nix
index cca10794258f..e8cecda75897 100644
--- a/pkgs/development/python-modules/libagent/default.nix
+++ b/pkgs/development/python-modules/libagent/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchPypi, buildPythonPackage, ed25519, ecdsa
-, semver, keepkey, trezor, mnemonic, ledgerblue
+, semver, keepkey, trezor, mnemonic, ledgerblue, unidecode, mock, pytest
 }:
 
 buildPythonPackage rec {
@@ -17,6 +17,14 @@ buildPythonPackage rec {
     trezor mnemonic ledgerblue
   ];
 
+  propagatedBuildInputs = [ unidecode ];
+
+  checkInputs = [ mock pytest ];
+
+  checkPhase = ''
+    py.test libagent/tests
+  '';
+
   meta = with stdenv.lib; {
     description = "Using hardware wallets as SSH/GPG agent";
     homepage = https://github.com/romanz/trezor-agent;
diff --git a/pkgs/development/python-modules/praw/default.nix b/pkgs/development/python-modules/praw/default.nix
new file mode 100644
index 000000000000..c0be1009b069
--- /dev/null
+++ b/pkgs/development/python-modules/praw/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, buildPythonPackage, fetchFromGitHub
+, requests, decorator, flake8, mock, six, update_checker, pytestrunner, prawcore
+, pytest, betamax, betamax-serializers, betamax-matchers, requests_toolbelt
+}:
+
+buildPythonPackage rec {
+  pname = "praw";
+  version = "5.2.0";
+
+  src = fetchFromGitHub {
+    owner = "praw-dev";
+    repo = "praw";
+    rev = "v${version}";
+    sha256 = "0nwfadczxa1fyq65zc3sfv8g2r4w3xrx3bdi5fv9xpn97wh2ifgw";
+  };
+
+  propagatedBuildInputs = [
+    requests
+    decorator
+    flake8
+    mock
+    six
+    update_checker
+    pytestrunner
+    prawcore
+  ];
+
+  checkInputs = [
+    pytest
+    betamax
+    betamax-serializers
+    betamax-matchers
+    requests_toolbelt
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Python Reddit API wrapper";
+    homepage = http://praw.readthedocs.org/;
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jgeerds ];
+  };
+}
diff --git a/pkgs/development/python-modules/prawcore/default.nix b/pkgs/development/python-modules/prawcore/default.nix
new file mode 100644
index 000000000000..eb3fb784dc97
--- /dev/null
+++ b/pkgs/development/python-modules/prawcore/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, buildPythonPackage, fetchFromGitHub
+, requests
+, testfixtures, mock, requests_toolbelt
+, betamax, betamax-serializers, betamax-matchers
+}:
+
+buildPythonPackage rec {
+  pname = "prawcore";
+  version = "0.12.0";
+
+  src = fetchFromGitHub {
+    owner = "praw-dev";
+    repo = "prawcore";
+    rev = "v${version}";
+    sha256 = "1z5fz6v4bv6xw84l4q3rpw3j63bb2dldl0fd6ckz8wqlpb2l45br";
+  };
+
+  propagatedBuildInputs = [
+    requests
+  ];
+
+  checkInputs = [
+    testfixtures
+    mock
+    betamax
+    betamax-serializers
+    betamax-matchers
+    requests_toolbelt
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Low-level communication layer for PRAW";
+    homepage = http://praw.readthedocs.org/;
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jgeerds ];
+  };
+}
diff --git a/pkgs/development/python-modules/pyasn1-modules/default.nix b/pkgs/development/python-modules/pyasn1-modules/default.nix
new file mode 100644
index 000000000000..a7ee15d6a181
--- /dev/null
+++ b/pkgs/development/python-modules/pyasn1-modules/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildPythonPackage, fetchPypi, pyasn1, isPyPy }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "pyasn1-modules";
+  version = "0.1.5";
+  disabled = isPyPy;
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1239h6h67vg0wazg2qgv6m3hdim2gs66pl89lbnayk55bbnkwc0x";
+  };
+
+  propagatedBuildInputs = [ pyasn1 ];
+
+  meta = with stdenv.lib; {
+    description = "A collection of ASN.1-based protocols modules";
+    homepage = https://pypi.python.org/pypi/pyasn1-modules;
+    license = licenses.bsd3;
+    platforms = platforms.unix;  # same as pyasn1
+  };
+}
diff --git a/pkgs/development/python-modules/pyasn1/default.nix b/pkgs/development/python-modules/pyasn1/default.nix
new file mode 100644
index 000000000000..d0122a5b7e40
--- /dev/null
+++ b/pkgs/development/python-modules/pyasn1/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, buildPythonPackage, fetchPypi, }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "pyasn1";
+  version = "0.3.4";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "06hhy38jhwh95gpn8f03cr439273fsfsh4vhd5024r86nh5gyiir";
+  };
+
+  meta = with stdenv.lib; {
+    description = "ASN.1 tools for Python";
+    homepage = http://pyasn1.sourceforge.net/;
+    license = "mBSD";
+    platforms = platforms.unix;  # arbitrary choice
+  };
+}
diff --git a/pkgs/development/python-modules/pyfeed/default.nix b/pkgs/development/python-modules/pyfeed/default.nix
deleted file mode 100644
index a1591037fb5a..000000000000
--- a/pkgs/development/python-modules/pyfeed/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ stdenv, buildPythonPackage, fetchurl
-, xe }:
-
-buildPythonPackage rec {
-  url = "http://www.blarg.net/%7Esteveha/pyfeed-0.7.4.tar.gz";
-
-  name = stdenv.lib.nameFromURL url ".tar";
-
-  src = fetchurl {
-    inherit url;
-    sha256 = "1h4msq573m7wm46h3cqlx4rsn99f0l11rhdqgf50lv17j8a8vvy1";
-  };
-
-  propagatedBuildInputs = [ xe ];
-
-  # error: invalid command 'test'
-  doCheck = false;
-
-  meta = with stdenv.lib; {
-    homepage = "http://home.blarg.net/~steveha/pyfeed.html";
-    description = "Tools for syndication feeds";
-  };
-}
diff --git a/pkgs/development/python-modules/pygit2/default.nix b/pkgs/development/python-modules/pygit2/default.nix
new file mode 100644
index 000000000000..90bfe9783918
--- /dev/null
+++ b/pkgs/development/python-modules/pygit2/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, buildPythonPackage, fetchPypi, isPyPy, libgit2, six, cffi }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "pygit2";
+  version = "0.26.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57";
+  };
+
+  preConfigure = lib.optionalString stdenv.isDarwin ''
+    export DYLD_LIBRARY_PATH="${libgit2}/lib"
+  '';
+
+  propagatedBuildInputs = [ libgit2 six ] ++ lib.optional (!isPyPy) cffi;
+
+  preCheck = ''
+    # disable tests that require networking
+    rm test/test_repository.py
+    rm test/test_credentials.py
+    rm test/test_submodule.py
+  '';
+
+  meta = with lib; {
+    description = "A set of Python bindings to the libgit2 shared library";
+    homepage = https://pypi.python.org/pypi/pygit2;
+    license = licenses.gpl2;
+  };
+}
diff --git a/pkgs/development/python-modules/pylibacl/default.nix b/pkgs/development/python-modules/pylibacl/default.nix
new file mode 100644
index 000000000000..97fbe28e50d7
--- /dev/null
+++ b/pkgs/development/python-modules/pylibacl/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pkgs
+}:
+
+buildPythonPackage rec {
+  pname = "pylibacl";
+  version = "0.5.3";
+  name = pname + "-" + version;
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0c3xw1s5bh6jnsc0wwyxnn6kn6x6rpbmmi05ap1f81fyqlgrzgj0";
+  };
+
+  # ERROR: testExtended (tests.test_acls.AclExtensions)
+  # IOError: [Errno 0] Error
+  doCheck = false;
+
+  buildInputs = with pkgs; [ acl ];
+
+  meta = {
+    description = "A Python extension module for POSIX ACLs, it can be used to query, list, add, and remove ACLs from files and directories under operating systems that support them";
+    license = lib.licenses.lgpl21Plus;
+  };
+}
diff --git a/pkgs/development/python-modules/python-fuse/default.nix b/pkgs/development/python-modules/python-fuse/default.nix
new file mode 100644
index 000000000000..d9debce6aecb
--- /dev/null
+++ b/pkgs/development/python-modules/python-fuse/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, pkgconfig
+, fetchurl
+, fuse
+, buildPythonPackage
+, isPy3k
+}:
+
+buildPythonPackage rec {
+    baseName = "fuse";
+    version = "0.2.1";
+    name = "${baseName}-${version}";
+    disabled = isPy3k;
+
+    src = fetchurl {
+      url = "mirror://sourceforge/fuse/fuse-python-${version}.tar.gz";
+      sha256 = "06rmp1ap6flh64m81j0n3a357ij2vj9zwcvvw0p31y6hz1id9shi";
+    };
+
+    nativeBuildInputs = [ pkgconfig ];
+    buildInputs = [ fuse ];
+
+    meta = {
+      description = "Python bindings for FUSE";
+      license = lib.licenses.lgpl21;
+    };
+}
diff --git a/pkgs/development/python-modules/pyxattr/default.nix b/pkgs/development/python-modules/pyxattr/default.nix
new file mode 100644
index 000000000000..558dc37a394f
--- /dev/null
+++ b/pkgs/development/python-modules/pyxattr/default.nix
@@ -0,0 +1,26 @@
+{ lib
+, pkgs
+, fetchPypi
+, buildPythonPackage
+}:
+
+buildPythonPackage rec {
+    pname = "pyxattr";
+    version = "0.6.0";
+    name = pname + "-" + version;
+
+    src = fetchPypi {
+      inherit pname version;
+      sha256 = "1a3fqjlgbzq5hmc3yrnxxxl8nyn3rz2kfn17svbsahaq4gj0xl09";
+    };
+
+    # IOError: [Errno 95] Operation not supported (expected)
+    doCheck = false;
+
+    buildInputs = with pkgs; [ attr ];
+
+    meta = with lib; {
+      description = "A Python extension module which gives access to the extended attributes for filesystem objects available in some operating systems";
+      license = licenses.lgpl21Plus;
+    };
+}
diff --git a/pkgs/development/python-modules/selenium/default.nix b/pkgs/development/python-modules/selenium/default.nix
new file mode 100644
index 000000000000..d33e86a3f079
--- /dev/null
+++ b/pkgs/development/python-modules/selenium/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchFromGitHub
+, buildPythonPackage
+, geckodriver
+, xorg
+}:
+
+buildPythonPackage rec {
+  name = "selenium-3.6.0";
+  src = fetchurl {
+    url = "mirror://pypi/s/selenium/${name}.tar.gz";
+    sha256 = "15qpvz0bdwjvpcj11fm0rw6r5inr66sqw89ww50l025sbhf04qwm";
+  };
+
+  buildInputs = [xorg.libX11];
+
+  propagatedBuildInputs = [
+    geckodriver
+  ];
+
+  # Recompiling x_ignore_nofocus.so as the original one dlopen's libX11.so.6 by some
+  # absolute paths. Replaced by relative path so it is found when used in nix.
+  x_ignore_nofocus =
+    fetchFromGitHub {
+      owner = "SeleniumHQ";
+      repo = "selenium";
+      rev = "selenium-3.6.0";
+      sha256 = "13wf4hx4i7nhl4s8xkziwxl0km1j873syrj4amragj6mpip2wn8v";
+    };
+
+  patchPhase = ''
+    cp "${x_ignore_nofocus}/cpp/linux-specific/"* .
+    substituteInPlace x_ignore_nofocus.c --replace "/usr/lib/libX11.so.6" "${xorg.libX11.out}/lib/libX11.so.6"
+    gcc -c -fPIC x_ignore_nofocus.c -o x_ignore_nofocus.o
+    gcc -shared \
+      -Wl,${if stdenv.isDarwin then "-install_name" else "-soname"},x_ignore_nofocus.so \
+      -o x_ignore_nofocus.so \
+      x_ignore_nofocus.o
+    cp -v x_ignore_nofocus.so selenium/webdriver/firefox/${if stdenv.is64bit then "amd64" else "x86"}/
+  '';
+
+  meta = with lib; {
+    description = "The selenium package is used to automate web browser interaction from Python";
+    homepage = http://www.seleniumhq.org;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ jraygauthier ];
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/sybil/default.nix b/pkgs/development/python-modules/sybil/default.nix
new file mode 100644
index 000000000000..b1fe22df4767
--- /dev/null
+++ b/pkgs/development/python-modules/sybil/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, buildPythonApplication, fetchPypi
+, pytest, nose }:
+
+buildPythonApplication rec {
+  pname   = "sybil";
+  version = "1.0.5";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0x8qd5p5qliv8wmdglda2iy3f70i4jg8zqyk8yhklm5hrxm8jdl6";
+  };
+
+  checkInputs = [ pytest nose ];
+
+  checkPhase = ''
+    py.test tests
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Automated testing for the examples in your documentation.";
+    homepage    = https://github.com/cjw296/sybil/;
+    license     = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/testfixtures/default.nix b/pkgs/development/python-modules/testfixtures/default.nix
new file mode 100644
index 000000000000..23b5a5aa9e26
--- /dev/null
+++ b/pkgs/development/python-modules/testfixtures/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, mock, manuel, pytest, sybil, zope_component, django }:
+
+buildPythonPackage rec {
+  pname = "testfixtures";
+  version = "5.3.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1xfar653qmikwb94xj3f0xfp8dh2llxjsxipx1272d8qwl0aknnx";
+  };
+
+  checkInputs = [ mock manuel pytest sybil zope_component ];
+
+  checkPhase = ''
+    # django is too much hasle to setup at the moment
+    pytest --ignore=testfixtures/tests/test_django testfixtures/tests
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/Simplistix/testfixtures";
+  };
+}
diff --git a/pkgs/development/python-modules/trezor/default.nix b/pkgs/development/python-modules/trezor/default.nix
index c473403f53d5..cb4b63ade81d 100644
--- a/pkgs/development/python-modules/trezor/default.nix
+++ b/pkgs/development/python-modules/trezor/default.nix
@@ -12,9 +12,9 @@ buildPythonPackage rec {
     sha256 = "6bdb69fc125ba705854e21163be6c7da3aa17c2a3a84f40b6d8a3f6e4a8cb314";
   };
 
-  propagatedBuildInputs = [ protobuf hidapi requests ];
+  propagatedBuildInputs = [ protobuf hidapi requests mnemonic ];
 
-  buildInputs = [ ecdsa mnemonic ];
+  buildInputs = [ ecdsa ];
 
   # There are no actual tests: "ImportError: No module named tests"
   doCheck = false;
diff --git a/pkgs/development/python-modules/update_checker/default.nix b/pkgs/development/python-modules/update_checker/default.nix
new file mode 100644
index 000000000000..ad401d80190d
--- /dev/null
+++ b/pkgs/development/python-modules/update_checker/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildPythonPackage, fetchPypi, requests}:
+
+buildPythonPackage rec {
+  pname = "update_checker";
+  version = "0.16";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1f38l40d32dm0avcidf3dmikma8z0la84yngj88v4xygzi399qvh";
+  };
+
+  propagatedBuildInputs = [ requests ];
+
+  # requires network
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "A python module that will check for package updates";
+    homepage = https://github.com/bboe/update_checker;
+    license = licenses.bsd2;
+  };
+}
diff --git a/pkgs/development/python-modules/urwid/default.nix b/pkgs/development/python-modules/urwid/default.nix
index 000cf5ea5ef2..d77a212003b1 100644
--- a/pkgs/development/python-modules/urwid/default.nix
+++ b/pkgs/development/python-modules/urwid/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, fetchPypi, fetchurl }:
+{ stdenv, buildPythonPackage, fetchPypi, fetchpatch }:
 
 buildPythonPackage (rec {
   pname = "urwid";
@@ -11,10 +11,16 @@ buildPythonPackage (rec {
   };
 
   patches = [
-    (fetchurl {
-      url = https://github.com/urwid/urwid/commit/4b0ed8b6030450e6d99909a7c683e9642e546387.patch;
-      sha256 = "0ygghd6wzjqij5szg61l1dsk8b0yv8bwyj3bgxxj1lj4m17zsy5q";
-    })
+   # fix tests
+   (fetchpatch {
+     url = "https://github.com/urwid/urwid/commit/4b0ed8b6030450e6d99909a7c683e9642e546387.patch";
+     sha256 = "0azpn0ylbg8mfpr0y27n4lnq0ph75a4d4m9wdv3napnhf1vh9ahx";
+   })
+   # fix tests
+   (fetchpatch {
+     url = "https://github.com/floppym/urwid/commit/f68f2cf089cfd5ec45863baf59a91d5aeb0cf5c3.patch";
+     sha256 = "1b3vz7mrwz2bqvdwvbyv2j835f9lzapgw0j2km4sam76bxmgfpgq";
+   })
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/tools/continuous-integration/jenkins/default.nix b/pkgs/development/tools/continuous-integration/jenkins/default.nix
index e6f01ba5c93d..ea5a5e370178 100644
--- a/pkgs/development/tools/continuous-integration/jenkins/default.nix
+++ b/pkgs/development/tools/continuous-integration/jenkins/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "jenkins-${version}";
-  version = "2.87";
+  version = "2.88";
 
   src = fetchurl {
     url = "http://mirrors.jenkins-ci.org/war/${version}/jenkins.war";
-    sha256 = "1nzs9nn1nr2jav59v1xj39rzmrh1zmwaqnpaiqsll8kixkr9rb8f";
+    sha256 = "062hnbyj73311sxhkwla6sl33zb43v8p7hjssgbh0bfvgmnlayim";
   };
 
   buildCommand = ''
@@ -19,6 +19,6 @@ stdenv.mkDerivation rec {
     homepage = http://jenkins-ci.org;
     license = licenses.mit;
     platforms = platforms.all;
-    maintainers = with maintainers; [ coconnor fpletz ];
+    maintainers = with maintainers; [ coconnor fpletz earldouglas ];
   };
 }
diff --git a/pkgs/development/tools/database/sqlitebrowser/default.nix b/pkgs/development/tools/database/sqlitebrowser/default.nix
index adeb377dccd0..74adac9f8a32 100644
--- a/pkgs/development/tools/database/sqlitebrowser/default.nix
+++ b/pkgs/development/tools/database/sqlitebrowser/default.nix
@@ -1,32 +1,39 @@
-{ mkDerivation, lib, fetchFromGitHub, qtbase, qttools, sqlite, cmake }:
+{ mkDerivation, lib, fetchFromGitHub, cmake, antlr
+, qtbase, qttools, qscintilla, sqlite }:
 
 mkDerivation rec {
-  version = "3.10.0";
+  version = "3.10.1";
   name = "sqlitebrowser-${version}";
 
   src = fetchFromGitHub {
     repo   = "sqlitebrowser";
     owner  = "sqlitebrowser";
     rev    = "v${version}";
-    sha256 = "1fwr7p4b6glc3s0a06i7cg8l9p1mrcm4vyhyf2wi89cyg22rrf5c";
+    sha256 = "1brzam8yv6sbdmbqsp7vglhd6wlx49g2ap8llr271zrkld4k3kar";
   };
 
-  buildInputs = [ qtbase qttools sqlite ];
-  nativeBuildInputs = [ cmake ];
+  buildInputs = [ qtbase qscintilla sqlite ];
 
-  cmakeFlags = [ "-DUSE_QT5=TRUE" ];
+  nativeBuildInputs = [ cmake antlr qttools ];
 
-  # A regression was introduced in CMakeLists.txt on v3.9.x
-  # See https://github.com/sqlitebrowser/sqlitebrowser/issues/832 and issues/755
+  enableParallelBuilding = true;
+
+  # We have to patch out Test and PrintSupport to make this work with Qt 5.9
+  # It can go when the application supports 5.9
   postPatch = ''
-    substituteInPlace CMakeLists.txt --replace 'project("DB Browser for SQLite")' 'project(sqlitebrowser)'
+    substituteInPlace CMakeLists.txt \
+      --replace Test         "" \
+      --replace PrintSupport ""
+
+    substituteInPlace libs/qcustomplot-source/CMakeLists.txt \
+      --replace PrintSupport ""
   '';
 
   meta = with lib; {
     description = "DB Browser for SQLite";
     homepage = http://sqlitebrowser.org/;
     license = licenses.gpl3;
-    maintainers = [ maintainers.matthiasbeyer ];
+    maintainers = with maintainers; [ matthiasbeyer ];
     platforms = platforms.linux; # can only test on linux
   };
 }
diff --git a/pkgs/development/tools/geckodriver/default.nix b/pkgs/development/tools/geckodriver/default.nix
new file mode 100644
index 000000000000..8f6e0dde5899
--- /dev/null
+++ b/pkgs/development/tools/geckodriver/default.nix
@@ -0,0 +1,25 @@
+{ lib
+, fetchurl
+, rustPlatform
+}:
+
+with rustPlatform; 
+
+buildRustPackage rec {
+  version = "0.19.1";
+  name = "geckodriver-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/mozilla/geckodriver/archive/v${version}.tar.gz";
+    sha256 = "04zpv4aiwbig466yj24hhazl5hrapkyvwlhvg0za5599ykzdv47m";
+  };
+
+  cargoSha256 = "1cny8caqcd9p98hra1k7y4d3lb8sxsyaplr0svbwam0d2qc1c257";
+
+  meta = with lib; {
+    description = "Proxy for using W3C WebDriver-compatible clients to interact with Gecko-based browsers";
+    homepage = https://github.com/mozilla/geckodriver;
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ jraygauthier ];
+  };
+}
diff --git a/pkgs/development/tools/git-series/default.nix b/pkgs/development/tools/git-series/default.nix
index 44120ad023ae..7d94863ea1cb 100644
--- a/pkgs/development/tools/git-series/default.nix
+++ b/pkgs/development/tools/git-series/default.nix
@@ -17,7 +17,7 @@ buildRustPackage rec {
 
   cargoDepsHook = ''
     (
-      cd ${name}-src
+      cd */
       # see https://github.com/git-series/git-series/pull/56
       patch -p1 < ${fetchpatch {
         url = "https://github.com/Mic92/git-series/commit/3aa30a47d74ebf90b444dccdf8c153f07f119483.patch";
diff --git a/pkgs/development/tools/misc/d-feet/default.nix b/pkgs/development/tools/misc/d-feet/default.nix
index bd08c6c4c05e..14a52f4e08a6 100644
--- a/pkgs/development/tools/misc/d-feet/default.nix
+++ b/pkgs/development/tools/misc/d-feet/default.nix
@@ -2,7 +2,7 @@
 , pythonPackages, makeWrapper, gnome3, libwnck3 }:
 
 let
-  version = "${major}.11";
+  version = "${major}.12";
   major = "0.3";
 in pythonPackages.buildPythonApplication rec {
   name = "d-feet-${version}";
@@ -10,7 +10,7 @@ in pythonPackages.buildPythonApplication rec {
 
   src = fetchurl {
     url = "mirror://gnome/sources/d-feet/${major}/d-feet-${version}.tar.xz";
-    sha256 = "a3dc940c66f84b996c328531e3034d475ec690d7ff639445ff7ca746aa8cb9c2";
+    sha256 = "054hl56rii9ff7rzl42h7993ywjbxmhlcd7bk8fi1c2bx98c6s68";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/tools/parsing/flex/default.nix b/pkgs/development/tools/parsing/flex/default.nix
index 92fba47b756f..4ea11a622ea1 100644
--- a/pkgs/development/tools/parsing/flex/default.nix
+++ b/pkgs/development/tools/parsing/flex/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl, bison, m4 }:
+{ stdenv, fetchurl, bison, m4
+, fetchpatch, autoreconfHook, help2man
+}:
 
 stdenv.mkDerivation rec {
   name = "flex-${version}";
@@ -9,6 +11,16 @@ stdenv.mkDerivation rec {
     sha256 = "15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8";
   };
 
+  # Also upstream, will be part of 2.6.5
+  # https://github.com/westes/flex/commit/24fd0551333e
+  patches = [(fetchpatch {
+    name = "glibc-2.26.patch";
+    url = "https://raw.githubusercontent.com/lede-project/source/0fb14a2b1ab2f82c"
+        + "/tools/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch";
+    sha256 = "1aarhcmz7mfrgh15pkj6f7ikxa2m0mllw1i1vscsf1kw5d05lw6f";
+  })];
+  nativeBuildInputs = [ autoreconfHook help2man ];
+
   buildInputs = [ bison ];
 
   propagatedBuildInputs = [ m4 ];
diff --git a/pkgs/development/tools/rtags/default.nix b/pkgs/development/tools/rtags/default.nix
index 32be2a503bfc..8fe47bd0cb54 100644
--- a/pkgs/development/tools/rtags/default.nix
+++ b/pkgs/development/tools/rtags/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   name = "rtags-${version}";
-  version = "2.12";
+  version = "2.15";
 
   nativeBuildInputs = [ cmake pkgconfig ];
   buildInputs = [ llvmPackages.llvm openssl emacs ]
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
     rev = "refs/tags/v${version}";
     fetchSubmodules = true;
     url = "https://github.com/andersbakken/rtags.git";
-    sha256 = "0bgjcvyvkpqcgw4571iz39sqydmcaz6ymx7kxcmq6j7rffs6qs7l";
+    sha256 = "12nnyav2q1ddkz9wm0aclhn7r74xj4ibrb0x05k7mcf694bg79c0";
     # unicode file names lead to different checksums on HFS+ vs. other
     # filesystems because of unicode normalisation
     postFetch = ''