darwin purity: libev

wip/yesman
Jude Taylor 9 years ago
parent 942cde614b
commit 616ed6ee15
  1. 4
      pkgs/development/libraries/libev/default.nix
  2. 13
      pkgs/development/libraries/libev/noreturn.patch
  3. 6
      pkgs/top-level/python-packages.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;

@ -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

@ -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 ];

Loading…
Cancel
Save