mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
Increase robustness of tryEval use a bit
svn path=/nixpkgs/trunk/; revision=18200
This commit is contained in:
parent
866bbe32f2
commit
159dc0e0cb
@ -39,8 +39,19 @@ let
|
||||
if builtins ? tryEval then
|
||||
let pairs = pkgs.lib.concatMap
|
||||
(x:
|
||||
let val = builtins.tryEval (processPackage (builtins.getAttr x attrSet)); in
|
||||
if builtins.isAttrs x && val.success && val.value != [] then [{name=x; value=val.value;}] else [])
|
||||
let pair = builtins.tryEval
|
||||
(let
|
||||
attrVal = (builtins.getAttr x attrSet);
|
||||
in
|
||||
{val=(processPackage attrVal);
|
||||
attrVal = attrVal;
|
||||
attrValIsAttrs = builtins.isAttrs attrVal;
|
||||
});
|
||||
success = (builtins.tryEval pair.value.attrVal).success;
|
||||
in
|
||||
if success && pair.value.attrValIsAttrs &&
|
||||
pair.value.val != [] then
|
||||
[{name= x; value=pair.value.val;}] else [])
|
||||
(builtins.attrNames attrSet);
|
||||
in
|
||||
builtins.listToAttrs pairs
|
||||
@ -51,8 +62,8 @@ let
|
||||
if attrSet ? recurseForDerivations && attrSet.recurseForDerivations then
|
||||
packagesWithMetaPlatform attrSet
|
||||
else
|
||||
if builtins.hasAttr "platforms" attrSet.meta
|
||||
then builtins.getAttr "platforms" attrSet.meta
|
||||
if attrSet ? meta && attrSet.meta ? platforms
|
||||
then attrSet.meta.platforms
|
||||
else [];
|
||||
|
||||
/* Common platform groups on which to test packages. */
|
||||
|
Loading…
Reference in New Issue
Block a user