summary refs log tree commit diff
path: root/pkgs/top-level/release.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2009-03-30 13:24:46 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2009-03-30 13:24:46 +0000
commit9ad89c5b56687316b4b0ef54b58a14b1ebaf3957 (patch)
treefa717180fbb342b989107d81add800af4b8c3dbd /pkgs/top-level/release.nix
parent5e294459e3573906fe039cbdae679e296bb5112d (diff)
downloadnixpkgs-9ad89c5b56687316b4b0ef54b58a14b1ebaf3957.tar
nixpkgs-9ad89c5b56687316b4b0ef54b58a14b1ebaf3957.tar.gz
nixpkgs-9ad89c5b56687316b4b0ef54b58a14b1ebaf3957.tar.bz2
nixpkgs-9ad89c5b56687316b4b0ef54b58a14b1ebaf3957.tar.lz
nixpkgs-9ad89c5b56687316b4b0ef54b58a14b1ebaf3957.tar.xz
nixpkgs-9ad89c5b56687316b4b0ef54b58a14b1ebaf3957.tar.zst
nixpkgs-9ad89c5b56687316b4b0ef54b58a14b1ebaf3957.zip
* Boost the priority of some jobs (like stdenv).
svn path=/nixpkgs/trunk/; revision=14780
Diffstat (limited to 'pkgs/top-level/release.nix')
-rw-r--r--pkgs/top-level/release.nix24
1 files changed, 21 insertions, 3 deletions
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index cd4c6077058..73ecb5660a7 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -4,6 +4,16 @@ let
 
   pkgs = allPackages {};
 
+  /* Set the Hydra scheduling priority for a job.  The default
+     priority (100) should be used for most jobs.  A different
+     priority should only be used for a few particularly interesting
+     jobs (in terms of giving feedback to developers), such as stdenv.
+  */
+  prio = level: job: toJob job // { schedulingPriority = level; };
+
+  toJob = x: if builtins.isAttrs x then x else
+    { type = "job"; systems = x; schedulingPriority = 100; };
+
   /* Perform a job on the given set of platforms.  The function `f' is
      called by Hydra for each platform, and should return some job
      to build on that platform.  `f' is passed the Nixpkgs collection
@@ -13,8 +23,15 @@ let
 
   /* Map an attribute of the form `foo = [platforms...]'  to `testOn
      [platforms...] (pkgs: pkgs.foo)'. */
-  mapTestOn = pkgs.lib.mapAttrsRecursive
-    (path: value: testOn value (pkgs: pkgs.lib.getAttrFromPath path pkgs));
+  mapTestOn = pkgs.lib.mapAttrsRecursiveCond
+    (as: !(as ? type && as.type == "job"))
+    (path: value:
+      let
+        job = toJob value;
+        getPkg = pkgs:
+          pkgs.lib.addMetaAttrs { schedulingPriority = toString job.schedulingPriority; }
+          (pkgs.lib.getAttrFromPath path pkgs);
+      in testOn job.systems getPkg);
 
   /* Common platform groups on which to test packages. */
   linux = ["i686-linux" "x86_64-linux"];
@@ -93,7 +110,7 @@ in {
   file = all;
   findutils = all;
   firefox2 = linux;
-  firefox3 = linux;
+  firefox3 = prio 150 linux;
   flex = all;
   flex2535 = all;
   gawk = all;
@@ -228,6 +245,7 @@ in {
   splashutils_15 = linux;
   sqlite = allBut "i686-cygwin";
   ssmtp = linux;
+  stdenv = prio 175 all;
   strace = linux;
   su = linux;
   subversion = all;