summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-11-19 04:34:56 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-11-19 04:35:51 +0100
commitb69f568f4c3ebaf48a7f66b0f051d28157a61afb (patch)
tree802888f3277bcd91a4ecb26d164318360116a91e /pkgs/development
parent775a729da7a36f817303d925aa250544c3eca77b (diff)
parent380bb207b66d559f66b34909a75bd1b588a52d9f (diff)
downloadnixpkgs-b69f568f4c3ebaf48a7f66b0f051d28157a61afb.tar
nixpkgs-b69f568f4c3ebaf48a7f66b0f051d28157a61afb.tar.gz
nixpkgs-b69f568f4c3ebaf48a7f66b0f051d28157a61afb.tar.bz2
nixpkgs-b69f568f4c3ebaf48a7f66b0f051d28157a61afb.tar.lz
nixpkgs-b69f568f4c3ebaf48a7f66b0f051d28157a61afb.tar.xz
nixpkgs-b69f568f4c3ebaf48a7f66b0f051d28157a61afb.tar.zst
nixpkgs-b69f568f4c3ebaf48a7f66b0f051d28157a61afb.zip
Merge branch 'staging'
Hydra rebuild looks fine; only a few Darwin jobs is queued:
http://hydra.nixos.org/eval/1304891?compare=1304807
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/db/clang-4.8.patch138
-rw-r--r--pkgs/development/libraries/db/clang-5.3.patch4
-rw-r--r--pkgs/development/libraries/db/clang-6.0.patch136
-rw-r--r--pkgs/development/libraries/db/cygwin-4.4.patch21
-rw-r--r--pkgs/development/libraries/db/cygwin-4.5.patch22
-rw-r--r--pkgs/development/libraries/db/db-4.8.nix7
-rw-r--r--pkgs/development/libraries/db/db-5.3.nix5
-rw-r--r--pkgs/development/libraries/db/db-6.0.nix2
-rw-r--r--pkgs/development/libraries/db/generic.nix10
-rw-r--r--pkgs/development/libraries/db/register-race-fix.patch47
-rw-r--r--pkgs/development/libraries/jemalloc/default.nix9
-rw-r--r--pkgs/development/libraries/libdrm/default.nix9
-rw-r--r--pkgs/development/libraries/libinput/default.nix4
-rw-r--r--pkgs/development/libraries/libpng/default.nix6
-rw-r--r--pkgs/development/libraries/libxml2/default.nix16
-rw-r--r--pkgs/development/libraries/libxslt/default.nix22
-rw-r--r--pkgs/development/libraries/mesa/default.nix14
-rw-r--r--pkgs/development/libraries/mesa/dlopen-absolute-paths.diff22
-rw-r--r--pkgs/development/libraries/zeitgeist/default.nix4
-rw-r--r--pkgs/development/python-modules/bootstrapped-pip/default.nix10
-rw-r--r--pkgs/development/python-modules/poezio/make_default_config_writable.patch25
-rw-r--r--pkgs/development/python-modules/setuptools/default.nix9
22 files changed, 366 insertions, 176 deletions
diff --git a/pkgs/development/libraries/db/clang-4.8.patch b/pkgs/development/libraries/db/clang-4.8.patch
index c53160a8297..bbb77891497 100644
--- a/pkgs/development/libraries/db/clang-4.8.patch
+++ b/pkgs/development/libraries/db/clang-4.8.patch
@@ -1,13 +1,22 @@
 diff --git a/dbinc/atomic.h b/dbinc/atomic.h
-index 0034dcc..fa7ba93 100644
+index 0034dcc..160c8ea 100644
 --- a/dbinc/atomic.h
 +++ b/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)	\
 -	__atomic_compare_exchange((p), (o), (n))
