From 33ed801e7385772d9e71f2df33cc60709711259e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Sat, 18 Feb 2023 00:14:45 +1100 Subject: [PATCH] rubyPackages.eventmachine: fix darwin build This fixes the build of mailcatcher (and maybe others). Fixes: ``` em.cpp:1232:40: error: invalid operands to binary expression ('__bind' and 'int') if (bind (sd, bind_to, bind_to_size) < 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ ``` Where `bind` is treated as `std::bind` rather than `::bind` in newer C++ standards. --- pkgs/development/ruby-modules/gem-config/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 9f2e8dbfcd11..06516ab2fba9 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -203,7 +203,12 @@ in }; eventmachine = attrs: { + dontBuild = false; buildInputs = [ openssl ]; + postPatch = '' + substituteInPlace ext/em.cpp \ + --replace 'if (bind (' 'if (::bind (' + ''; }; exif = attrs: {