simplify expressions
This commit is contained in:
parent
b4c81a1f15
commit
9eedf0f218
@ -21,6 +21,7 @@
|
|||||||
, which, postgresql, v8_3_16_14, clang }:
|
, which, postgresql, v8_3_16_14, clang }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
id = x: x;
|
||||||
v8 = v8_3_16_14;
|
v8 = v8_3_16_14;
|
||||||
|
|
||||||
gems = lib.mapAttrs (name: config:
|
gems = lib.mapAttrs (name: config:
|
||||||
@ -31,17 +32,10 @@ let
|
|||||||
instantiate = (name: attrs:
|
instantiate = (name: attrs:
|
||||||
let
|
let
|
||||||
# Turn dependency strings into actual derivations.
|
# Turn dependency strings into actual derivations.
|
||||||
gemPath = map (name: builtins.getAttr name gems) (attrs.dependencies or []);
|
gemPath = map (name: gems."${name}") (attrs.dependencies or []);
|
||||||
fix = if (builtins.hasAttr name fixes)
|
fixedAttrs = (fixes."${name}" or id) attrs;
|
||||||
then (builtins.getAttr name fixes) attrs
|
|
||||||
else {};
|
|
||||||
in
|
in
|
||||||
buildRubyGem (attrs // {
|
buildRubyGem (fixedAttrs // { inherit gemPath; })
|
||||||
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)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
fixes = {
|
fixes = {
|
||||||
|
@ -48,11 +48,7 @@ in ruby.stdenv.mkDerivation (attrs // {
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = "true";
|
||||||
runHook preCheck
|
|
||||||
${attrs.checkPhase or "${rake}/bin/rake spec"}
|
|
||||||
runHook postCheck
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
Loading…
x
Reference in New Issue
Block a user