1 # Evaluate `release.nix' like Hydra would. Too bad nix-instantiate can't to do this.
4 inherit (import ../../lib) isDerivation mapAttrs;
6 trace = if builtins.getEnv "VERBOSE" == "1" then builtins.trace else (x: y: y);
8 rel = removeAttrs (import ../../pkgs/top-level/release.nix { }) [ "tarball" "unstable" ];
10 # Add the ‘recurseForDerivations’ attribute to ensure that
11 # nix-instantiate recurses into nested attribute sets.
12 recurse = path: attrs:
13 if (builtins.tryEval attrs).success then
16 if (builtins.tryEval attrs.drvPath).success
17 then { inherit (attrs) name drvPath; }
18 else { failed = true; }
19 else if attrs == null then {}
20 else { recurseForDerivations = true; } //
21 mapAttrs (n: v: let path' = path ++ [n]; in trace path' (recurse path' v)) attrs