This commit is contained in:
Alexander Flatter
2014-10-27 21:55:12 +00:00
committed by Charles Strahan
parent c786da0569
commit 3b59fbd608
2 changed files with 22 additions and 2 deletions
@@ -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)
);
};
}