summary refs log tree commit diff
path: root/release.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-04-10 20:28:06 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-04-10 20:28:06 +0000
commit871b4bd43aca4ccf0b6f3ee9fa704a2a1cde1b70 (patch)
treec02e26e3c4650e2b8b8690b8c61c0fccdacd34a1 /release.nix
parentf9ac67c67feecf48f1bf3717b31d1b5e1014e3d1 (diff)
downloadnixpkgs-871b4bd43aca4ccf0b6f3ee9fa704a2a1cde1b70.tar
nixpkgs-871b4bd43aca4ccf0b6f3ee9fa704a2a1cde1b70.tar.gz
nixpkgs-871b4bd43aca4ccf0b6f3ee9fa704a2a1cde1b70.tar.bz2
nixpkgs-871b4bd43aca4ccf0b6f3ee9fa704a2a1cde1b70.tar.lz
nixpkgs-871b4bd43aca4ccf0b6f3ee9fa704a2a1cde1b70.tar.xz
nixpkgs-871b4bd43aca4ccf0b6f3ee9fa704a2a1cde1b70.tar.zst
nixpkgs-871b4bd43aca4ccf0b6f3ee9fa704a2a1cde1b70.zip
* Consistently include the Nixpkgs revision in the NixOS version
  string.

svn path=/nixos/trunk/; revision=33729
Diffstat (limited to 'release.nix')
-rw-r--r--release.nix14
1 files changed, 8 insertions, 6 deletions
diff --git a/release.nix b/release.nix
index d336a1bdf8d..286e314ac1e 100644
--- a/release.nix
+++ b/release.nix
@@ -4,18 +4,20 @@
 
 let
 
+  versionSuffix = "pre${toString nixosSrc.rev}-${toString nixpkgs.rev}";
+
 
   makeIso =
     { module, type, description ? type, maintainers ? ["eelco"] }:
     { officialRelease ? false
-    , system ? "i686-linux"
+    , system ? builtins.currentSystem
     }:
 
     with import <nixpkgs> {inherit system;};
 
     let
 
-      version = builtins.readFile ./VERSION + (if officialRelease then "" else "pre${toString nixosSrc.rev}");
+      version = builtins.readFile ./VERSION + (lib.optionalString (!officialRelease) versionSuffix);
 
       versionModule =
         { system.nixosVersion = version;
@@ -48,12 +50,12 @@ let
   makeSystemTarball =
     { module, maintainers ? ["viric"]}:
     { officialRelease ? false
-    , system ? "i686-linux"
+    , system ? builtins.currentSystem
     }:
 
     with import <nixpkgs> {inherit system;};
     let
-      version = builtins.readFile ./VERSION + (if officialRelease then "" else "pre${toString nixosSrc.rev}");
+      version = builtins.readFile ./VERSION + (lib.optionalString (!officialRelease) versionSuffix);
 
       versionModule = { system.nixosVersion = version; };
 
@@ -113,7 +115,7 @@ let
 
         src = nixosSrc;
 
-        inherit officialRelease;
+        inherit officialRelease versionSuffix;
 
         buildInputs = [ nixUnstable ];
 
@@ -124,7 +126,7 @@ let
           '';
 
         distPhase = ''
-          releaseName=nixos-$VERSION$VERSION_SUFFIX-${toString nixpkgs.rev}
+          releaseName=nixos-$VERSION$VERSION_SUFFIX
           ensureDir "$out/tarballs"
           mkdir ../$releaseName
           cp -prd . ../$releaseName/nixos