From 8780d8542d3b6a7de43f1a92c2fcc64352355069 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 18 Feb 2023 10:45:00 -0500 Subject: [PATCH] ruby_3_0: fix build on darwin --- pkgs/development/interpreters/ruby/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 28c508cae8ba..2bab78ecd419 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -97,6 +97,13 @@ let }).${ver.majMinTiny} ++ op (lib.versionOlder ver.majMin "3.1") ./do-not-regenerate-revision.h.patch ++ op (atLeast30 && useBaseRuby) ./do-not-update-gems-baseruby.patch + ++ ops (ver.majMin == "3.0") [ + # Ruby 3.0 adds `-fdeclspec` to $CC instead of $CFLAGS. Fixed in later versions. + (fetchpatch { + url = "https://github.com/ruby/ruby/commit/0acc05caf7518cd0d63ab02bfa036455add02346.patch"; + sha256 = "sha256-43hI9L6bXfeujgmgKFVmiWhg7OXvshPCCtQ4TxqK1zk="; + }) + ] ++ ops (!atLeast30 && rubygemsSupport) [ # We upgrade rubygems to a version that isn't compatible with the # ruby 2.7 installer. Backport the upstream fix.