more cleanup
This commit is contained in:
parent
845fed122a
commit
3eeabc4523
7
pkgs/development/interpreters/ruby/bundler.nix
Normal file
7
pkgs/development/interpreters/ruby/bundler.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ buildRubyGem }:
|
||||
|
||||
buildRubyGem {
|
||||
name = "bundler-1.7.4";
|
||||
sha256 = "122k07z60780mr00zfbbw04v9xlw1fhxjsx4g2rbm66hxlnlnh89";
|
||||
dontPatchShebangs = true;
|
||||
}
|
@ -1,6 +1,10 @@
|
||||
{ ruby, fetchurl, rubygemsFun, makeWrapper, lib, git }:
|
||||
{ lib, ruby, rubygemsFun, fetchurl, makeWrapper, git } @ defs:
|
||||
|
||||
lib.makeOverridable (
|
||||
|
||||
{ name
|
||||
, ruby ? defs.ruby
|
||||
, rubygems ? (rubygemsFun ruby)
|
||||
, namePrefix ? "${ruby.name}" + "-"
|
||||
, buildInputs ? []
|
||||
, doCheck ? false
|
||||
@ -9,10 +13,7 @@
|
||||
, gemPath ? []
|
||||
, ...} @ attrs:
|
||||
|
||||
let
|
||||
rubygems = rubygemsFun ruby;
|
||||
|
||||
in ruby.stdenv.mkDerivation (attrs // {
|
||||
ruby.stdenv.mkDerivation (attrs // {
|
||||
inherit doCheck;
|
||||
|
||||
buildInputs = [ rubygems makeWrapper git ] ++ buildInputs;
|
||||
@ -119,3 +120,5 @@ in ruby.stdenv.mkDerivation (attrs // {
|
||||
passthru.isRubyGem = true;
|
||||
inherit meta;
|
||||
})
|
||||
|
||||
)
|
||||
|
@ -1,12 +1,10 @@
|
||||
{ pkgs, lib, callPackage, gemFixes, fetchurl }:
|
||||
{ ruby, lib, callPackage, gemFixes, fetchurl, buildRubyGem }@defs:
|
||||
|
||||
{ gemset, ruby ? pkgs.ruby, fixes ? gemFixes }@args:
|
||||
{ gemset, ruby ? defs.ruby, fixes ? gemFixes }@args:
|
||||
|
||||
let
|
||||
const = x: y: x;
|
||||
|
||||
buildRubyGem = callPackage ./gem.nix { inherit ruby; };
|
||||
|
||||
fetchers.gem = attrs: fetchurl {
|
||||
url = "${attrs.src.source or "https://rubygems.org"}/downloads/${attrs.name}-${attrs.version}.gem";
|
||||
inherit (attrs.src) sha256;
|
||||
@ -21,12 +19,12 @@ let
|
||||
fixedAttrs // {
|
||||
name = "${attrs.name}-${attrs.version}";
|
||||
src = fetchers."${attrs.src.type}" attrs;
|
||||
inherit gemPath;
|
||||
inherit ruby gemPath;
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
gemset' = if builtins.isAttrs gemset then gemset else callPackage gemset { };
|
||||
gemset' = if builtins.isAttrs gemset then gemset else import gemset;
|
||||
|
||||
gemset'' = lib.flip lib.mapAttrs gemset' (name: attrs:
|
||||
if (lib.isDerivation attrs)
|
||||
|
@ -1,6 +1,6 @@
|
||||
args : with args;
|
||||
rec {
|
||||
|
||||
rec {
|
||||
name = "rubygems-" + version;
|
||||
version = "2.4.1";
|
||||
src = fetchurl {
|
||||
|
@ -4030,7 +4030,10 @@ let
|
||||
wrapPython = pythonPackages.wrapPython;
|
||||
};
|
||||
|
||||
bundler = callPackage ../development/interpreters/ruby/bundler.nix { };
|
||||
gemFixes = callPackage ../development/interpreters/ruby/fixes.nix { };
|
||||
buildRubyGem = callPackage ../development/interpreters/ruby/gem.nix { };
|
||||
loadRubyEnv = callPackage ../development/interpreters/ruby/load-ruby-env.nix { };
|
||||
|
||||
ruby_1_8_7 = callPackage ../development/interpreters/ruby/ruby-1.8.7.nix { };
|
||||
ruby_1_9_3 = callPackage ../development/interpreters/ruby/ruby-1.9.3.nix { };
|
||||
@ -4047,10 +4050,6 @@ let
|
||||
ruby_2_0 = ruby_2_0_0;
|
||||
ruby_2_1 = ruby_2_1_3;
|
||||
|
||||
loadRubyEnv = callPackage ../development/interpreters/ruby/load-ruby-env.nix { };
|
||||
|
||||
rubySqlite3 = callPackage ../development/ruby-modules/sqlite3 { };
|
||||
|
||||
rubygemsFun = ruby: builderDefsPackage (import ../development/interpreters/ruby/rubygems.nix) {
|
||||
inherit ruby makeWrapper;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user