about summary refs log tree commit diff
path: root/src/libmain/shared.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-11-27T12·29+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-11-27T12·29+0100
commit8b8ee53bc73769bb25d967ba259dabc9b23e2e6f (patch)
tree79aab3b316d632fc663c1c78da25a88425f4275e /src/libmain/shared.cc
parent5943f41b8bd95b8559cb6768bb0a1151f6bee68d (diff)
Add builtin constants ‘langVersion’ and ‘nixVersion’
The integer constant ‘langVersion’ denotes the current language
version.  It gets increased every time a language feature is
added/changed/removed.  It's currently 1.

The string constant ‘nixVersion’ contains the current Nix version,
e.g. "1.2pre2980_9de6bc5".
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r--src/libmain/shared.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 2cf5b08df32d..ead3fc017ae2 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -180,7 +180,7 @@ static void initAndRun(int argc, char * * argv)
             return;
         }
         else if (arg == "--version") {
-            std::cout << format("%1% (Nix) %2%") % programId % NIX_VERSION << std::endl;
+            std::cout << format("%1% (Nix) %2%") % programId % nixVersion << std::endl;
             return;
         }
         else if (arg == "--keep-failed" || arg == "-K")