This commit is contained in:
Alexander Flatter 2014-09-08 18:44:43 +02:00 committed by Charles Strahan
parent c786da0569
commit 3b59fbd608
2 changed files with 22 additions and 2 deletions

View File

@ -0,0 +1,16 @@
{rubyLibsWith, callPackage, lib}:
{
loadRubyEnv = path: config:
let
expr = callPackage path {};
ruby = config.ruby;
rubyLibs = rubyLibsWith ruby;
gems = rubyLibs.importGems expr.gemset config.gemOverrides;
in {
inherit ruby; # TODO: Set ruby using expr.rubyVersion if not given.
gemPath = map (drv: "${drv}/${ruby.gemPath}") (
builtins.filter (value: lib.isDerivation value) (lib.attrValues gems)
);
};
}

View File

@ -4045,10 +4045,14 @@ let
ruby_2_0 = ruby_2_0_0;
ruby_2_1 = ruby_2_1_3;
rubyLibsWith = myruby: callPackage ../development/interpreters/ruby/gems.nix {
ruby = myruby;
rubyLibsWith = ruby: callPackage ../development/interpreters/ruby/gems.nix {
inherit ruby;
};
loadRubyEnv = (callPackage ../development/interpreters/ruby/bundix.nix {
inherit rubyLibsWith;
}).loadRubyEnv;
rubyLibs_1_8_7 = rubyLibsWith ruby_1_8_7;
rubyLibs_1_9_3 = rubyLibsWith ruby_1_9_3;
rubyLibs_2_0_0 = rubyLibsWith ruby_2_0_0;