diff --git a/pkgs/development/libraries/libev/default.nix b/pkgs/development/libraries/libev/default.nix index ce7d7b9e2759..d27df16eb944 100644 --- a/pkgs/development/libraries/libev/default.nix +++ b/pkgs/development/libraries/libev/default.nix @@ -4,10 +4,12 @@ stdenv.mkDerivation rec { name = "libev-${version}"; version="4.19"; src = fetchurl { - url = "http://dist.schmorp.de/libev/${name}.tar.gz"; + url = "http://dist.schmorp.de/libev/Attic/${name}.tar.gz"; sha256 = "1jyw7qbl0spxqa0dccj9x1jsw7cj7szff43cq4acmklnra4mzz48"; }; + patches = [ ./noreturn.patch ]; + # Version 4.19 is not valid C11 (which Clang default to) # Check if this is still necessary on upgrade NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-std=c99" else null; diff --git a/pkgs/development/libraries/libev/noreturn.patch b/pkgs/development/libraries/libev/noreturn.patch new file mode 100644 index 000000000000..85e2eaee6b47 --- /dev/null +++ b/pkgs/development/libraries/libev/noreturn.patch @@ -0,0 +1,13 @@ +diff --git a/ev.c b/ev.c +index 6f36c6d..b8a1c5f 100644 +--- a/ev.c ++++ b/ev.c +@@ -1026,7 +1026,7 @@ ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << ( + #define ecb_unreachable() __builtin_unreachable () + #else + /* this seems to work fine, but gcc always emits a warning for it :/ */ +- ecb_inline void ecb_unreachable (void) ecb_noreturn; ++ ecb_inline ecb_noreturn void ecb_unreachable (void); + ecb_inline void ecb_unreachable (void) { } + #endif + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f315b2e24abe..87acf28cef9a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5743,6 +5743,12 @@ let sha256 = "0cds7yvwdlqmd590i59vzxaviwxk4js6dkhnmdxb3p1xac7wmq9s"; }; + patchPhase = '' + pushd libev + patch -p1 < ${../development/libraries/libev/noreturn.patch} + popd + ''; + buildInputs = with self; [ pkgs.libev ]; propagatedBuildInputs = optionals (!isPyPy) [ self.greenlet ];