diff options
author | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-01-14 21:34:37 +0000 |
---|---|---|
committer | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-01-14 21:34:37 +0000 |
commit | 0c79434ccbaf82ab89290fffaf4bb4d444d2f874 (patch) | |
tree | 92457d7f731a9182f812d149a3bbc9646d53f1a8 /maintainers | |
parent | 9ee0a9df9bc69e72278b8d34093238428fa3ea82 (diff) | |
parent | 5fe8b64ceadac39a9badbd4afe6120d7157456c8 (diff) |
svn merge ^/nixpkgs/trunk
svn path=/nixpkgs/branches/stdenv-updates/; revision=31567
Diffstat (limited to 'maintainers')
-rw-r--r-- | maintainers/scripts/eval-release.nix | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/maintainers/scripts/eval-release.nix b/maintainers/scripts/eval-release.nix index 57395f8cc680c..0afb88eef1388 100644 --- a/maintainers/scripts/eval-release.nix +++ b/maintainers/scripts/eval-release.nix @@ -2,23 +2,30 @@ # attribute with the expected `system' argument). Too bad # nix-instantiate can't to do this. -let +with import ../../pkgs/lib; - lib = (import ../.. {}).lib; +let rel = removeAttrs (import ../../pkgs/top-level/release.nix) [ "tarball" "xbursttools" ]; - seqList = xs: res: lib.fold (x: xs: lib.seq x xs) res xs; + seqList = xs: res: fold (x: xs: seq x xs) res xs; - strictAttrs = as: seqList (lib.attrValues as) as; + strictAttrs = as: seqList (attrValues as) as; maybe = as: let y = builtins.tryEval (strictAttrs as); in if y.success then y.value else builtins.trace "FAIL" null; - call = attrs: lib.flip lib.mapAttrs attrs - (n: v: builtins.trace n ( + call = attrs: flip mapAttrs attrs + (n: v: /* builtins.trace n */ ( if builtins.isFunction v then maybe (v { system = "x86_64-linux"; }) else if builtins.isAttrs v then call v else null )); -in call rel + # Add the ‘recurseForDerivations’ attribute to ensure that + # nix-instantiate recurses into nested attribute sets. + recurse = attrs: + if isDerivation attrs + then attrs + else { recurseForDerivations = true; } // mapAttrs (n: v: recurse v) attrs; + +in recurse (call rel) |