-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For now, this sits between `libnixfetchers` and `libnixflakes`, but eventually I hope it can sit atop `libexprs`. Baby steps though, this is fine for now. The immediate impact of this is that some flakes-specific parts of `libnixfetchers` can move here, after which I hearby declare libfetchers is free of layer violations, and we are thus (baring something unrelated I missed) ready to stabilize `builtins.fetchTree`.
- Loading branch information
1 parent
89b3952
commit bf70b88
Showing
13 changed files
with
89 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "flake-settings.hh" | ||
|
||
namespace nix { | ||
|
||
FlakeSettings::FlakeSettings() | ||
{ | ||
} | ||
|
||
FlakeSettings flakeSettings; | ||
|
||
static GlobalConfig::Register rFlakeSettings(&flakeSettings); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#pragma once | ||
///@file | ||
|
||
#include "types.hh" | ||
#include "config.hh" | ||
#include "util.hh" | ||
|
||
#include <map> | ||
#include <limits> | ||
|
||
#include <sys/types.h> | ||
|
||
namespace nix { | ||
|
||
struct FlakeSettings : public Config | ||
{ | ||
FlakeSettings(); | ||
|
||
Setting<std::string> flakeRegistry{this, "https://channels.nixos.org/flake-registry.json", "flake-registry", | ||
R"( | ||
Path or URI of the global flake registry. | ||
When empty, disables the global flake registry. | ||
)", | ||
{}, true, Xp::Flakes}; | ||
|
||
|
||
Setting<bool> useRegistries{this, true, "use-registries", | ||
"Whether to use flake registries to resolve flake references.", | ||
{}, true, Xp::Flakes}; | ||
|
||
Setting<bool> acceptFlakeConfig{this, false, "accept-flake-config", | ||
"Whether to accept nix configuration from a flake without prompting.", | ||
{}, true, Xp::Flakes}; | ||
|
||
Setting<std::string> commitLockFileSummary{ | ||
this, "", "commit-lockfile-summary", | ||
R"( | ||
The commit summary to use when committing changed flake lock files. If | ||
empty, the summary is generated based on the action performed. | ||
)", | ||
{}, true, Xp::Flakes}; | ||
}; | ||
|
||
// FIXME: don't use a global variable. | ||
extern FlakeSettings flakeSettings; | ||
|
||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
libraries += libflake | ||
|
||
libflake_NAME = libnixflake | ||
|
||
libflake_DIR := $(d) | ||
|
||
libflake_SOURCES := $(wildcard $(d)/*.cc) | ||
|
||
libflake_CXXFLAGS += -I src/libutil -I src/libstore -I src/libfetchers | ||
|
||
libflake_LDFLAGS += -pthread | ||
|
||
libflake_LIBS = libutil libstore libfetchers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters