2017-05-09 18:39:20 +02:00
|
|
|
{ stdenv, lib, ruby, callPackage, ... }:
|
|
|
|
let
|
|
|
|
mkDerivation = {name, ...}@argSet:
|
|
|
|
derivation {
|
|
|
|
inherit name;
|
|
|
|
text = (builtins.toJSON (lib.filterAttrs ( n: v: builtins.any (x: x == n) ["name" "system"]) argSet));
|
|
|
|
builder = stdenv.shell;
|
|
|
|
args = [ "-c" "echo $(<$textPath) > $out"];
|
2018-08-20 21:11:29 +02:00
|
|
|
system = stdenv.hostPlatform.system;
|
2017-05-09 18:39:20 +02:00
|
|
|
passAsFile = ["text"];
|
|
|
|
};
|
|
|
|
fetchurl = {url?"", urls ? [],...}: "fetchurl:${if urls == [] then url else builtins.head urls}";
|
|
|
|
|
|
|
|
stdenv' = stdenv // {
|
|
|
|
inherit mkDerivation;
|
|
|
|
stubbed = true;
|
|
|
|
};
|
|
|
|
ruby' = ruby // {
|
|
|
|
stdenv = stdenv';
|
|
|
|
stubbed = true;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
ruby = ruby';
|
|
|
|
buildRubyGem = callPackage ../gem {
|
|
|
|
inherit fetchurl;
|
|
|
|
ruby = ruby';
|
|
|
|
};
|
|
|
|
stdenv = stdenv';
|
|
|
|
}
|