From 61335d51ace64fa75daa14c58768945af255d997 Mon Sep 17 00:00:00 2001 From: Jason Felice Date: Mon, 18 May 2020 17:23:23 -0400 Subject: [PATCH] gambit: disable use of poll() on Darwin Darwin has a bug which affects the use of poll() with a tty fd, which affects gambit's REPL when at a console, causing 100% CPU usage. Gambit recommends this is disabled on Darwin. --- pkgs/development/compilers/gambit/build.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gambit/build.nix b/pkgs/development/compilers/gambit/build.nix index fc71128eb37..c6a48bd744e 100644 --- a/pkgs/development/compilers/gambit/build.nix +++ b/pkgs/development/compilers/gambit/build.nix @@ -40,7 +40,6 @@ gccStdenv.mkDerivation rec { "--enable-gcc-opts" "--enable-shared" "--enable-absolute-shared-libs" # Yes, NixOS will want an absolute path, and fix it. - "--enable-poll" "--enable-openssl" "--enable-default-runtime-options=${gambit-params.defaultRuntimeOptions}" # "--enable-debug" # Nope: enables plenty of good stuff, but also the costly console.log @@ -57,7 +56,9 @@ gccStdenv.mkDerivation rec { # "--enable-coverage" # "--enable-inline-jumps" # "--enable-char-size=1" # default is 4 - ]; + ] ++ + # due not enable poll on darwin due to https://github.com/gambit/gambit/issues/498 + lib.optional (!gccStdenv.isDarwin) "--enable-poll"; configurePhase = '' export CC=${gcc}/bin/gcc \