1{
2 stdenv,
3 lib,
4 ruby,
5 callPackage,
6 ...
7}:
8let
9 mkDerivation =
10 { name, ... }@argSet:
11 derivation {
12 inherit name;
13 text = (
14 builtins.toJSON (
15 lib.filterAttrs (
16 n: v:
17 builtins.any (x: x == n) [
18 "name"
19 "system"
20 ]
21 ) argSet
22 )
23 );
24 builder = stdenv.shell;
25 args = [
26 "-c"
27 "echo $(<$textPath) > $out"
28 ];
29 system = stdenv.hostPlatform.system;
30 passAsFile = [ "text" ];
31 };
32 fetchurl =
33 {
34 url ? "",
35 urls ? [ ],
36 ...
37 }:
38 "fetchurl:${if urls == [ ] then url else builtins.head urls}";
39
40 stdenv' = stdenv // {
41 inherit mkDerivation;
42 stubbed = true;
43 };
44 ruby' = ruby // {
45 stdenv = stdenv';
46 stubbed = true;
47 };
48in
49{
50 ruby = ruby';
51 buildRubyGem = callPackage ../gem {
52 inherit fetchurl;
53 ruby = ruby';
54 };
55 stdenv = stdenv';
56}