diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-02-02 18:14:44 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-02-04 11:43:03 +0100 |
commit | 54d6f5d76fb439cf50416679b65a7a85401daeb2 (patch) | |
tree | be3ad3b7c67508aa134e1b51ed5e2a8c965df200 /pkgs/development/interpreters | |
parent | 8c66358034426a3a0158ae62474e735aa2e9f4a3 (diff) |
ruby: make C++ compiler overridable as well
Some gems use the C++ compiler Ruby was built with, like eventmachine.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r-- | pkgs/development/interpreters/ruby/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 781b3273e3a9e..af471bd683ed4 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -202,7 +202,9 @@ let # Allow to override compiler. This is important for cross compiling as # we need to set a compiler that is different from the build one. - sed -i 's/CONFIG\["CC"\] = "\(.*\)"/CONFIG["CC"] = if ENV["CC"].nil? || ENV["CC"].empty? then "\1" else ENV["CC"] end/' "$rbConfig" + sed -i "$rbConfig" \ + -e 's/CONFIG\["CC"\] = "\(.*\)"/CONFIG["CC"] = if ENV["CC"].nil? || ENV["CC"].empty? then "\1" else ENV["CC"] end/' \ + -e 's/CONFIG\["CXX"\] = "\(.*\)"/CONFIG["CXX"] = if ENV["CXX"].nil? || ENV["CXX"].empty? then "\1" else ENV["CXX"] end/' # Remove unnecessary external intermediate files created by gems extMakefiles=$(find $out/${passthru.gemPath} -name Makefile) |