mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
various fixes
This commit is contained in:
parent
d5b3a6d508
commit
845fed122a
@ -18,7 +18,7 @@
|
||||
# (to make gems behave if necessary).
|
||||
|
||||
{ lib, fetchurl, writeScript, ruby, libxml2, libxslt, python, stdenv, which
|
||||
, libiconv, postgresql, v8_3_16_14, clang }:
|
||||
, libiconv, postgresql, v8_3_16_14, clang, sqlite, zlib, imagemagick, pkgconfig}:
|
||||
|
||||
let
|
||||
v8 = v8_3_16_14;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ ruby, fetchurl, rake, rubygemsFun, makeWrapper, lib, git }:
|
||||
{ ruby, fetchurl, rubygemsFun, makeWrapper, lib, git }:
|
||||
|
||||
{ name
|
||||
, namePrefix ? "${ruby.name}" + "-"
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, lib, callPackage, gemFixes }:
|
||||
{ pkgs, lib, callPackage, gemFixes, fetchurl }:
|
||||
|
||||
{ gemset, ruby ? pkgs.ruby, fixes ? gemFixes }@args:
|
||||
|
||||
@ -7,19 +7,31 @@ let
|
||||
|
||||
buildRubyGem = callPackage ./gem.nix { inherit ruby; };
|
||||
|
||||
instantiate = (name: attrs:
|
||||
fetchers.gem = attrs: fetchurl {
|
||||
url = "${attrs.src.source or "https://rubygems.org"}/downloads/${attrs.name}-${attrs.version}.gem";
|
||||
inherit (attrs.src) sha256;
|
||||
};
|
||||
|
||||
instantiate = (attrs:
|
||||
let
|
||||
gemPath = map (name: gemset''."${name}") (attrs.dependencies or []);
|
||||
fixedAttrs = attrs // (fixes."${name}" or (const {})) attrs;
|
||||
fixedAttrs = attrs // (fixes."${attrs.name}" or (const {})) attrs;
|
||||
in
|
||||
buildRubyGem (fixedAttrs // { name = "${name}-${attrs.version}"; inherit gemPath; })
|
||||
buildRubyGem (
|
||||
fixedAttrs // {
|
||||
name = "${attrs.name}-${attrs.version}";
|
||||
src = fetchers."${attrs.src.type}" attrs;
|
||||
inherit gemPath;
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
gemset' = if builtins.isAttrs gemset then gemset else callPackage gemset { };
|
||||
|
||||
gemset'' = lib.flip lib.mapAttrs gemset' (name: attrs:
|
||||
if (lib.isDerivation attrs) then attrs
|
||||
else (instantiate name attrs)
|
||||
if (lib.isDerivation attrs)
|
||||
then attrs
|
||||
else instantiate (attrs // { inherit name; })
|
||||
);
|
||||
|
||||
in gemset''
|
||||
|
@ -4049,8 +4049,6 @@ let
|
||||
|
||||
loadRubyEnv = callPackage ../development/interpreters/ruby/load-ruby-env.nix { };
|
||||
|
||||
rake = ... # TODO
|
||||
|
||||
rubySqlite3 = callPackage ../development/ruby-modules/sqlite3 { };
|
||||
|
||||
rubygemsFun = ruby: builderDefsPackage (import ../development/interpreters/ruby/rubygems.nix) {
|
||||
|
Loading…
Reference in New Issue
Block a user