mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
Merge pull request #12498 from NixOS/fix-cli-fine-version
Restore detailed Nix CLI version
This commit is contained in:
commit
da5109835b
28 changed files with 34 additions and 181 deletions
|
@ -242,7 +242,7 @@ Path Settings::getDefaultSSLCertFile()
|
|||
return "";
|
||||
}
|
||||
|
||||
const std::string nixVersion = PACKAGE_VERSION;
|
||||
std::string nixVersion = PACKAGE_VERSION;
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(SandboxMode, {
|
||||
{SandboxMode::smEnabled, true},
|
||||
|
|
|
@ -1248,7 +1248,15 @@ void loadConfFile(AbstractConfig & config);
|
|||
// Used by the Settings constructor
|
||||
std::vector<Path> getUserConfigFiles();
|
||||
|
||||
extern const std::string nixVersion;
|
||||
/**
|
||||
* The version of Nix itself.
|
||||
*
|
||||
* This is not `const`, so that the Nix CLI can provide a more detailed version
|
||||
* number including the git revision, without having to "re-compile" the entire
|
||||
* set of Nix libraries to include that version, even when those libraries are
|
||||
* not affected by the change.
|
||||
*/
|
||||
extern std::string nixVersion;
|
||||
|
||||
/**
|
||||
* @param loadConfig Whether to load configuration from `nix.conf`, `NIX_CONFIG`, etc. May be disabled for unit tests.
|
||||
|
|
|
@ -69,14 +69,6 @@ mkMesonLibrary (finalAttrs: {
|
|||
nlohmann_json
|
||||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
chmod u+w ./.version
|
||||
echo ${version} > ../../.version
|
||||
'';
|
||||
|
||||
mesonFlags =
|
||||
[
|
||||
(lib.mesonEnable "seccomp-sandboxing" stdenv.hostPlatform.isLinux)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue