From 2a5098384eef11c61e68d7a73ebd509f7c04d98b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 6 Oct 2013 00:03:14 +0200 Subject: [PATCH] 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 70fee5da112b8a0093d59ac16cdead4d0a72f357). --- maintainers/scripts/eval-release.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/maintainers/scripts/eval-release.nix b/maintainers/scripts/eval-release.nix index 4bd2b0f1fa8b..eccd77009a17 100644 --- a/maintainers/scripts/eval-release.nix +++ b/maintainers/scripts/eval-release.nix @@ -10,14 +10,15 @@ let # Add the ‘recurseForDerivations’ attribute to ensure that # nix-instantiate recurses into nested attribute sets. - recurse = attrs: + recurse = path: attrs: if (builtins.tryEval attrs).success then - if isDerivation attrs + if isDerivation attrs then - if (builtins.tryEval attrs.outPath).success - then attrs - else { } - else { recurseForDerivations = true; } // mapAttrs (n: v: recurse v) attrs + if (builtins.tryEval attrs.drvPath).success + then { inherit (attrs) name drvPath; } + else { failed = true; } + else { recurseForDerivations = true; } // + mapAttrs (n: v: let path' = path ++ [n]; in trace path' (recurse path' v)) attrs else { }; -in recurse rel +in recurse [] rel