diff --git a/pkgs/development/interpreters/ruby/gem.nix b/pkgs/development/interpreters/ruby/gem.nix index a64f10e268cc..8ec80b785de0 100644 --- a/pkgs/development/interpreters/ruby/gem.nix +++ b/pkgs/development/interpreters/ruby/gem.nix @@ -31,7 +31,8 @@ let wrapProgram "$prog" \ --prefix GEM_PATH : "$GEM_PATH" \ --prefix RUBYLIB : "${rubygems}/lib" \ - --set RUBYOPT 'rubygems' + --set RUBYOPT rubygems \ + $extraWrapperFlags ''${extraWrapperFlagsArray[@]} done for prog in $out/gems/*/bin/*; do diff --git a/pkgs/development/interpreters/ruby/patches.nix b/pkgs/development/interpreters/ruby/patches.nix index 37f103f7772d..a2d2d753a4af 100644 --- a/pkgs/development/interpreters/ruby/patches.nix +++ b/pkgs/development/interpreters/ruby/patches.nix @@ -61,4 +61,11 @@ in buildInputs = [ jdk ]; JAVA_HOME = jdk; }; + + buildr = { + # Many Buildfiles rely on RUBYLIB containing the current directory + # (as was the default in Ruby < 1.9.2). + extraWrapperFlags = "--prefix RUBYLIB : ."; + }; + }