-+	__db_atomic_compare_exchange((p), (o), (n))
++	__atomic_compare_exchange_int((p), (o), (n))
  static inline int __atomic_inc(db_atomic_t *p)
  {
  	int	temp;
@@ -16,7 +25,130 @@ index 0034dcc..fa7ba93 100644
   * which configure could be changed to use.
   */
 -static inline int __atomic_compare_exchange(
-+static inline int __db_atomic_compare_exchange(
++static inline int __atomic_compare_exchange_int(
  	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/dbinc/db.in b/dbinc/db.in
+index 9fc6712..7428e0a 100644
+--- a/dbinc/db.in
++++ b/dbinc/db.in
+@@ -2413,7 +2413,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/mp/mp_fget.c b/mp/mp_fget.c
+index 5fdee5a..0b75f57 100644
+--- a/mp/mp_fget.c
++++ b/mp/mp_fget.c
+@@ -617,7 +617,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,
+@@ -911,7 +911,7 @@ alloc:		/* Allocate a new buffer header and data space. */
+ 			MVCC_MPROTECT(bhp->buf, mfp->stat.st_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/mp/mp_mvcc.c b/mp/mp_mvcc.c
+index 34467d2..f05aa0c 100644
+--- a/mp/mp_mvcc.c
++++ b/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/mp/mp_region.c b/mp/mp_region.c
+index e6cece9..ddbe906 100644
+--- a/mp/mp_region.c
++++ b/mp/mp_region.c
+@@ -224,7 +224,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);
+ 		}
+ 
+ 		/*
+@@ -269,7 +269,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
+ 		hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID :
+ 		    mtx_base + i;
+ 		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/mutex/mut_method.c b/mutex/mut_method.c
+index 2588763..5c6d516 100644
+--- a/mutex/mut_method.c
++++ b/mutex/mut_method.c
+@@ -426,7 +426,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/mutex/mut_tas.c b/mutex/mut_tas.c
+index f3922e0..e40fcdf 100644
+--- a/mutex/mut_tas.c
++++ b/mutex/mut_tas.c
+@@ -46,7 +46,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)) {
+@@ -486,7 +486,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/clang-5.3.patch b/pkgs/development/libraries/db/clang-5.3.patch
index 0a0993da13e..1cfb13ca8e6 100644
--- a/pkgs/development/libraries/db/clang-5.3.patch
+++ b/pkgs/development/libraries/db/clang-5.3.patch
@@ -16,7 +16,7 @@ index 6a858f7..9f338dc 100644
  #define	atomic_dec(env, p)	__atomic_dec(p)
  #define	atomic_compare_exchange(env, p, o, n)	\
 -	__atomic_compare_exchange((p), (o), (n))
-+	__atomic_compare_exchange_db((p), (o), (n))
++	__atomic_compare_exchange_int((p), (o), (n))
  static inline int __atomic_inc(db_atomic_t *p)
  {
  	int	temp;
@@ -25,7 +25,7 @@ index 6a858f7..9f338dc 100644
   * which configure could be changed to use.
   */
 -static inline int __atomic_compare_exchange(
-+static inline int __atomic_compare_exchange_db(
++static inline int __atomic_compare_exchange_int(
  	db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
  {
  	atomic_value_t was;
diff --git a/pkgs/development/libraries/db/clang-6.0.patch b/pkgs/development/libraries/db/clang-6.0.patch
new file mode 100644
index 00000000000..5c1e8f506c4
--- /dev/null
+++ b/pkgs/development/libraries/db/clang-6.0.patch
@@ -0,0 +1,136 @@
+diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h
+index e4420aa..4799b5f 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
+ 
+@@ -225,7 +225,7 @@ static inline int __atomic_compare_exchange_int(
+ #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_int(env, p)
+ #define	atomic_dec(env, p)	__atomic_dec_int(env, p)
+diff --git a/src/dbinc/db.in b/src/dbinc/db.in
+index 3c2ad9b..3e46f02 100644
+--- a/src/dbinc/db.in
++++ b/src/dbinc/db.in
+@@ -2999,7 +2999,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 59fe9fe..fa4ced7 100644
+--- a/src/mp/mp_fget.c
++++ b/src/mp/mp_fget.c
+@@ -654,7 +654,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",
+@@ -969,7 +969,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 83c4d72..0a47202 100644
+--- a/src/mp/mp_mvcc.c
++++ b/src/mp/mp_mvcc.c
+@@ -281,7 +281,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,
+@@ -440,7 +440,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 4d95e4f..e97459c 100644
+--- a/src/mp/mp_region.c
++++ b/src/mp/mp_region.c
+@@ -278,7 +278,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);
+ 		}
+ 
+ 		mtx_base = mtx_prev = MUTEX_INVALID;
+@@ -332,7 +332,7 @@ no_prealloc:
+ 		    DB_MUTEX_SHARED, &hp->mtx_hash)) != 0)
+ 			return (ret);
+ 		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 72b34de..a9f9868 100644
+--- a/src/mutex/mut_method.c
++++ b/src/mutex/mut_method.c
+@@ -501,7 +501,7 @@ __atomic_compare_exchange_int(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 7899c4b..d9420fa 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)) {
+@@ -643,7 +643,7 @@ was_not_locked:
+ 			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/cygwin-4.4.patch b/pkgs/development/libraries/db/cygwin-4.4.patch
deleted file mode 100644
index 3f9d658b5da..00000000000
--- a/pkgs/development/libraries/db/cygwin-4.4.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -rc db-4.4.20.NC-old/os/os_flock.c db-4.4.20.NC/os/os_flock.c
-*** db-4.4.20.NC-old/os/os_flock.c	Mon Jun 20 16:59:01 2005
---- db-4.4.20.NC/os/os_flock.c	Wed Jun  7 17:01:49 2006
-***************
-*** 36,41 ****
---- 36,50 ----
-  
-  	DB_ASSERT(F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1);
-  
-+ #ifdef __CYGWIN__
-+ 	/*
-+ 	 * Windows file locking interferes with read/write operations, so we
-+ 	 * map the ranges to an area past the end of the file.
-+ 	 */
-+ 	DB_ASSERT(offset < (off_t) 1 << 62);
-+ 	offset += (off_t) 1 << 62;
-+ #endif
-+ 
-  #ifdef HAVE_FCNTL
-  	fl.l_start = offset;
-  	fl.l_len = 1;
diff --git a/pkgs/development/libraries/db/cygwin-4.5.patch b/pkgs/development/libraries/db/cygwin-4.5.patch
deleted file mode 100644
index 3f0ee78a708..00000000000
--- a/pkgs/development/libraries/db/cygwin-4.5.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -rc db-4.5.20-orig/os/os_flock.c db-4.5.20/os/os_flock.c
-*** db-4.5.20-orig/os/os_flock.c	2006-10-13 12:36:12.000000000 +0200
---- db-4.5.20/os/os_flock.c	2006-10-13 12:40:11.000000000 +0200
-***************
-*** 30,35 ****
---- 30,44 ----
-  
-  	DB_ASSERT(dbenv, F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1);
-  
-+ #ifdef __CYGWIN__
-+ 	/*
-+ 	 * Windows file locking interferes with read/write operations, so we
-+ 	 * map the ranges to an area past the end of the file.
-+ 	 */
-+ 	DB_ASSERT(dbenv, offset < (off_t) 1 << 62);
-+ 	offset += (off_t) 1 << 62;
-+ #endif
-+ 
-  	fl.l_start = offset;
-  	fl.l_len = 1;
-  	fl.l_type = acquire ? F_WRLCK : F_UNLCK;
-Only in db-4.5.20/os: os_flock.c~
diff --git a/pkgs/development/libraries/db/db-4.8.nix b/pkgs/development/libraries/db/db-4.8.nix
index 40869a865ae..bce91e5a940 100644
--- a/pkgs/development/libraries/db/db-4.8.nix
+++ b/pkgs/development/libraries/db/db-4.8.nix
@@ -2,8 +2,9 @@
 
 import ./generic.nix (args // rec {
   version = "4.8.30";
-  extraPatches = [ ./clang-4.8.patch ];
   sha256 = "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0";
-  branch = "4.8";
-  drvArgs = { hardeningDisable = [ "format" ]; };
+  extraPatches = [ ./clang-4.8.patch ];
+
+  drvArgs.hardeningDisable = [ "format" ];
+  drvArgs.doCheck = false;
 })
diff --git a/pkgs/development/libraries/db/db-5.3.nix b/pkgs/development/libraries/db/db-5.3.nix
index 91adfa24b58..d1d3c953fc9 100644
--- a/pkgs/development/libraries/db/db-5.3.nix
+++ b/pkgs/development/libraries/db/db-5.3.nix
@@ -3,9 +3,6 @@
 import ./generic.nix (args // rec {
   version = "5.3.28";
   sha256 = "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0";
-  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
+  license = stdenv.lib.licenses.agpl3;
   extraPatches = [ ./clang-5.3.patch ];
 })
diff --git a/pkgs/development/libraries/db/db-6.0.nix b/pkgs/development/libraries/db/db-6.0.nix
index 716cad9ab07..b7c5667b883 100644
--- a/pkgs/development/libraries/db/db-6.0.nix
+++ b/pkgs/development/libraries/db/db-6.0.nix
@@ -4,5 +4,5 @@ import ./generic.nix (args // rec {
   version = "6.0.20";
   sha256 = "00r2aaglq625y8r9xd5vw2y070plp88f1mb2gbq3kqsl7128lsl0";
   license = stdenv.lib.licenses.agpl3;
-  branch = "6.0";
+  extraPatches = [ ./clang-6.0.patch ];
 })
