mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
eval-release.nix: Tolerate null
This will allow tests.pkg-config.defaultPkgConfigPackages to run on
hydra without breaking the tarball job.
Regarding the use of null, I'll quote 473ac96
which does lib.hydraJob.
By allowing null, we allow code to avoid filterAttrs, improving
laziness in real world use cases.
Specifically, this strategy prevents infinite recursion errors,
performance issues and possibly other errors that are unrelated to
the user's code.
This commit is contained in:
parent
b6fee1a4eb
commit
5cfdab8950
1 changed files with 1 additions and 0 deletions
|
@ -17,6 +17,7 @@ let
|
|||
if (builtins.tryEval attrs.drvPath).success
|
||||
then { inherit (attrs) name drvPath; }
|
||||
else { failed = true; }
|
||||
else if attrs == null then {}
|
||||
else { recurseForDerivations = true; } //
|
||||
mapAttrs (n: v: let path' = path ++ [n]; in trace path' (recurse path' v)) attrs
|
||||
else { };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue