summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-01 13:45:14 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-10 13:28:22 +0200
commit041da5a6f9dfa39b20a8b4f9743e57c15a131d36 (patch)
treeef5e0bb8e84f1738e97254c935187ff153f0cbfe
parent3293421dd3434cd84d660f3c4c3c81baf88bbd3d (diff)
downloadnixpkgs-041da5a6f9dfa39b20a8b4f9743e57c15a131d36.tar
nixpkgs-041da5a6f9dfa39b20a8b4f9743e57c15a131d36.tar.gz
nixpkgs-041da5a6f9dfa39b20a8b4f9743e57c15a131d36.tar.bz2
nixpkgs-041da5a6f9dfa39b20a8b4f9743e57c15a131d36.tar.lz
nixpkgs-041da5a6f9dfa39b20a8b4f9743e57c15a131d36.tar.xz
nixpkgs-041da5a6f9dfa39b20a8b4f9743e57c15a131d36.tar.zst
nixpkgs-041da5a6f9dfa39b20a8b4f9743e57c15a131d36.zip
Unify the Nixpkgs and NixOS version numbers
-rw-r--r--.version1
-rw-r--r--VERSION1
-rw-r--r--doc/manual.xml2
-rw-r--r--nixos/.version1
-rw-r--r--nixos/modules/installer/tools/get-version-suffix13
-rw-r--r--nixos/modules/misc/version.nix4
-rw-r--r--nixos/release.nix4
-rw-r--r--pkgs/top-level/make-tarball.nix14
8 files changed, 16 insertions, 24 deletions
diff --git a/.version b/.version
new file mode 100644
index 00000000000..381796ec8b7
--- /dev/null
+++ b/.version
@@ -0,0 +1 @@
+13.10
\ No newline at end of file
diff --git a/VERSION b/VERSION
deleted file mode 100644
index 9f8e9b69a33..00000000000
--- a/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-1.0
\ No newline at end of file
diff --git a/doc/manual.xml b/doc/manual.xml
index 927361ba5c8..d2c07859b28 100644
--- a/doc/manual.xml
+++ b/doc/manual.xml
@@ -5,7 +5,7 @@
 
     <title>Nixpkgs Manual</title>
 
-    <subtitle>Draft (Version <xi:include href="../VERSION"
+    <subtitle>Draft (Version <xi:include href="../.version"
     parse="text" />)</subtitle>
 
     <author>
diff --git a/nixos/.version b/nixos/.version
deleted file mode 100644
index eb28f45ff24..00000000000
--- a/nixos/.version
+++ /dev/null
@@ -1 +0,0 @@
-13.09
\ No newline at end of file
diff --git a/nixos/modules/installer/tools/get-version-suffix b/nixos/modules/installer/tools/get-version-suffix
index 76cec8d5dae..461fbf4d3d8 100644
--- a/nixos/modules/installer/tools/get-version-suffix
+++ b/nixos/modules/installer/tools/get-version-suffix
@@ -14,16 +14,9 @@ getVersion() {
     fi
 }
 
-if nixos=$(nix-instantiate --find-file nixos "$@"); then
-    getVersion $nixos
+if nixpkgs=$(nix-instantiate --find-file nixpkgs "$@"); then
+    getVersion $nixpkgs
     if [ -n "$rev" ]; then
-        suffix="pre-$rev"
-        if nixpkgs=$(nix-instantiate --find-file nixpkgs "$@"); then
-            getVersion $nixpkgs
-            if [ -n "$rev" ]; then
-                suffix+="-$rev"
-            fi
-        fi
-        echo $suffix
+        echo "pre-$rev"
     fi
 fi
diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix
index 20a03b44a2a..fa7baf36fb9 100644
--- a/nixos/modules/misc/version.nix
+++ b/nixos/modules/misc/version.nix
@@ -26,10 +26,10 @@ with pkgs.lib;
   config = {
 
     system.nixosVersion =
-      mkDefault (builtins.readFile ../../.version + config.system.nixosVersionSuffix);
+      mkDefault (builtins.readFile ../../../.version + config.system.nixosVersionSuffix);
 
     system.nixosVersionSuffix =
-      mkDefault (if builtins.pathExists ../../.version-suffix then builtins.readFile ../../.version-suffix else "pre-git");
+      mkDefault (if builtins.pathExists ../../../.version-suffix then builtins.readFile ../../../.version-suffix else "pre-git");
 
     # Note: code names must only increase in alphabetical order.
     system.nixosCodeName = "Aardvark";
diff --git a/nixos/release.nix b/nixos/release.nix
index 06fb43bf6d6..458e17aef46 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -5,8 +5,8 @@
 
 let
 
-  version = builtins.readFile ./.version;
-  versionSuffix = "pre${toString nixosSrc.revCount}_${nixosSrc.shortRev}-${nixpkgs.shortRev}";
+  version = builtins.readFile ../.version;
+  versionSuffix = "pre${toString nixpkgs.revCount}_${nixpkgs.shortRev}";
 
   systems = [ "x86_64-linux" "i686-linux" ];
 
diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix
index cea7e6539b0..62317df4163 100644
--- a/pkgs/top-level/make-tarball.nix
+++ b/pkgs/top-level/make-tarball.nix
@@ -1,4 +1,4 @@
-/* Hydra job to build a tarball for Nixpkgs from a SVN checkout.  It
+/* Hydra job to build a tarball for Nixpkgs from a Git checkout.  It
    also builds the documentation and tests whether the Nix expressions
    evaluate correctly. */
 
@@ -6,13 +6,13 @@
 
 with import nixpkgs.outPath {};
 
-releaseTools.sourceTarball {
+releaseTools.sourceTarball rec {
   name = "nixpkgs-tarball";
   src = nixpkgs;
-  inherit officialRelease;
 
-  version = builtins.readFile ../../VERSION;
-  versionSuffix = if officialRelease then "" else "pre${toString nixpkgs.revCount}_${nixpkgs.shortRev}";
+  inherit officialRelease;
+  version = builtins.readFile ../../.version;
+  versionSuffix = "pre${toString nixpkgs.revCount}_${nixpkgs.shortRev}";
 
   buildInputs = [
     lzma
@@ -26,8 +26,8 @@ releaseTools.sourceTarball {
   configurePhase = ''
     eval "$preConfigure"
     releaseName=nixpkgs-$VERSION$VERSION_SUFFIX
+    echo -n $VERSION_SUFFIX > .version-suffix
     echo "release name is $releaseName"
-    echo $releaseName > relname
   '';
 
   dontBuild = false;
@@ -47,7 +47,7 @@ releaseTools.sourceTarball {
     nix-store --init
 
     # Run the regression tests in `lib'.
-    res="$(nix-instantiate --eval-only --strict --show-trace pkgs/lib/tests.nix)"
+    res="$(nix-instantiate --eval-only --strict --show-trace lib/tests.nix)"
     if test "$res" != "[ ]"; then
         echo "regression tests for lib failed, got: $res"
         exit 1