mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 00:08:32 +01:00
darwin purity: libev
This commit is contained in:
parent
942cde614b
commit
616ed6ee15
3 changed files with 22 additions and 1 deletions
|
@ -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;
|
||||
|
|
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";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
pushd libev
|
||||
patch -p1 < ${../development/libraries/libev/noreturn.patch}
|
||||
popd
|
||||
'';
|
||||
|
||||
buildInputs = with self; [ pkgs.libev ];
|
||||
propagatedBuildInputs = optionals (!isPyPy) [ self.greenlet ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue