include patches
This commit is contained in:
parent
c694425a03
commit
1edaff1a2a
@ -14,12 +14,21 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
buildRubyGem = callPackage ./gem.nix {};
|
buildRubyGem = callPackage ./gem.nix {};
|
||||||
|
patches = callPackage ./patches.nix { gems = self; };
|
||||||
|
lib = ruby.stdenv.lib;
|
||||||
self = rec {
|
self = rec {
|
||||||
inherit buildRubyGem;
|
inherit buildRubyGem;
|
||||||
|
|
||||||
# import an attrset full of gems, then override badly behaved ones
|
# import an attrset full of gems, then override badly behaved ones
|
||||||
importGems = file: args:
|
importGems = file: args:
|
||||||
(callPackage file ({ inherit buildRubyGem; rubyLibs = self; } // args));
|
let
|
||||||
|
builtGems = callPackage file ({ inherit buildRubyGem; rubyLibs = self; } // args);
|
||||||
|
in lib.mapAttrs (gem: deriv:
|
||||||
|
if patches ? "${gem}"
|
||||||
|
then lib.overrideDerivation deriv (oldAttrs:
|
||||||
|
if oldAttrs ? dontPatch && oldAttrs.dontPatch == 1 then {}
|
||||||
|
else patches."${gem}")
|
||||||
|
else deriv) builtGems;
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# stuff EVERYONE needs
|
# stuff EVERYONE needs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user