From b38647766db69308c789da46fe9f3f2b89e782d9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 20 Mar 2013 15:52:08 +0100 Subject: [PATCH] =?UTF-8?q?releaseTools:=20Add=20=E2=80=98aggregate?= =?UTF-8?q?=E2=80=99=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An aggregate is a trivial build that depends on other builds. This is intended to provide a declarative replacement of Hydra's "view" mechanism. For instance, you can define an aggregate named "critical" that depends on a selected set of jobs: critical = releaseTools.aggregate { name = "foo-${tarball.version}"; members = [ tarball build.x86_64-linux ... ]; meta.description = "Release-critical builds"; }; The "critical" build will only succeed if all its members (dependencies) succeed. --- pkgs/build-support/release/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/build-support/release/default.nix b/pkgs/build-support/release/default.nix index 2cf2b1f8d6d9..20dcf2fbd0cd 100644 --- a/pkgs/build-support/release/default.nix +++ b/pkgs/build-support/release/default.nix @@ -39,4 +39,14 @@ rec { { inherit stdenv vmTools checkinstall; } // args); + aggregate = + { name, members, meta ? { } }: + pkgs.runCommand name + { inherit members meta; + _hydraAggregate = true; + } + '' + echo $members > $out + ''; + }