diff options
author | Sander van der Burg <svanderburg@gmail.com> | 2013-03-21 13:56:33 +0100 |
---|---|---|
committer | Sander van der Burg <svanderburg@gmail.com> | 2013-03-21 13:56:33 +0100 |
commit | 1dbd3a55c4790394ecf43fc8f3b2442856df8241 (patch) | |
tree | 7d780a8fbc6f703d2b243d9fb67f3253fc4a19ff /pkgs/development/interpreters/ruby | |
parent | c8ff101724a7e290c2e76b33f4dcdf2e3b5c7430 (diff) | |
download | nixlib-1dbd3a55c4790394ecf43fc8f3b2442856df8241.tar nixlib-1dbd3a55c4790394ecf43fc8f3b2442856df8241.tar.gz nixlib-1dbd3a55c4790394ecf43fc8f3b2442856df8241.tar.bz2 nixlib-1dbd3a55c4790394ecf43fc8f3b2442856df8241.tar.lz nixlib-1dbd3a55c4790394ecf43fc8f3b2442856df8241.tar.xz nixlib-1dbd3a55c4790394ecf43fc8f3b2442856df8241.tar.zst nixlib-1dbd3a55c4790394ecf43fc8f3b2442856df8241.zip |
libv8-rubygem: Implemented a very depressing workaround that allows scons to build libv8.a, it's ugly but it works
Diffstat (limited to 'pkgs/development/interpreters/ruby')
-rw-r--r-- | pkgs/development/interpreters/ruby/patches.nix | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/ruby/patches.nix b/pkgs/development/interpreters/ruby/patches.nix index 10b0b2023877..c4da956b57c8 100644 --- a/pkgs/development/interpreters/ruby/patches.nix +++ b/pkgs/development/interpreters/ruby/patches.nix @@ -1,5 +1,5 @@ { fetchurl, writeScript, ruby, ncurses, sqlite, libxml2, libxslt, libffi -, zlib, libuuid, gems, jdk, python }: +, zlib, libuuid, gems, jdk, python, stdenv }: let @@ -15,7 +15,32 @@ in { sup = { buildInputs = [ gems.ncursesw ]; }; - libv8 = { buildInputs = [ python ]; }; + libv8 = { + # This fix is needed to fool scons, which clears the environment by default. + # It's ugly, but it works. + # + # We create a gcc wrapper wrapper, which reexposes the environment variables + # that scons hides. Furthermore, they treat warnings as errors causing the + # build to fail, due to an unused variable. + # + # Finally, we must set CC and AR explicitly to allow scons to find the + # compiler and archiver + + preBuild = '' + cat > $TMPDIR/g++ <<EOF + #! ${stdenv.shell} + $(export) + + g++ \$(echo \$@ | sed 's/-Werror//g') + EOF + chmod +x $TMPDIR/g++ + + + export CXX=$TMPDIR/g++ + export AR=$(type -p ar) + ''; + buildInputs = [ python ]; + }; sqlite3 = { propagatedBuildInputs = [ sqlite ]; }; |