ruby: allow for overriding the src
This commit is contained in:
parent
1a1e6cfc04
commit
9ad38ec322
@ -43,16 +43,19 @@ let
|
|||||||
|
|
||||||
instantiate = (attrs:
|
instantiate = (attrs:
|
||||||
let
|
let
|
||||||
|
defaultAttrs = {
|
||||||
|
name = "${attrs.name}-${attrs.version}";
|
||||||
|
inherit ruby gemPath;
|
||||||
|
};
|
||||||
gemPath = map (name: gemset''."${name}") (attrs.dependencies or []);
|
gemPath = map (name: gemset''."${name}") (attrs.dependencies or []);
|
||||||
fixedAttrs = attrs // (fixes."${attrs.name}" or (const {})) attrs;
|
fixedAttrs = attrs // (fixes."${attrs.name}" or (const {})) attrs;
|
||||||
|
withSource = fixedAttrs //
|
||||||
|
(if (lib.isDerivation fixedAttrs.src || builtins.isString fixedAttrs.src)
|
||||||
|
then {}
|
||||||
|
else { src = (fetchers."${fixedAttrs.src.type}" fixedAttrs); });
|
||||||
|
|
||||||
in
|
in
|
||||||
buildRubyGem (
|
buildRubyGem (withSource // defaultAttrs)
|
||||||
fixedAttrs // {
|
|
||||||
name = "${attrs.name}-${attrs.version}";
|
|
||||||
src = fetchers."${attrs.src.type}" attrs;
|
|
||||||
inherit ruby gemPath;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
gemset' = if builtins.isAttrs gemset then gemset else import gemset;
|
gemset' = if builtins.isAttrs gemset then gemset else import gemset;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user