mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 13:19:10 +03:00
2c2f1e37d4
It is deprecated and will be removed after 18.09.
31 lines
757 B
Nix
31 lines
757 B
Nix
{ 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"];
|
|
system = stdenv.hostPlatform.system;
|
|
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';
|
|
}
|