tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
ruby: allow for overriding the src
Charles Strahan
11 years ago
9ad38ec3
1a1e6cfc
+10
-7
1 changed file
expand all
collapse all
unified
split
pkgs
development
interpreters
ruby
load-ruby-env.nix
+10
-7
pkgs/development/interpreters/ruby/load-ruby-env.nix
reviewed
···
43
43
44
44
instantiate = (attrs:
45
45
let
46
46
+
defaultAttrs = {
47
47
+
name = "${attrs.name}-${attrs.version}";
48
48
+
inherit ruby gemPath;
49
49
+
};
46
50
gemPath = map (name: gemset''."${name}") (attrs.dependencies or []);
47
51
fixedAttrs = attrs // (fixes."${attrs.name}" or (const {})) attrs;
52
52
+
withSource = fixedAttrs //
53
53
+
(if (lib.isDerivation fixedAttrs.src || builtins.isString fixedAttrs.src)
54
54
+
then {}
55
55
+
else { src = (fetchers."${fixedAttrs.src.type}" fixedAttrs); });
56
56
+
48
57
in
49
49
-
buildRubyGem (
50
50
-
fixedAttrs // {
51
51
-
name = "${attrs.name}-${attrs.version}";
52
52
-
src = fetchers."${attrs.src.type}" attrs;
53
53
-
inherit ruby gemPath;
54
54
-
}
55
55
-
)
58
58
+
buildRubyGem (withSource // defaultAttrs)
56
59
);
57
60
58
61
gemset' = if builtins.isAttrs gemset then gemset else import gemset;