summary refs log tree commit diff
path: root/maintainers/scripts/eval-release.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-06 00:03:14 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-06 00:21:28 +0200
commit2a5098384eef11c61e68d7a73ebd509f7c04d98b (patch)
tree9edb66a932de29eae3075e314e31f587b373f7a8 /maintainers/scripts/eval-release.nix
parentcee6c320b89ea41ac4c33627c2eacda8405cc135 (diff)
downloadnixpkgs-2a5098384eef11c61e68d7a73ebd509f7c04d98b.tar
nixpkgs-2a5098384eef11c61e68d7a73ebd509f7c04d98b.tar.gz
nixpkgs-2a5098384eef11c61e68d7a73ebd509f7c04d98b.tar.bz2
nixpkgs-2a5098384eef11c61e68d7a73ebd509f7c04d98b.tar.lz
nixpkgs-2a5098384eef11c61e68d7a73ebd509f7c04d98b.tar.xz
nixpkgs-2a5098384eef11c61e68d7a73ebd509f7c04d98b.tar.zst
nixpkgs-2a5098384eef11c61e68d7a73ebd509f7c04d98b.zip
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).
Diffstat (limited to 'maintainers/scripts/eval-release.nix')
-rw-r--r--maintainers/scripts/eval-release.nix15
1 files changed, 8 insertions, 7 deletions
diff --git a/maintainers/scripts/eval-release.nix b/maintainers/scripts/eval-release.nix
index 4bd2b0f1fa8..eccd77009a1 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