mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
Merge pull request #42 from DeterminateSystems/eelcodolstra/fh-425-give-determinate-nix-its-own-version-number
Show Determinate Nix version number
This commit is contained in:
commit
5f3b40dfcc
7 changed files with 13 additions and 4 deletions
1
.version-determinate
Normal file
1
.version-determinate
Normal file
|
@ -0,0 +1 @@
|
||||||
|
0.0.1
|
|
@ -158,6 +158,7 @@ in {
|
||||||
fileset = fileset.intersection baseFiles (fileset.unions ([
|
fileset = fileset.intersection baseFiles (fileset.unions ([
|
||||||
# For configure
|
# For configure
|
||||||
./.version
|
./.version
|
||||||
|
./.version-determinate
|
||||||
./configure.ac
|
./configure.ac
|
||||||
./m4
|
./m4
|
||||||
# TODO: do we really need README.md? It doesn't seem used in the build.
|
# TODO: do we really need README.md? It doesn't seem used in the build.
|
||||||
|
|
|
@ -294,7 +294,7 @@ void parseCmdLine(const std::string & programName, const Strings & args,
|
||||||
|
|
||||||
void printVersion(const std::string & programName)
|
void printVersion(const std::string & programName)
|
||||||
{
|
{
|
||||||
std::cout << fmt("%1% (Determinate Nix) %2%", programName, nixVersion) << std::endl;
|
std::cout << fmt("%s (Determinate Nix %s) %s", programName, determinateNixVersion, nixVersion) << std::endl;
|
||||||
if (verbosity > lvlInfo) {
|
if (verbosity > lvlInfo) {
|
||||||
Strings cfg;
|
Strings cfg;
|
||||||
#if HAVE_BOEHMGC
|
#if HAVE_BOEHMGC
|
||||||
|
|
|
@ -273,6 +273,8 @@ Path Settings::getDefaultSSLCertFile()
|
||||||
|
|
||||||
const std::string nixVersion = PACKAGE_VERSION;
|
const std::string nixVersion = PACKAGE_VERSION;
|
||||||
|
|
||||||
|
const std::string determinateNixVersion = DETERMINATE_NIX_VERSION;
|
||||||
|
|
||||||
NLOHMANN_JSON_SERIALIZE_ENUM(SandboxMode, {
|
NLOHMANN_JSON_SERIALIZE_ENUM(SandboxMode, {
|
||||||
{SandboxMode::smEnabled, true},
|
{SandboxMode::smEnabled, true},
|
||||||
{SandboxMode::smRelaxed, "relaxed"},
|
{SandboxMode::smRelaxed, "relaxed"},
|
||||||
|
|
|
@ -1247,6 +1247,8 @@ std::vector<Path> getUserConfigFiles();
|
||||||
|
|
||||||
extern const std::string nixVersion;
|
extern const std::string nixVersion;
|
||||||
|
|
||||||
|
extern const std::string determinateNixVersion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param loadConfig Whether to load configuration from `nix.conf`, `NIX_CONFIG`, etc. May be disabled for unit tests.
|
* @param loadConfig Whether to load configuration from `nix.conf`, `NIX_CONFIG`, etc. May be disabled for unit tests.
|
||||||
* @note When using libexpr, and/or libmain, This is not sufficient. See initNix().
|
* @note When using libexpr, and/or libmain, This is not sufficient. See initNix().
|
||||||
|
|
|
@ -73,7 +73,8 @@ libstore_CXXFLAGS += \
|
||||||
-DNIX_CONF_DIR=\"$(NIX_ROOT)$(sysconfdir)/nix\" \
|
-DNIX_CONF_DIR=\"$(NIX_ROOT)$(sysconfdir)/nix\" \
|
||||||
-DNIX_BIN_DIR=\"$(NIX_ROOT)$(bindir)\" \
|
-DNIX_BIN_DIR=\"$(NIX_ROOT)$(bindir)\" \
|
||||||
-DNIX_MAN_DIR=\"$(NIX_ROOT)$(mandir)\" \
|
-DNIX_MAN_DIR=\"$(NIX_ROOT)$(mandir)\" \
|
||||||
-DLSOF=\"$(NIX_ROOT)$(lsof)\"
|
-DLSOF=\"$(NIX_ROOT)$(lsof)\" \
|
||||||
|
-DDETERMINATE_NIX_VERSION=\""$(shell cat ./.version-determinate)"\"
|
||||||
|
|
||||||
ifeq ($(embedded_sandbox_shell),yes)
|
ifeq ($(embedded_sandbox_shell),yes)
|
||||||
libstore_CXXFLAGS += -DSANDBOX_SHELL=\"__embedded_sandbox_shell__\"
|
libstore_CXXFLAGS += -DSANDBOX_SHELL=\"__embedded_sandbox_shell__\"
|
||||||
|
|
|
@ -12,6 +12,8 @@ project('nix-store', 'cpp',
|
||||||
license : 'LGPL-2.1-or-later',
|
license : 'LGPL-2.1-or-later',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
fs = import('fs')
|
||||||
|
|
||||||
cxx = meson.get_compiler('cpp')
|
cxx = meson.get_compiler('cpp')
|
||||||
|
|
||||||
subdir('build-utils-meson/deps-lists')
|
subdir('build-utils-meson/deps-lists')
|
||||||
|
@ -21,6 +23,8 @@ configdata = configuration_data()
|
||||||
# TODO rename, because it will conflict with downstream projects
|
# TODO rename, because it will conflict with downstream projects
|
||||||
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
|
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||||
|
|
||||||
|
configdata.set_quoted('DETERMINATE_NIX_VERSION', fs.read('./.version-determinate'))
|
||||||
|
|
||||||
configdata.set_quoted('SYSTEM', host_machine.system())
|
configdata.set_quoted('SYSTEM', host_machine.system())
|
||||||
|
|
||||||
deps_private_maybe_subproject = [
|
deps_private_maybe_subproject = [
|
||||||
|
@ -320,8 +324,6 @@ else
|
||||||
subdir('unix')
|
subdir('unix')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
fs = import('fs')
|
|
||||||
|
|
||||||
prefix = get_option('prefix')
|
prefix = get_option('prefix')
|
||||||
# For each of these paths, assume that it is relative to the prefix unless
|
# For each of these paths, assume that it is relative to the prefix unless
|
||||||
# it is already an absolute path (which is the default for store-dir, state-dir, and log-dir).
|
# it is already an absolute path (which is the default for store-dir, state-dir, and log-dir).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue