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.