mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
ruby: make C++ compiler overridable as well
Some gems use the C++ compiler Ruby was built with, like eventmachine.
This commit is contained in:
parent
8c66358034
commit
54d6f5d76f
1 changed files with 3 additions and 1 deletions
|
@ -202,7 +202,9 @@ let
|
||||||
|
|
||||||
# Allow to override compiler. This is important for cross compiling as
|
# Allow to override compiler. This is important for cross compiling as
|
||||||
# we need to set a compiler that is different from the build one.
|
# 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
|
# Remove unnecessary external intermediate files created by gems
|
||||||
extMakefiles=$(find $out/${passthru.gemPath} -name Makefile)
|
extMakefiles=$(find $out/${passthru.gemPath} -name Makefile)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue