buildRubyGem: only set NIX_CFLAGS_COMPILE on Ruby MRI

It's not needed on other implementations like JRuby
This commit is contained in:
Mario Rodas 2023-06-11 04:20:00 +00:00
parent 06611403c5
commit 76a2ed5ef5

View File

@ -136,7 +136,7 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // {
# As of ruby 3.0, ruby headers require -fdeclspec when building with clang
# Introduced in https://github.com/ruby/ruby/commit/0958e19ffb047781fe1506760c7cbd8d7fe74e57
env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isClang && lib.versionAtLeast ruby.version.major "3") [
env.NIX_CFLAGS_COMPILE = toString (lib.optionals (ruby.rubyEngine == "ruby" && stdenv.cc.isClang && lib.versionAtLeast ruby.version.major "3") [
"-fdeclspec"
]);