mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 11:53:51 +00:00
correctly implement patching
This commit is contained in:
parent
1edaff1a2a
commit
2dedbe6bbe
@ -22,13 +22,14 @@ self = rec {
|
||||
# import an attrset full of gems, then override badly behaved ones
|
||||
importGems = file: 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;
|
||||
preBuilt = callPackage file ({ inherit buildRubyGem; self = builtGems; } // args);
|
||||
builtGems = self // (lib.mapAttrs (gem: deriv:
|
||||
if patches ? "${gem}"
|
||||
then lib.overrideDerivation deriv (oldAttrs:
|
||||
if oldAttrs ? dontPatch && oldAttrs.dontPatch == 1 then {}
|
||||
else patches."${gem}")
|
||||
else deriv) preBuilt);
|
||||
in builtGems;
|
||||
|
||||
##################################################################
|
||||
# stuff EVERYONE needs
|
||||
|
@ -20,6 +20,10 @@ in
|
||||
extraWrapperFlags = "--prefix RUBYLIB : .";
|
||||
};
|
||||
|
||||
barber = { gemFlags = "--ignore-dependencies"; };
|
||||
ember_data_source = { gemFlags = "--ignore-dependencies"; };
|
||||
ember_rails = { gemFlags = "--ignore-dependencies"; };
|
||||
|
||||
fakes3 = {
|
||||
postInstall = ''
|
||||
cd $out/${ruby.gemPath}/gems/*
|
||||
|
Loading…
Reference in New Issue
Block a user