{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7275","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7275/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7275/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7275/events","html_url":"https://github.com/NixOS/nixpkgs/issues/7275","id":67195936,"number":7275,"title":"`libev` and `python2.7-gevent` broken on darwin","user":{"login":"mnacamura","id":45770,"avatar_url":"https://avatars.githubusercontent.com/u/45770?v=3","gravatar_id":"","url":"https://api.github.com/users/mnacamura","html_url":"https://github.com/mnacamura","followers_url":"https://api.github.com/users/mnacamura/followers","following_url":"https://api.github.com/users/mnacamura/following{/other_user}","gists_url":"https://api.github.com/users/mnacamura/gists{/gist_id}","starred_url":"https://api.github.com/users/mnacamura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnacamura/subscriptions","organizations_url":"https://api.github.com/users/mnacamura/orgs","repos_url":"https://api.github.com/users/mnacamura/repos","events_url":"https://api.github.com/users/mnacamura/events{/privacy}","received_events_url":"https://api.github.com/users/mnacamura/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/darwin","name":"darwin","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-08T18:59:34Z","updated_at":"2015-04-08T20:30:11Z","closed_at":null,"body":"The error below occurs in the build phase.\r\n```\r\n/nix/store/hp0qay3fp5w87lrl185n35wsmrm3f061-bash-4.3-p33/bin/bash ./libtool\r\n--tag=CC   --mode=compile clang -DHAVE_CONFIG_H -I.     -g -O3 -c -o ev.lo ev.c\r\nlibtool: compile:  clang -DHAVE_CONFIG_H -I. -g -O3 -c ev.c  -fno-common -DPIC\r\n-o .libs/ev.o\r\nev.c:483:48: warning: '/*' within block comment [-Wcomment]\r\n/*#define MIN_INTERVAL  0.00000095367431640625 /* 1/2**20, good till 2200 */\r\n \r\nerror: '_Noreturn' keyword must precede function declarator\r\n  ecb_inline void ecb_unreachable (void) ecb_noreturn;\r\n                                           ^~~~~~~~~~~~\r\n                                             _Noreturn\r\n:832:26: note: expanded from macro 'ecb_noreturn'\r\n  #define ecb_noreturn   _Noreturn\r\n                           ^\r\n```\r\nI guess it's because `stdenv.darwin` use clang and clang use C11 by default.\r\nSo, I tried the following patch and succeeded in build.\r\n```diff\r\ndiff --git a/pkgs/development/libraries/libev/default.nix b/pkgs/development/libraries/libev/default.nix\r\nindex 90cab2c..7dc5c6b 100644\r\n--- a/pkgs/development/libraries/libev/default.nix\r\n+++ b/pkgs/development/libraries/libev/default.nix\r\n@@ -7,6 +7,7 @@ stdenv.mkDerivation rec {\r\n     url = \"http://dist.schmorp.de/libev/${name}.tar.gz\";\r\n     sha256 = \"1jyw7qbl0spxqa0dccj9x1jsw7cj7szff43cq4acmklnra4mzz48\";\r\n   };\r\n+  CFLAGS = stdenv.lib.optionalString stdenv.isDarwin \"-std=gnu99\";\r\n   meta = {\r\n     description = \"A high-performance event loop/event model with lots of features\";\r\n     maintainers = [ stdenv.lib.maintainers.raskin ];\r\ndiff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix\r\nindex 1682f49..017a31a 100644\r\n--- a/pkgs/top-level/python-packages.nix\r\n+++ b/pkgs/top-level/python-packages.nix\r\n@@ -5160,6 +5160,7 @@ let\r\n     patches = [ ../development/python-modules/gevent_sslwrap.patch ];\r\n \r\n     buildInputs = with self; [ pkgs.libev ];\r\n+    CFLAGS = stdenv.lib.optionalString stdenv.isDarwin \"-std=gnu99\";\r\n     propagatedBuildInputs = optionals (!isPyPy) [ self.greenlet ];\r\n \r\n     meta = with stdenv.lib; {\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/91028283","html_url":"https://github.com/NixOS/nixpkgs/issues/7275#issuecomment-91028283","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/7275","id":91028283,"user":{"login":"gridaphobe","id":201997,"avatar_url":"https://avatars.githubusercontent.com/u/201997?v=3","gravatar_id":"","url":"https://api.github.com/users/gridaphobe","html_url":"https://github.com/gridaphobe","followers_url":"https://api.github.com/users/gridaphobe/followers","following_url":"https://api.github.com/users/gridaphobe/following{/other_user}","gists_url":"https://api.github.com/users/gridaphobe/gists{/gist_id}","starred_url":"https://api.github.com/users/gridaphobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gridaphobe/subscriptions","organizations_url":"https://api.github.com/users/gridaphobe/orgs","repos_url":"https://api.github.com/users/gridaphobe/repos","events_url":"https://api.github.com/users/gridaphobe/events{/privacy}","received_events_url":"https://api.github.com/users/gridaphobe/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T20:30:11Z","updated_at":"2015-04-08T20:30:11Z","body":"Isn't that something that autoconf/cmake would generally figure out?"}}