diff --git a/pkgs/development/libraries/db/generic.nix b/pkgs/development/libraries/db/generic.nix
index fdc828effdf..a6f9c676bba 100644
--- a/pkgs/development/libraries/db/generic.nix
+++ b/pkgs/development/libraries/db/generic.nix
@@ -4,9 +4,8 @@
 
 # Options from inherited versions
 , version, sha256
-, extraPatches ? [ ]
+, patchSrc ? "src", extraPatches ? [ ]
 , license ? stdenv.lib.licenses.sleepycat
-, branch ? null
 , drvArgs ? {}
 }:
 
@@ -36,11 +35,16 @@ stdenv.mkDerivation (rec {
     rm -rf $out/docs
   '';
 
+  doCheck = true;
+
+  checkPhase = ''
+    make examples_c examples_cxx
+  '';
+
   meta = with stdenv.lib; {
     homepage = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/index.html";
     description = "Berkeley DB";
     license = license;
     platforms = platforms.unix;
-    branch = branch;
   };
 } // drvArgs)
diff --git a/pkgs/development/libraries/db/register-race-fix.patch b/pkgs/development/libraries/db/register-race-fix.patch
deleted file mode 100644
index bb05c966e5b..00000000000
--- a/pkgs/development/libraries/db/register-race-fix.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -rc db-4.5.20-orig/env/env_register.c db-4.5.20/env/env_register.c
-*** db-4.5.20-orig/env/env_register.c	2006-09-09 16:29:04.000000000 +0200
---- db-4.5.20/env/env_register.c	2007-05-16 21:13:27.000000000 +0200
-***************
-*** 255,260 ****
---- 255,262 ----
-  			buf[nr - 1] = '\0';
-  		}
-  
-+                 //sleep(3);
-+ 
-  		pos = (off_t)lcnt * PID_LEN;
-  		if (REGISTRY_LOCK(dbenv, pos, 1) == 0) {
-  			if ((ret = REGISTRY_UNLOCK(dbenv, pos)) != 0)
-***************
-*** 361,366 ****
---- 363,392 ----
-  	if (recovery_failed)
-  		goto err;
-  
-+         //sleep(5);
-+ 
-+         /*
-+          * Acquire an exclusive lock to prevent a race like this:
-+          *
-+          * 1) Process X is about to exit and process Y is just
-+          *    starting.
-+          * 2) Process Y reads X's slot.
-+          * 3) Process X clears its slot.
-+          * 4) Process Y sees that X's slot isn't cleared yet (since it
-+          *    just read the old value).
-+          * 5) Process X closes the registry, releases the lock on its
-+          *    slot.
-+          * 6) Process Y tries to acquire X's slot and succeeds, so it
-+          *    concludes that X died and recovery is needed.
-+          *
-+          * A more efficient solution to this problem would be to let
-+          * __envreg_add acquire the lock on a slot first, and *then*
-+          * read the slot (instead of the other way around).  Then we
-+          * wouldn't need the exclusive lock here.
-+          */
-+ 	if ((ret = REGISTRY_EXCL_LOCK(dbenv, 0)) != 0)
-+ 		goto err;
-+ 
-  	/*
-  	 * Why isn't an exclusive lock necessary to discard a DB_ENV handle?
-  	 *
diff --git a/pkgs/development/libraries/jemalloc/default.nix b/pkgs/development/libraries/jemalloc/default.nix
index a332487d4ed..84638bc01ea 100644
--- a/pkgs/development/libraries/jemalloc/default.nix
+++ b/pkgs/development/libraries/jemalloc/default.nix
@@ -1,11 +1,12 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "jemalloc-4.1.1";
+  name = "jemalloc-${version}";
+  version = "4.3.1";
 
   src = fetchurl {
-    url = "http://www.canonware.com/download/jemalloc/${name}.tar.bz2";
-    sha256 = "1bmdr51wxiir595k2r6z9a7rcgm42kkgnr586xir7vdcndr3pwf8";
+    url = "https://github.com/jemalloc/jemalloc/releases/download/${version}/${name}.tar.bz2";
+    sha256 = "12r71i8nm3vwz21fc16rwbb0pwcg5s05n1qg3rwl2s85v0x1ifzp";
   };
 
   # By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which
@@ -14,7 +15,7 @@ stdenv.mkDerivation rec {
   configureFlags = stdenv.lib.optional stdenv.isDarwin "--with-jemalloc-prefix=";
 
   meta = with stdenv.lib; {
-    homepage = http://www.canonware.com/jemalloc/index.html;
+    homepage = http://jemalloc.net;
     description = "General purpose malloc(3) implementation";
     longDescription = ''
       malloc(3)-compatible memory allocator that emphasizes fragmentation
diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix
index f2174470bec..a0923a15d4a 100644
--- a/pkgs/development/libraries/libdrm/default.nix
+++ b/pkgs/development/libraries/libdrm/default.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev, valgrind }:
+{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, valgrind }:
 
 stdenv.mkDerivation rec {
-  name = "libdrm-2.4.71";
+  name = "libdrm-2.4.73";
 
   src = fetchurl {
     url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
-    sha256 = "c66287ddeee5f46ea8f8880b94b80acb3bbc33ba6321d17767eef145046df9b8";
+    sha256 = "0kayvwqqrjm45y6dk9q2b4gmjdasci0y28jzv4bq05py8a9d7gwn";
   };
 
   outputs = [ "out" "dev" ];
@@ -13,7 +13,6 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ libpthreadstubs libpciaccess ];
     # libdrm as of 2.4.70 does not actually do anything with udev.
-    #++ stdenv.lib.optional stdenv.isLinux udev;
 
   patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch;
 
@@ -21,7 +20,6 @@ stdenv.mkDerivation rec {
     "echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";
 
   configureFlags = [ "--enable-freedreno" "--disable-valgrind" ]
-    ++ stdenv.lib.optional stdenv.isLinux "--enable-udev"
     ++ stdenv.lib.optional stdenv.isDarwin "-C";
 
   crossAttrs.configureFlags = configureFlags ++ [ "--disable-intel" ];
@@ -30,7 +28,6 @@ stdenv.mkDerivation rec {
     homepage = http://dri.freedesktop.org/libdrm/;
     description = "Library for accessing the kernel's Direct Rendering Manager";
     license = "bsd";
-    maintainers = [ stdenv.lib.maintainers.urkud ];
     platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix
index a3b01162914..f0257ed8a44 100644
--- a/pkgs/development/libraries/libinput/default.nix
+++ b/pkgs/development/libraries/libinput/default.nix
@@ -17,11 +17,11 @@ in
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "libinput-${version}";
-  version = "1.5.0";
+  version = "1.5.1";
 
   src = fetchurl {
     url = "http://www.freedesktop.org/software/libinput/${name}.tar.xz";
-    sha256 = "0708259k2qpdyi8z8n74d2pprjdvivmqkskjkq7s7ypchn9mb5js";
+    sha256 = "d4f63933b0967bd691735af5e3919e2d29c2121d4e05867cc4e10ff3ae8e2dd8";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix
index ea6e1e50035..a20bc7e5f3c 100644
--- a/pkgs/development/libraries/libpng/default.nix
+++ b/pkgs/development/libraries/libpng/default.nix
@@ -3,11 +3,11 @@
 assert zlib != null;
 
 let
-  version = "1.6.23";
-  sha256 = "1wb2j8sba6g2h4vmv4pwsp93q74qw4gyqqs4b7vfjmpcv9xix4kd";
+  version = "1.6.26";
+  sha256 = "1ybkgcqqsd4iiiyv60pxjfi1csszb50bd2cxxsy3sv4q4sil6rr6";
   patch_src = fetchurl {
     url = "mirror://sourceforge/libpng-apng/libpng-${version}-apng.patch.gz";
-    sha256 = "1lvsn1kmarzpn269zgykjfmxq16zrdhpd1a75nzgclx97436x408";
+    sha256 = "0b6p2k4afvhk1svargpllcvhxb4g3p857wkqk85cks0yv42ckph1";
   };
   whenPatched = stdenv.lib.optionalString apngSupport;
 
diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix
index 4831f150f45..80354b10f3b 100644
--- a/pkgs/development/libraries/libxml2/default.nix
+++ b/pkgs/development/libraries/libxml2/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchurl, zlib, xz, python2, findXMLCatalogs, libiconv, fetchpatch
-, supportPython ? (! stdenv ? cross) }:
+, pythonSupport ? (! stdenv ? cross) }:
 
 let
   python = python2;
@@ -28,10 +28,10 @@ in stdenv.mkDerivation rec {
   };
 
   outputs = [ "bin" "dev" "out" "doc" ]
-    ++ lib.optional supportPython "py";
-  propagatedBuildOutputs = "out bin" + lib.optionalString supportPython " py";
+    ++ lib.optional pythonSupport "py";
+  propagatedBuildOutputs = "out bin" + lib.optionalString pythonSupport " py";
 
-  buildInputs = lib.optional supportPython python
+  buildInputs = lib.optional pythonSupport python
     # Libxml2 has an optional dependency on liblzma.  However, on impure
     # platforms, it may end up using that from /usr/lib, and thus lack a
     # RUNPATH for that, leading to undefined references for its users.
@@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ zlib findXMLCatalogs ];
 
-  configureFlags = lib.optional supportPython "--with-python=${python}"
+  configureFlags = lib.optional pythonSupport "--with-python=${python}"
     ++ [ "--exec_prefix=$dev" ];
 
   enableParallelBuilding = true;
@@ -55,9 +55,9 @@ in stdenv.mkDerivation rec {
     propagatedBuildInputs =  [ findXMLCatalogs libiconv ];
   };
 
-  preInstall = lib.optionalString supportPython
+  preInstall = lib.optionalString pythonSupport
     ''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"'';
-  installFlags = lib.optionalString supportPython
+  installFlags = lib.optionalString pythonSupport
     ''pythondir="$(py)/lib/${python.libPrefix}/site-packages"'';
 
   postFixup = ''
@@ -66,7 +66,7 @@ in stdenv.mkDerivation rec {
     moveToOutput share/man/man1 "$bin"
   '';
 
-  passthru = { inherit version; pythonSupport = supportPython; };
+  passthru = { inherit version; pythonSupport = pythonSupport; };
 
   meta = {
     homepage = http://xmlsoft.org/;
diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix
index 2afbfc2fe99..df054319479 100644
--- a/pkgs/development/libraries/libxslt/default.nix
+++ b/pkgs/development/libraries/libxslt/default.nix
@@ -1,4 +1,9 @@
-{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs }:
+{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs
+, pythonSupport ? true, python2
+}:
+
+assert pythonSupport -> python2 != null;
+assert pythonSupport -> libxml2.pythonSupport;
 
 stdenv.mkDerivation rec {
   name = "libxslt-1.1.29";
@@ -10,26 +15,33 @@ stdenv.mkDerivation rec {
 
   patches = stdenv.lib.optional stdenv.isSunOS ./patch-ah.patch;
 
-  outputs = [ "bin" "dev" "out" "doc" ];
+  outputs = [ "bin" "dev" "out" "doc" ] ++ stdenv.lib.optional pythonSupport "py";
 
-  buildInputs = [ libxml2 ];
+  buildInputs = [ libxml2.dev ] ++ stdenv.lib.optionals pythonSupport [ libxml2.py python2 ];
 
   propagatedBuildInputs = [ findXMLCatalogs ];
 
   configureFlags = [
-    "--without-python"
     "--without-crypto"
     "--without-debug"
     "--without-mem-debug"
     "--without-debugger"
-  ];
+  ] ++ stdenv.lib.optional pythonSupport "--with-python=${python2}";
 
   postFixup = ''
     moveToOutput bin/xslt-config "$dev"
     moveToOutput lib/xsltConf.sh "$dev"
     moveToOutput share/man/man1 "$bin"
+  '' + stdenv.lib.optionalString pythonSupport ''
+    mkdir -p $py/nix-support
+    echo ${libxml2.py} >> $py/nix-support/propagated-native-build-inputs
+    moveToOutput lib/python2.7 "$py"
   '';
 
+  passthru = {
+    inherit pythonSupport;
+  };
+
   meta = with stdenv.lib; {
     homepage = http://xmlsoft.org/XSLT/;
     description = "A C library and tools to do XSL transformations";
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index 5ff884fd3c1..e923f87722a 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, fetchpatch
 , pkgconfig, intltool, autoreconfHook, substituteAll
-, file, expat, libdrm, xorg, wayland, systemd, openssl
+, file, expat, libdrm, xorg, wayland, openssl
 , llvmPackages, libffi, libomxil-bellagio, libva
 , libelf, libvdpau, python2
 , grsecEnabled ? false
@@ -26,7 +26,7 @@ if ! lists.elem stdenv.system platforms.mesaPlatforms then
 else
 
 let
-  version = "12.0.3";
+  version = "13.0.1";
   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 = "1dc86dd9b51272eee1fad3df65e18cda2e556ef1bc0b6e07cd750b9757f493b1";
+    sha256 = "0cd7axwihwsay0i9fvcw14cldbxyvf8b8rd5sh53plvppyr2z5ki";
   };
 
   prePatch = "patchShebangs .";
@@ -51,11 +51,7 @@ stdenv.mkDerivation {
   patches = [
     ./glx_ro_text_segm.patch # fix for grsecurity/PaX
     ./symlink-drivers.patch
-  ] ++ optional stdenv.isLinux
-      (substituteAll {
-        src = ./dlopen-absolute-paths.diff;
-        libudev = systemd.lib;
-      });
+  ];
 
   postPatch = ''
     substituteInPlace src/egl/main/egldriver.c \
@@ -116,7 +112,7 @@ stdenv.mkDerivation {
     libffi wayland libvdpau libelf libXvMC
     libomxil-bellagio libva libpthreadstubs openssl/*or another sha1 provider*/
     (python2.withPackages (ps: [ ps.Mako ]))
-  ] ++ optional stdenv.isLinux systemd;
+  ];
 
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/mesa/dlopen-absolute-paths.diff b/pkgs/development/libraries/mesa/dlopen-absolute-paths.diff
deleted file mode 100644
index 9a522657223..00000000000
--- a/pkgs/development/libraries/mesa/dlopen-absolute-paths.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/loader.c b/loader.c
-index 4fdf3c2..69ea22d 100644
---- a/src/loader/loader.c
-+++ b/src/loader/loader.c
-@@ -112,7 +112,7 @@ static void *udev_handle = NULL;
- static void *
- udev_dlopen_handle(void)
- {
--   char name[80];
-+   char name[256];
-    unsigned flags = RTLD_NOLOAD | RTLD_LOCAL | RTLD_LAZY;
-    int version;
- 
-@@ -126,7 +126,7 @@ udev_dlopen_handle(void)
-    /* First try opening an already linked libudev, then try loading one */
-    do {
-       for (version = 1; version >= 0; version--) {
--         snprintf(name, sizeof(name), "libudev.so.%d", version);
-+         snprintf(name, sizeof(name), "@libudev@/lib/libudev.so.%d", version);
-          udev_handle = dlopen(name, flags);
-          if (udev_handle)
-             return udev_handle;
diff --git a/pkgs/development/libraries/zeitgeist/default.nix b/pkgs/development/libraries/zeitgeist/default.nix
index 879e1ccaec3..bb6af73356d 100644
--- a/pkgs/development/libraries/zeitgeist/default.nix
+++ b/pkgs/development/libraries/zeitgeist/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, pkgconfig, glib, sqlite, gnome3, vala_0_23
 , intltool, libtool, python, dbus_libs, telepathy_glib
-, gtk3, json_glib, librdf_raptor2, pythonPackages, dbus_glib }:
+, gtk3, json_glib, librdf_raptor2, python2Packages, dbus_glib }:
 
 stdenv.mkDerivation rec {
   version = "0.9.15";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pkgconfig glib sqlite gnome3.gnome_common intltool
                   libtool python dbus_libs telepathy_glib vala_0_23 dbus_glib
-                  gtk3 json_glib librdf_raptor2 pythonPackages.rdflib ];
+                  gtk3 json_glib librdf_raptor2 python2Packages.rdflib ];
 
   prePatch = "patchShebangs .";
 
diff --git a/pkgs/development/python-modules/bootstrapped-pip/default.nix b/pkgs/development/python-modules/bootstrapped-pip/default.nix
index 0fd6c1873b5..ed8bbab29a7 100644
--- a/pkgs/development/python-modules/bootstrapped-pip/default.nix
+++ b/pkgs/development/python-modules/bootstrapped-pip/default.nix
@@ -6,8 +6,8 @@ let
     sha256 = "ea8033fc9905804e652f75474d33410a07404c1a78dd3c949a66863bd1050ebd";
   };
   setuptools_source = fetchurl {
-    url = "https://files.pythonhosted.org/packages/3b/c7/e9724e6f81c96248fba5876054418c11d327b3093d075790903cd66fad44/setuptools-26.1.1-py2.py3-none-any.whl";
-    sha256 = "226c9ce65e76c6069e805982b036f36dc4b227b37dd87fc219aef721ec8604ae";
+    url = "https://files.pythonhosted.org/packages/3b/7e/293d19ccd106119e35db4bf3e111b1895098f618b455b758aa636496cf03/setuptools-28.8.0-py2.py3-none-any.whl";
+    sha256 = "2e59d06ac798efce29c567ee0e0687514efca529a665b8f364cf497cd10d21b2";
   };
   argparse_source = fetchurl {
     url = "https://pypi.python.org/packages/2.7/a/argparse/argparse-1.4.0-py2.py3-none-any.whl";
@@ -15,11 +15,11 @@ let
   };
 in stdenv.mkDerivation rec {
   name = "${python.libPrefix}-bootstrapped-pip-${version}";
-  version = "8.1.2";
+  version = "9.0.1";
 
   src = fetchurl {
-    url = "https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-${version}-py2.py3-none-any.whl";
-    sha256 = "18cjrd66mn4a0gwa99zzs89lrb0xn4xmajdzya6zqd7v16cdsr34";
+    url = "https://files.pythonhosted.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f196358da3/pip-9.0.1-py2.py3-none-any.whl";
+    sha256 = "690b762c0a8460c303c089d5d0be034fb15a5ea2b75bdf565f40421f542fefb0";
   };
 
   unpackPhase = ''
diff --git a/pkgs/development/python-modules/poezio/make_default_config_writable.patch b/pkgs/development/python-modules/poezio/make_default_config_writable.patch
new file mode 100644
index 00000000000..03d732e256c
--- /dev/null
+++ b/pkgs/development/python-modules/poezio/make_default_config_writable.patch
@@ -0,0 +1,25 @@
+diff -ruN a/src/config.py b/src/config.py
+--- a/src/config.py	2015-07-31 19:35:37.000000000 +0000
++++ b/src/config.py	2015-08-03 09:23:34.322098081 +0000
+@@ -14,6 +14,7 @@
+ 
+ import logging.config
+ import os
++import stat
+ import sys
+ import pkg_resources
+ 
+@@ -563,6 +564,13 @@
+             copy2(default, options.filename)
+         elif path.isfile(other):
+             copy2(other, options.filename)
++
++        # Inside the nixstore, the reference file is readonly, so is the copy.
++        # Make it writable by the user who just created it.
++        if os.path.exists(options.filename):
++            os.chmod(options.filename,
++                     os.stat(options.filename).st_mode | stat.S_IWUSR)
++
+         global firstrun
+         firstrun = True
+ 
diff --git a/pkgs/development/python-modules/setuptools/default.nix b/pkgs/development/python-modules/setuptools/default.nix
index 3a38dee3174..bba5a6c942b 100644
--- a/pkgs/development/python-modules/setuptools/default.nix
+++ b/pkgs/development/python-modules/setuptools/default.nix
@@ -1,14 +1,15 @@
 { stdenv, lib, fetchurl, python, wrapPython }:
 
 stdenv.mkDerivation rec {
-  shortName = "setuptools-${version}";
+  pname = "setuptools";
+  shortName = "${pname}-${version}";
   name = "${python.libPrefix}-${shortName}";
 
-  version = "26.1.1";  # 18.4 and up breaks python34Packages.characteristic and many others
+  version = "28.8.0";
 
   src = fetchurl {
-    url = "mirror://pypi/s/setuptools/${shortName}.tar.gz";
-    sha256 = "475ce28993d7cb75335942525b9fac79f7431a7f6e8a0079c0f2680641379481";
+    url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${shortName}.tar.gz";
+    sha256 = "432a1ad4044338c34c2d09b0ff75d509b9849df8cf329f4c1c7706d9c2ba3c61";
   };
 
   buildInputs = [ python wrapPython ];