summary refs log tree commit diff
path: root/release.nix
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2012-02-23 12:00:05 +0000
committerPeter Simons <simons@cryp.to>2012-02-23 12:00:05 +0000
commitd16fdad9fd154cf7a4f1f73f1deee1f651cf9d7c (patch)
tree3f6b7136b23ba5f225895e48cdda1092c212a252 /release.nix
parentf0dfd7d06a8bf8889cb28d8c59d848e7544129a2 (diff)
downloadnixpkgs-d16fdad9fd154cf7a4f1f73f1deee1f651cf9d7c.tar
nixpkgs-d16fdad9fd154cf7a4f1f73f1deee1f651cf9d7c.tar.gz
nixpkgs-d16fdad9fd154cf7a4f1f73f1deee1f651cf9d7c.tar.bz2
nixpkgs-d16fdad9fd154cf7a4f1f73f1deee1f651cf9d7c.tar.lz
nixpkgs-d16fdad9fd154cf7a4f1f73f1deee1f651cf9d7c.tar.xz
nixpkgs-d16fdad9fd154cf7a4f1f73f1deee1f651cf9d7c.tar.zst
nixpkgs-d16fdad9fd154cf7a4f1f73f1deee1f651cf9d7c.zip
Revert "split release.nix into helpers and the jobs themselves".
Change r32480 was made due to a misunderstanding.

svn path=/nixos/trunk/; revision=32512
Diffstat (limited to 'release.nix')
-rw-r--r--release.nix96
1 files changed, 86 insertions, 10 deletions
diff --git a/release.nix b/release.nix
index 2d29e6fc686..44d87e154cd 100644
--- a/release.nix
+++ b/release.nix
@@ -1,9 +1,81 @@
 { nixpkgs ? ../nixpkgs }:
 
-let helpers = import ./lib/release-helpers.nix { inherit nixpkgs; };
+let
+
+
+  makeIso =
+    { module, type, description ? type, maintainers ? ["eelco"] }:
+    { nixosSrc ? {outPath = ./.; rev = 1234;}
+    , officialRelease ? false
+    , system ? "i686-linux"
+    }:
+
+    with import nixpkgs {inherit system;};
+
+    let
+
+      version = builtins.readFile ./VERSION + (if officialRelease then "" else "pre${toString nixosSrc.rev}");
+
+      versionModule =
+        { system.nixosVersion = version;
+          isoImage.isoBaseName = "nixos-${type}";
+        };
+
+      config = (import lib/eval-config.nix {
+        inherit system nixpkgs;
+        modules = [ module versionModule ];
+      }).config;
+
+      iso = config.system.build.isoImage;
+
+    in
+      # Declare the ISO as a build product so that it shows up in Hydra.
+      runCommand "nixos-iso-${version}"
+        { meta = {
+            description = "NixOS installation CD (${description}) - ISO image for ${system}";
+            maintainers = map (x: lib.getAttr x lib.maintainers) maintainers;
+          };
+          inherit iso;
+          passthru = { inherit config; };
+        }
+        ''
+          ensureDir $out/nix-support
+          echo "file iso" $iso/iso/*.iso* >> $out/nix-support/hydra-build-products
+        ''; # */
+
+
+  makeSystemTarball =
+    { module, maintainers ? ["viric"]}:
+    { nixosSrc ? {outPath = ./.; rev = 1234;}
+    , officialRelease ? false
+    , system ? "i686-linux"
+    }:
+
+    with import nixpkgs {inherit system;};
+    let
+      version = builtins.readFile ./VERSION + (if officialRelease then "" else "pre${toString nixosSrc.rev}");
+
+      versionModule = { system.nixosVersion = version; };
+
+      config = (import lib/eval-config.nix {
+        inherit system nixpkgs;
+        modules = [ module versionModule ];
+      }).config;
+
+      tarball = config.system.build.tarball;
+    in
+      tarball //
+        { meta = {
+            description = "NixOS system tarball for ${system} - ${stdenv.platform.name}";
+            maintainers = map (x: lib.getAttr x lib.maintainers) maintainers;
+          };
+          inherit config;
+        };
+
+
+  jobs = rec {
+
 
-in
-rec {
     tarball =
       { nixosSrc ? {outPath = ./.; rev = 1234;}
       , officialRelease ? false
@@ -48,40 +120,41 @@ rec {
       }).manual;
 
 
-    iso_minimal = helpers.makeIso {
+    iso_minimal = makeIso {
       module = ./modules/installer/cd-dvd/installation-cd-minimal.nix;
       type = "minimal";
     };
 
-    iso_graphical = helpers.makeIso {
+    iso_graphical = makeIso {
       module = ./modules/installer/cd-dvd/installation-cd-graphical.nix;
       type = "graphical";
     };
 
     # A variant with a more recent (but possibly less stable) kernel
     # that might support more hardware.
-    iso_new_kernel = helpers.makeIso {
+    iso_new_kernel = makeIso {
       module = ./modules/installer/cd-dvd/installation-cd-new-kernel.nix;
       type = "new-kernel";
     };
 
+
     # Provide a tarball that can be unpacked into an SD card, and easily
     # boot that system from uboot (like for the sheevaplug).
     # The pc variant helps preparing the expression for the system tarball
     # in a machine faster than the sheevpalug
-    system_tarball_pc = helpers.makeSystenTarball {
+    system_tarball_pc = makeSystemTarball {
       module = ./modules/installer/cd-dvd/system-tarball-pc.nix;
     };
 
     system_tarball_fuloong2f =
       assert builtins.currentSystem == "mips64-linux";
-      helpers.makeSystenTarball {
+      makeSystemTarball {
         module = ./modules/installer/cd-dvd/system-tarball-fuloong2f.nix;
       } { system = "mips64-linux"; };
 
     system_tarball_sheevaplug =
       assert builtins.currentSystem == "armv5tel-linux";
-      helpers.makeSystenTarball {
+      makeSystemTarball {
         module = ./modules/installer/cd-dvd/system-tarball-sheevaplug.nix;
       } { system = "armv5tel-linux"; };
 
@@ -119,4 +192,7 @@ rec {
         xfce = t.xfce.test;
       };
 
-}
+  };
+
+
+in jobs