2013-03-26 04:09:02 -07:00
|
|
|
|
# Evaluate `release.nix' like Hydra would. Too bad nix-instantiate
|
|
|
|
|
# can't to do this.
|
2010-02-05 06:14:43 -08:00
|
|
|
|
|
2012-01-12 08:59:58 -08:00
|
|
|
|
with import ../../pkgs/lib;
|
2010-02-05 06:14:43 -08:00
|
|
|
|
|
2012-01-12 08:59:58 -08:00
|
|
|
|
let
|
2013-01-14 14:28:18 -08:00
|
|
|
|
trace = if builtins.getEnv "VERBOSE" == "1" then builtins.trace else (x: y: y);
|
2010-02-05 06:14:43 -08:00
|
|
|
|
|
2013-03-26 03:53:36 -07:00
|
|
|
|
rel = removeAttrs (import ../../pkgs/top-level/release.nix { }) [ "tarball" "unstable" "xbursttools" ];
|
2010-02-05 06:14:43 -08:00
|
|
|
|
|
2012-01-12 08:59:58 -08:00
|
|
|
|
# Add the ‘recurseForDerivations’ attribute to ensure that
|
|
|
|
|
# nix-instantiate recurses into nested attribute sets.
|
|
|
|
|
recurse = attrs:
|
2013-03-26 03:53:36 -07:00
|
|
|
|
if (builtins.tryEval attrs).success then
|
|
|
|
|
if isDerivation attrs
|
|
|
|
|
then
|
|
|
|
|
if (builtins.tryEval attrs.outPath).success
|
|
|
|
|
then attrs
|
|
|
|
|
else { }
|
|
|
|
|
else { recurseForDerivations = true; } // mapAttrs (n: v: recurse v) attrs
|
|
|
|
|
else { };
|
|
|
|
|
|
|
|
|
|
in recurse rel
|