mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
No more globals.hh in headers
This is needed to rearrange include order, but I also think it is a good thing anyways, as we seek to reduce the use of global settings variables over time.
This commit is contained in:
parent
bce29ab2cf
commit
52212635db
46 changed files with 120 additions and 13 deletions
|
|
@ -15,6 +15,7 @@
|
||||||
#include "nix/fetchers/fetch-to-store.hh"
|
#include "nix/fetchers/fetch-to-store.hh"
|
||||||
#include "nix/cmd/compatibility-settings.hh"
|
#include "nix/cmd/compatibility-settings.hh"
|
||||||
#include "nix/expr/eval-settings.hh"
|
#include "nix/expr/eval-settings.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
#include "nix/expr/eval.hh"
|
#include "nix/expr/eval.hh"
|
||||||
#include "nix/expr/eval-inline.hh"
|
#include "nix/expr/eval-inline.hh"
|
||||||
#include "nix/store/store-api.hh"
|
#include "nix/store/store-api.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
// Need specialization involving `SymbolStr` just in this one module.
|
// Need specialization involving `SymbolStr` just in this one module.
|
||||||
#include "nix/util/strings-inline.hh"
|
#include "nix/util/strings-inline.hh"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
#include "nix/util/exit.hh"
|
#include "nix/util/exit.hh"
|
||||||
#include "nix/util/types.hh"
|
#include "nix/util/types.hh"
|
||||||
#include "nix/util/util.hh"
|
#include "nix/util/util.hh"
|
||||||
|
#include "nix/util/environment-variables.hh"
|
||||||
#include "nix/store/store-api.hh"
|
#include "nix/store/store-api.hh"
|
||||||
#include "nix/store/derivations.hh"
|
#include "nix/store/derivations.hh"
|
||||||
#include "nix/store/downstream-placeholder.hh"
|
#include "nix/store/downstream-placeholder.hh"
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include "nix/expr/eval-settings.hh"
|
#include "nix/expr/eval-settings.hh"
|
||||||
#include "nix/expr/gc-small-vector.hh"
|
#include "nix/expr/gc-small-vector.hh"
|
||||||
#include "nix/expr/json-to-value.hh"
|
#include "nix/expr/json-to-value.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
#include "nix/store/names.hh"
|
#include "nix/store/names.hh"
|
||||||
#include "nix/store/path-references.hh"
|
#include "nix/store/path-references.hh"
|
||||||
#include "nix/store/store-api.hh"
|
#include "nix/store/store-api.hh"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include "nix/expr/eval-inline.hh"
|
#include "nix/expr/eval-inline.hh"
|
||||||
#include "nix/store/derivations.hh"
|
#include "nix/store/derivations.hh"
|
||||||
#include "nix/store/store-api.hh"
|
#include "nix/store/store-api.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
#include "nix/store/realisation.hh"
|
#include "nix/store/realisation.hh"
|
||||||
#include "nix/store/make-content-addressed.hh"
|
#include "nix/store/make-content-addressed.hh"
|
||||||
#include "nix/util/url.hh"
|
#include "nix/util/url.hh"
|
||||||
|
#include "nix/util/environment-variables.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "nix/store/store-open.hh"
|
#include "nix/store/store-open.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
#include "nix/fetchers/fetch-settings.hh"
|
#include "nix/fetchers/fetch-settings.hh"
|
||||||
#include "nix/fetchers/fetchers.hh"
|
#include "nix/fetchers/fetchers.hh"
|
||||||
#include "nix/fetchers/git-utils.hh"
|
#include "nix/fetchers/git-utils.hh"
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
#include "nix/store/sqlite.hh"
|
#include "nix/store/sqlite.hh"
|
||||||
#include "nix/util/sync.hh"
|
#include "nix/util/sync.hh"
|
||||||
#include "nix/store/store-api.hh"
|
#include "nix/store/store-api.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "nix/store/store-api.hh"
|
#include "nix/store/store-api.hh"
|
||||||
#include "nix/store/store-open.hh"
|
#include "nix/store/store-open.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
#include "nix/store/common-protocol.hh"
|
#include "nix/store/common-protocol.hh"
|
||||||
#include "nix/store/common-protocol-impl.hh"
|
#include "nix/store/common-protocol-impl.hh"
|
||||||
#include "nix/store/local-store.hh" // TODO remove, along with remaining downcasts
|
#include "nix/store/local-store.hh" // TODO remove, along with remaining downcasts
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
#include "nix/util/compression.hh"
|
#include "nix/util/compression.hh"
|
||||||
#include "nix/store/common-protocol.hh"
|
#include "nix/store/common-protocol.hh"
|
||||||
#include "nix/store/common-protocol-impl.hh" // Don't remove is actually needed
|
#include "nix/store/common-protocol-impl.hh" // Don't remove is actually needed
|
||||||
#include "nix/store/local-store.hh" // TODO remove, along with remaining downcasts
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
#include "nix/store/build/substitution-goal.hh"
|
#include "nix/store/build/substitution-goal.hh"
|
||||||
#include "nix/util/callback.hh"
|
#include "nix/util/callback.hh"
|
||||||
#include "nix/store/store-open.hh"
|
#include "nix/store/store-open.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
#include "nix/store/build/goal.hh"
|
#include "nix/store/build/goal.hh"
|
||||||
#include "nix/store/build/worker.hh"
|
#include "nix/store/build/worker.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@
|
||||||
#include "nix/store/nar-info.hh"
|
#include "nix/store/nar-info.hh"
|
||||||
#include "nix/util/finally.hh"
|
#include "nix/util/finally.hh"
|
||||||
#include "nix/util/signals.hh"
|
#include "nix/util/signals.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
#include <coroutine>
|
#include <coroutine>
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
# include "nix/store/build/hook-instance.hh"
|
# include "nix/store/build/hook-instance.hh"
|
||||||
#endif
|
#endif
|
||||||
#include "nix/util/signals.hh"
|
#include "nix/util/signals.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#include "nix/store/builtins.hh"
|
#include "nix/store/builtins.hh"
|
||||||
#include "nix/store/filetransfer.hh"
|
#include "nix/store/filetransfer.hh"
|
||||||
#include "nix/store/store-api.hh"
|
#include "nix/store/store-api.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
#include "nix/util/archive.hh"
|
#include "nix/util/archive.hh"
|
||||||
#include "nix/util/compression.hh"
|
#include "nix/util/compression.hh"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
#include "nix/util/args.hh"
|
#include "nix/util/args.hh"
|
||||||
#include "nix/util/git.hh"
|
#include "nix/util/git.hh"
|
||||||
#include "nix/util/logging.hh"
|
#include "nix/util/logging.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
#ifndef _WIN32 // TODO need graceful async exit support on Windows?
|
#ifndef _WIN32 // TODO need graceful async exit support on Windows?
|
||||||
# include "nix/util/monitor-fd.hh"
|
# include "nix/util/monitor-fd.hh"
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include "nix/store/store-api.hh"
|
#include "nix/store/store-api.hh"
|
||||||
#include "nix/util/types.hh"
|
#include "nix/util/types.hh"
|
||||||
#include "nix/util/util.hh"
|
#include "nix/util/util.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
#include "nix/util/environment-variables.hh"
|
#include "nix/util/environment-variables.hh"
|
||||||
#include "nix/util/experimental-features.hh"
|
#include "nix/util/experimental-features.hh"
|
||||||
#include "nix/util/users.hh"
|
#include "nix/util/users.hh"
|
||||||
|
#include "nix/store/build/derivation-builder.hh"
|
||||||
|
|
||||||
#include "nix/store/config.hh"
|
#include "nix/store/config.hh"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,15 +22,31 @@ struct LocalFSStoreConfig : virtual StoreConfig
|
||||||
|
|
||||||
OptionalPathSetting rootDir{this, std::nullopt, "root", "Directory prefixed to all other paths."};
|
OptionalPathSetting rootDir{this, std::nullopt, "root", "Directory prefixed to all other paths."};
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An indirection so that we don't need to refer to global settings
|
||||||
|
* in headers.
|
||||||
|
*/
|
||||||
|
static Path getDefaultStateDir();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An indirection so that we don't need to refer to global settings
|
||||||
|
* in headers.
|
||||||
|
*/
|
||||||
|
static Path getDefaultLogDir();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
PathSetting stateDir{
|
PathSetting stateDir{
|
||||||
this,
|
this,
|
||||||
rootDir.get() ? *rootDir.get() + "/nix/var/nix" : settings.nixStateDir,
|
rootDir.get() ? *rootDir.get() + "/nix/var/nix" : getDefaultStateDir(),
|
||||||
"state",
|
"state",
|
||||||
"Directory where Nix stores state."};
|
"Directory where Nix stores state."};
|
||||||
|
|
||||||
PathSetting logDir{
|
PathSetting logDir{
|
||||||
this,
|
this,
|
||||||
rootDir.get() ? *rootDir.get() + "/nix/var/log/nix" : settings.nixLogDir,
|
rootDir.get() ? *rootDir.get() + "/nix/var/log/nix" : getDefaultLogDir(),
|
||||||
"log",
|
"log",
|
||||||
"directory where Nix stores log files."};
|
"directory where Nix stores log files."};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,19 @@ struct LocalStoreConfig : std::enable_shared_from_this<LocalStoreConfig>,
|
||||||
|
|
||||||
LocalStoreConfig(std::string_view scheme, std::string_view authority, const Params & params);
|
LocalStoreConfig(std::string_view scheme, std::string_view authority, const Params & params);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An indirection so that we don't need to refer to global settings
|
||||||
|
* in headers.
|
||||||
|
*/
|
||||||
|
bool getDefaultRequireSigs();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
Setting<bool> requireSigs{
|
Setting<bool> requireSigs{
|
||||||
this,
|
this,
|
||||||
settings.requireSigs,
|
getDefaultRequireSigs(),
|
||||||
"require-sigs",
|
"require-sigs",
|
||||||
"Whether store paths copied into this store should have a trusted signature."};
|
"Whether store paths copied into this store should have a trusted signature."};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
///@file
|
///@file
|
||||||
|
|
||||||
#include "nix/store/local-store.hh"
|
#include "nix/store/store-api.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
class LocalStore;
|
||||||
|
struct LocalStoreConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A restricted store has a pointer to one of these, which manages the
|
* A restricted store has a pointer to one of these, which manages the
|
||||||
* restrictions that are in place.
|
* restrictions that are in place.
|
||||||
|
|
@ -55,6 +58,6 @@ struct RestrictionContext
|
||||||
/**
|
/**
|
||||||
* Create a shared pointer to a restricted store.
|
* Create a shared pointer to a restricted store.
|
||||||
*/
|
*/
|
||||||
ref<Store> makeRestrictedStore(ref<LocalStore::Config> config, ref<LocalStore> next, RestrictionContext & context);
|
ref<Store> makeRestrictedStore(ref<LocalStoreConfig> config, ref<LocalStore> next, RestrictionContext & context);
|
||||||
|
|
||||||
} // namespace nix
|
} // namespace nix
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
#include "nix/util/serialise.hh"
|
#include "nix/util/serialise.hh"
|
||||||
#include "nix/util/lru-cache.hh"
|
#include "nix/util/lru-cache.hh"
|
||||||
#include "nix/util/sync.hh"
|
#include "nix/util/sync.hh"
|
||||||
#include "nix/store/globals.hh"
|
|
||||||
#include "nix/util/configuration.hh"
|
#include "nix/util/configuration.hh"
|
||||||
#include "nix/store/path-info.hh"
|
#include "nix/store/path-info.hh"
|
||||||
#include "nix/util/repair-flag.hh"
|
#include "nix/util/repair-flag.hh"
|
||||||
|
|
@ -89,9 +88,19 @@ struct StoreConfigBase : Config
|
||||||
{
|
{
|
||||||
using Config::Config;
|
using Config::Config;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An indirection so that we don't need to refer to global settings
|
||||||
|
* in headers.
|
||||||
|
*/
|
||||||
|
static Path getDefaultNixStoreDir();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
const PathSetting storeDir_{
|
const PathSetting storeDir_{
|
||||||
this,
|
this,
|
||||||
settings.nixStore,
|
getDefaultNixStoreDir(),
|
||||||
"store",
|
"store",
|
||||||
R"(
|
R"(
|
||||||
Logical location of the Nix store, usually
|
Logical location of the Nix store, usually
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
#include "nix/store/path.hh"
|
#include "nix/store/path.hh"
|
||||||
#include "nix/util/hash.hh"
|
#include "nix/util/hash.hh"
|
||||||
#include "nix/store/content-address.hh"
|
#include "nix/store/content-address.hh"
|
||||||
#include "nix/store/globals.hh"
|
|
||||||
#include "nix/util/configuration.hh"
|
#include "nix/util/configuration.hh"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,12 @@ ref<Store> openStore(StoreReference && storeURI);
|
||||||
* Opens the store at `uri`, where `uri` is in the format expected by
|
* Opens the store at `uri`, where `uri` is in the format expected by
|
||||||
* `StoreReference::parse`
|
* `StoreReference::parse`
|
||||||
*/
|
*/
|
||||||
ref<Store> openStore(
|
ref<Store> openStore(const std::string & uri, const StoreReference::Params & extraParams = StoreReference::Params());
|
||||||
const std::string & uri = settings.storeUri.get(),
|
|
||||||
const StoreReference::Params & extraParams = StoreReference::Params());
|
/**
|
||||||
|
* Short-hand which opens the default store, according to global settings
|
||||||
|
*/
|
||||||
|
ref<Store> openStore();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the default substituter stores, defined by the
|
* @return the default substituter stores, defined by the
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
#include "nix/store/derivations.hh"
|
#include "nix/store/derivations.hh"
|
||||||
#include "nix/util/callback.hh"
|
#include "nix/util/callback.hh"
|
||||||
#include "nix/store/store-registration.hh"
|
#include "nix/store/store-registration.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,16 @@
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
Path LocalFSStoreConfig::getDefaultStateDir()
|
||||||
|
{
|
||||||
|
return settings.nixStateDir;
|
||||||
|
}
|
||||||
|
|
||||||
|
Path LocalFSStoreConfig::getDefaultLogDir()
|
||||||
|
{
|
||||||
|
return settings.nixLogDir;
|
||||||
|
}
|
||||||
|
|
||||||
LocalFSStoreConfig::LocalFSStoreConfig(PathView rootDir, const Params & params)
|
LocalFSStoreConfig::LocalFSStoreConfig(PathView rootDir, const Params & params)
|
||||||
: StoreConfig(params)
|
: StoreConfig(params)
|
||||||
// Default `?root` from `rootDir` if non set
|
// Default `?root` from `rootDir` if non set
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,11 @@ ref<Store> LocalStore::Config::openStore() const
|
||||||
return make_ref<LocalStore>(ref{shared_from_this()});
|
return make_ref<LocalStore>(ref{shared_from_this()});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LocalStoreConfig::getDefaultRequireSigs()
|
||||||
|
{
|
||||||
|
return settings.requireSigs;
|
||||||
|
}
|
||||||
|
|
||||||
struct LocalStore::State::Stmts
|
struct LocalStore::State::Stmts
|
||||||
{
|
{
|
||||||
/* Some precompiled SQLite statements. */
|
/* Some precompiled SQLite statements. */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
#include "nix/store/profiles.hh"
|
#include "nix/store/profiles.hh"
|
||||||
#include "nix/util/signals.hh"
|
#include "nix/util/signals.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
#include "nix/store/store-api.hh"
|
#include "nix/store/store-api.hh"
|
||||||
#include "nix/store/local-fs-store.hh"
|
#include "nix/store/local-fs-store.hh"
|
||||||
#include "nix/util/users.hh"
|
#include "nix/util/users.hh"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include "nix/store/build-result.hh"
|
#include "nix/store/build-result.hh"
|
||||||
#include "nix/util/callback.hh"
|
#include "nix/util/callback.hh"
|
||||||
#include "nix/store/realisation.hh"
|
#include "nix/store/realisation.hh"
|
||||||
|
#include "nix/store/local-store.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,11 @@ using json = nlohmann::json;
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
Path StoreConfigBase::getDefaultNixStoreDir()
|
||||||
|
{
|
||||||
|
return settings.nixStore;
|
||||||
|
}
|
||||||
|
|
||||||
StoreConfig::StoreConfig(const Params & params)
|
StoreConfig::StoreConfig(const Params & params)
|
||||||
: StoreConfigBase(params)
|
: StoreConfigBase(params)
|
||||||
, StoreDirConfig{storeDir_}
|
, StoreDirConfig{storeDir_}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,15 @@
|
||||||
#include "nix/store/store-open.hh"
|
#include "nix/store/store-open.hh"
|
||||||
#include "nix/store/local-store.hh"
|
#include "nix/store/local-store.hh"
|
||||||
#include "nix/store/uds-remote-store.hh"
|
#include "nix/store/uds-remote-store.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
ref<Store> openStore()
|
||||||
|
{
|
||||||
|
return openStore(settings.storeUri.get());
|
||||||
|
}
|
||||||
|
|
||||||
ref<Store> openStore(const std::string & uri, const Store::Config::Params & extraParams)
|
ref<Store> openStore(const std::string & uri, const Store::Config::Params & extraParams)
|
||||||
{
|
{
|
||||||
return openStore(StoreReference::parse(uri, extraParams));
|
return openStore(StoreReference::parse(uri, extraParams));
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include "nix/util/unix-domain-socket.hh"
|
#include "nix/util/unix-domain-socket.hh"
|
||||||
#include "nix/store/worker-protocol.hh"
|
#include "nix/store/worker-protocol.hh"
|
||||||
#include "nix/store/store-registration.hh"
|
#include "nix/store/store-registration.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
#include "nix/util/posix-source-accessor.hh"
|
#include "nix/util/posix-source-accessor.hh"
|
||||||
#include "nix/store/restricted-store.hh"
|
#include "nix/store/restricted-store.hh"
|
||||||
#include "nix/store/user-lock.hh"
|
#include "nix/store/user-lock.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
#include "nix/store/local-store.hh"
|
#include "nix/store/local-store.hh"
|
||||||
#include "nix/cmd/legacy.hh"
|
#include "nix/cmd/legacy.hh"
|
||||||
#include "nix/util/experimental-features.hh"
|
#include "nix/util/experimental-features.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
using namespace nix;
|
using namespace nix;
|
||||||
using std::cin;
|
using std::cin;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include "nix/store/store-api.hh"
|
#include "nix/store/store-api.hh"
|
||||||
#include "nix/store/local-fs-store.hh"
|
#include "nix/store/local-fs-store.hh"
|
||||||
#include "nix/expr/eval-inline.hh"
|
#include "nix/expr/eval-inline.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
namespace nix::fs {
|
namespace nix::fs {
|
||||||
using namespace std::filesystem;
|
using namespace std::filesystem;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
#include "nix/store/local-fs-store.hh"
|
#include "nix/store/local-fs-store.hh"
|
||||||
#include "nix/store/worker-protocol.hh"
|
#include "nix/store/worker-protocol.hh"
|
||||||
#include "nix/util/executable-path.hh"
|
#include "nix/util/executable-path.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
namespace nix::fs {
|
namespace nix::fs {
|
||||||
using namespace std::filesystem;
|
using namespace std::filesystem;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include "nix/main/common-args.hh"
|
#include "nix/main/common-args.hh"
|
||||||
#include "nix/main/shared.hh"
|
#include "nix/main/shared.hh"
|
||||||
#include "nix/store/store-api.hh"
|
#include "nix/store/store-api.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
#include "nix/store/outputs-spec.hh"
|
#include "nix/store/outputs-spec.hh"
|
||||||
#include "nix/store/derivations.hh"
|
#include "nix/store/derivations.hh"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
#include "run.hh"
|
#include "run.hh"
|
||||||
#include "nix/util/strings.hh"
|
#include "nix/util/strings.hh"
|
||||||
#include "nix/util/executable-path.hh"
|
#include "nix/util/executable-path.hh"
|
||||||
|
#include "nix/util/environment-variables.hh"
|
||||||
|
|
||||||
using namespace nix;
|
using namespace nix;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#include "flake-command.hh"
|
|
||||||
#include "nix/main/common-args.hh"
|
#include "nix/main/common-args.hh"
|
||||||
#include "nix/main/shared.hh"
|
#include "nix/main/shared.hh"
|
||||||
#include "nix/expr/eval.hh"
|
#include "nix/expr/eval.hh"
|
||||||
|
|
@ -17,6 +16,7 @@
|
||||||
#include "nix/util/users.hh"
|
#include "nix/util/users.hh"
|
||||||
#include "nix/fetchers/fetch-to-store.hh"
|
#include "nix/fetchers/fetch-to-store.hh"
|
||||||
#include "nix/store/local-fs-store.hh"
|
#include "nix/store/local-fs-store.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
@ -24,6 +24,9 @@
|
||||||
|
|
||||||
#include "nix/util/strings-inline.hh"
|
#include "nix/util/strings-inline.hh"
|
||||||
|
|
||||||
|
// FIXME is this supposed to be private or not?
|
||||||
|
#include "flake-command.hh"
|
||||||
|
|
||||||
namespace nix::fs {
|
namespace nix::fs {
|
||||||
using namespace std::filesystem;
|
using namespace std::filesystem;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
#include "nix/store/local-fs-store.hh"
|
#include "nix/store/local-fs-store.hh"
|
||||||
#include "nix/cmd/installable-derived-path.hh"
|
#include "nix/cmd/installable-derived-path.hh"
|
||||||
#include "nix/util/environment-variables.hh"
|
#include "nix/util/environment-variables.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
#include "run.hh"
|
#include "run.hh"
|
||||||
|
|
||||||
using namespace nix;
|
using namespace nix;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#include "nix/cmd/command.hh"
|
#include "nix/cmd/command.hh"
|
||||||
#include "nix/main/common-args.hh"
|
#include "nix/main/common-args.hh"
|
||||||
#include "nix/main/shared.hh"
|
#include "nix/main/shared.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
#include "nix/store/store-open.hh"
|
#include "nix/store/store-open.hh"
|
||||||
#include "nix/store/log-store.hh"
|
#include "nix/store/log-store.hh"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,9 @@
|
||||||
#include "graphml.hh"
|
#include "graphml.hh"
|
||||||
#include "nix/cmd/legacy.hh"
|
#include "nix/cmd/legacy.hh"
|
||||||
#include "nix/util/posix-source-accessor.hh"
|
#include "nix/util/posix-source-accessor.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
#include "nix/store/path-with-outputs.hh"
|
#include "nix/store/path-with-outputs.hh"
|
||||||
|
|
||||||
#include "man-pages.hh"
|
#include "man-pages.hh"
|
||||||
|
|
||||||
#ifndef _WIN32 // TODO implement on Windows or provide allowed-to-noop interface
|
#ifndef _WIN32 // TODO implement on Windows or provide allowed-to-noop interface
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
#include "nix/util/posix-source-accessor.hh"
|
#include "nix/util/posix-source-accessor.hh"
|
||||||
#include "nix/cmd/misc-store-flags.hh"
|
#include "nix/cmd/misc-store-flags.hh"
|
||||||
#include "nix/util/terminal.hh"
|
#include "nix/util/terminal.hh"
|
||||||
|
#include "nix/util/environment-variables.hh"
|
||||||
|
|
||||||
#include "man-pages.hh"
|
#include "man-pages.hh"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
#include "nix/util/source-accessor.hh"
|
#include "nix/util/source-accessor.hh"
|
||||||
#include "nix/expr/eval.hh"
|
#include "nix/expr/eval.hh"
|
||||||
#include "nix/util/util.hh"
|
#include "nix/util/util.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
#include "nix/expr/attr-path.hh"
|
#include "nix/expr/attr-path.hh"
|
||||||
#include "nix/store/names.hh"
|
#include "nix/store/names.hh"
|
||||||
#include "nix/util/executable-path.hh"
|
#include "nix/util/executable-path.hh"
|
||||||
|
#include "nix/store/globals.hh"
|
||||||
#include "self-exe.hh"
|
#include "self-exe.hh"
|
||||||
|
|
||||||
using namespace nix;
|
using namespace nix;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue