diff options
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/Makefile.am | 1 | ||||
-rw-r--r-- | src/libstore/globals.cc | 3 | ||||
-rw-r--r-- | src/libstore/globals.hh | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/Makefile.am b/src/libstore/Makefile.am index 46e18be23163..3dfb1e0c3a24 100644 --- a/src/libstore/Makefile.am +++ b/src/libstore/Makefile.am @@ -23,6 +23,7 @@ AM_CXXFLAGS = -Wall \ -DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \ -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \ -DNIX_BIN_DIR=\"$(bindir)\" \ + -DNIX_VERSION=\"$(VERSION)\" \ -I$(srcdir)/.. -I$(srcdir)/../libutil \ -I$(srcdir)/../libstore diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index 7b881d1d2ff8..bb453a45199e 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -197,4 +197,7 @@ Settings::SettingsMap Settings::getOverrides() } +const string nixVersion = NIX_VERSION; + + } diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index d25ee6adca30..953eed9c36a2 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -190,4 +190,7 @@ private: extern Settings settings; +extern const string nixVersion; + + } |