From 419ae375fba2faeaf3cf5716f26a6b64aa96ca97 Mon Sep 17 00:00:00 2001 From: Burke Libbey Date: Tue, 6 Jan 2026 11:37:34 -0500 Subject: [PATCH] ruby: remove --with-setjmp-type=setjmp on Darwin The --with-setjmp-type=setjmp configure flag was added in 2014 to work around a hang during "generating encdb.h" on macOS 10.10 (Yosemite). This flag forces Ruby to use setjmp/longjmp instead of the default _setjmp/_longjmp, which causes a 5.5x slowdown in proc and block calls on modern macOS due to unnecessary signal mask save/restore operations. macOS 10.10 Yosemite reached end of life in 2017 and is far below the minimum macOS version supported by nixpkgs (currently 10.14 I think?). The underlying issue was specific to that OS version and does not affect any supported macOS release. I am however not 100% sure which release this incompatibility _stopped_ with. It certainly works on Tahoe. --- pkgs/development/interpreters/ruby/default.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 363397c70dca..b7e0338b2d07 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -237,13 +237,9 @@ let ++ lib.optional stdenv.cc.isGNU "CFLAGS=-O3" ++ [ ] - ++ ops stdenv.hostPlatform.isDarwin [ - # on darwin, we have /usr/include/tk.h -- so the configure script detects - # that tk is installed - "--with-out-ext=tk" - # on yosemite, "generating encdb.h" will hang for a very long time without this flag - "--with-setjmp-type=setjmp" - ] + # on darwin, we have /usr/include/tk.h -- so the configure script detects + # that tk is installed + ++ lib.optional stdenv.hostPlatform.isDarwin "--with-out-ext=tk" ++ ops stdenv.hostPlatform.isFreeBSD [ "rb_cv_gnu_qsort_r=no" "rb_cv_bsd_qsort_r=yes"