1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00

Make eval-release.nix less picky

It now only checks that each derivation's drvPath attribute evaluates.
Previously it checked everything (via toXML) but that causes
derivations with dubious passthru attribute to fail (see commit
70fee5da11).
This commit is contained in:
Eelco Dolstra 2013-10-06 00:03:14 +02:00
parent cee6c320b8
commit 2a5098384e

View file

@ -10,14 +10,15 @@ let
# Add the recurseForDerivations attribute to ensure that # Add the recurseForDerivations attribute to ensure that
# nix-instantiate recurses into nested attribute sets. # nix-instantiate recurses into nested attribute sets.
recurse = attrs: recurse = path: attrs:
if (builtins.tryEval attrs).success then if (builtins.tryEval attrs).success then
if isDerivation attrs if isDerivation attrs
then then
if (builtins.tryEval attrs.outPath).success if (builtins.tryEval attrs.drvPath).success
then attrs then { inherit (attrs) name drvPath; }
else { } else { failed = true; }
else { recurseForDerivations = true; } // mapAttrs (n: v: recurse v) attrs else { recurseForDerivations = true; } //
mapAttrs (n: v: let path' = path ++ [n]; in trace path' (recurse path' v)) attrs
else { }; else { };
in recurse rel in recurse [] rel