darwin purity: libev
This commit is contained in:
parent
942cde614b
commit
616ed6ee15
@ -4,10 +4,12 @@ stdenv.mkDerivation rec {
|
|||||||
name = "libev-${version}";
|
name = "libev-${version}";
|
||||||
version="4.19";
|
version="4.19";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://dist.schmorp.de/libev/${name}.tar.gz";
|
url = "http://dist.schmorp.de/libev/Attic/${name}.tar.gz";
|
||||||
sha256 = "1jyw7qbl0spxqa0dccj9x1jsw7cj7szff43cq4acmklnra4mzz48";
|
sha256 = "1jyw7qbl0spxqa0dccj9x1jsw7cj7szff43cq4acmklnra4mzz48";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./noreturn.patch ];
|
||||||
|
|
||||||
# Version 4.19 is not valid C11 (which Clang default to)
|
# Version 4.19 is not valid C11 (which Clang default to)
|
||||||
# Check if this is still necessary on upgrade
|
# Check if this is still necessary on upgrade
|
||||||
NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-std=c99" else null;
|
NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-std=c99" else null;
|
||||||
|
13
pkgs/development/libraries/libev/noreturn.patch
Normal file
13
pkgs/development/libraries/libev/noreturn.patch
Normal file
@ -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";
|
sha256 = "0cds7yvwdlqmd590i59vzxaviwxk4js6dkhnmdxb3p1xac7wmq9s";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
pushd libev
|
||||||
|
patch -p1 < ${../development/libraries/libev/noreturn.patch}
|
||||||
|
popd
|
||||||
|
'';
|
||||||
|
|
||||||
buildInputs = with self; [ pkgs.libev ];
|
buildInputs = with self; [ pkgs.libev ];
|
||||||
propagatedBuildInputs = optionals (!isPyPy) [ self.greenlet ];
|
propagatedBuildInputs = optionals (!isPyPy) [ self.greenlet ];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user