mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 02:33:25 +00:00
WIP
This commit is contained in:
parent
c786da0569
commit
3b59fbd608
16
pkgs/development/interpreters/ruby/bundix.nix
Normal file
16
pkgs/development/interpreters/ruby/bundix.nix
Normal 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)
|
||||
);
|
||||
};
|
||||
}
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user