diff options
author | zimbatm <zimbatm@zimbatm.com> | 2016-06-12 13:28:02 +0100 |
---|---|---|
committer | zimbatm <zimbatm@zimbatm.com> | 2016-08-23 09:30:49 +0100 |
commit | a1460473cb921cb40e22848a844636ab46a44dfb (patch) | |
tree | 0a39349c0a3128c101d21fcf761f67a8ef895e6f /pkgs/development/ruby-modules | |
parent | 9ef3a513793e42d828b823c7ecb1488ddc2b9706 (diff) | |
download | nixlib-a1460473cb921cb40e22848a844636ab46a44dfb.tar nixlib-a1460473cb921cb40e22848a844636ab46a44dfb.tar.gz nixlib-a1460473cb921cb40e22848a844636ab46a44dfb.tar.bz2 nixlib-a1460473cb921cb40e22848a844636ab46a44dfb.tar.lz nixlib-a1460473cb921cb40e22848a844636ab46a44dfb.tar.xz nixlib-a1460473cb921cb40e22848a844636ab46a44dfb.tar.zst nixlib-a1460473cb921cb40e22848a844636ab46a44dfb.zip |
buildRubyGem: don't set the GEM_HOME
bundler for example needs to have the GEM_HOME being passed trough to function properly. For gems that are loading content dynamically, or can use plugins, use buildRubyGem. For executables that are wrapped in their own sealed thing use bundlerEnv.
Diffstat (limited to 'pkgs/development/ruby-modules')
-rw-r--r-- | pkgs/development/ruby-modules/gem/gem-post-build.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/development/ruby-modules/gem/gem-post-build.rb b/pkgs/development/ruby-modules/gem/gem-post-build.rb index 4480c525bf16..f0322b67f61f 100644 --- a/pkgs/development/ruby-modules/gem/gem-post-build.rb +++ b/pkgs/development/ruby-modules/gem/gem-post-build.rb @@ -7,7 +7,7 @@ ruby = File.join(ENV["ruby"], "bin", RbConfig::CONFIG['ruby_install_name']) out = ENV["out"] bin_path = File.join(ENV["out"], "bin") gem_home = ENV["GEM_HOME"] -gem_path = ENV["GEM_PATH"].split(":") +gem_path = ENV["GEM_PATH"].split(File::PATH_SEPARATOR) install_path = Dir.glob("#{gem_home}/gems/*").first gemspec_path = ARGV[0] @@ -64,11 +64,16 @@ spec.executables.each do |exe| # this file is here to facilitate running it. # -Gem.use_paths "#{gem_home}", #{gem_path.to_s} - require 'rubygems' -load Gem.bin_path(#{spec.name.inspect}, #{exe.inspect}) +Gem.paths = { + 'GEM_PATH' => ( + ENV['GEM_PATH'].to_s.split(File::PATH_SEPARATOR) + + #{([gem_home] + gem_path).to_s} + ).join(File::PATH_SEPARATOR) +} + +load Gem.activate_bin_path(#{spec.name.inspect}, #{exe.inspect}, #{spec.version.to_s.inspect}) EOF end |