mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-03-17 09:32:50 +00:00
simplify expressions
This commit is contained in:
parent
b4c81a1f15
commit
9eedf0f218
|
@ -21,6 +21,7 @@
|
|||
, which, postgresql, v8_3_16_14, clang }:
|
||||
|
||||
let
|
||||
id = x: x;
|
||||
v8 = v8_3_16_14;
|
||||
|
||||
gems = lib.mapAttrs (name: config:
|
||||
|
@ -31,17 +32,10 @@ let
|
|||
instantiate = (name: attrs:
|
||||
let
|
||||
# Turn dependency strings into actual derivations.
|
||||
gemPath = map (name: builtins.getAttr name gems) (attrs.dependencies or []);
|
||||
fix = if (builtins.hasAttr name fixes)
|
||||
then (builtins.getAttr name fixes) attrs
|
||||
else {};
|
||||
gemPath = map (name: gems."${name}") (attrs.dependencies or []);
|
||||
fixedAttrs = (fixes."${name}" or id) attrs;
|
||||
in
|
||||
buildRubyGem (attrs // {
|
||||
inherit gemPath;
|
||||
# Disable the checkPhase as there no single way to run tests for a given
|
||||
# gem: https://github.com/rubygems/rubygems/issues/730
|
||||
checkPhase = ":";
|
||||
} // fix)
|
||||
buildRubyGem (fixedAttrs // { inherit gemPath; })
|
||||
);
|
||||
|
||||
fixes = {
|
||||
|
|
|
@ -48,11 +48,7 @@ in ruby.stdenv.mkDerivation (attrs // {
|
|||
fi
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
${attrs.checkPhase or "${rake}/bin/rake spec"}
|
||||
runHook postCheck
|
||||
'';
|
||||
checkPhase = "true";
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
|
Loading…
Reference in a new issue