1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-03 06:11:46 +02:00

Rename Override -> OverrideTarget

This commit is contained in:
Eelco Dolstra 2025-01-07 13:54:19 +01:00
parent e8c7dd9971
commit 0792152627

View file

@ -408,14 +408,14 @@ LockedFlake lockFlake(
debug("old lock file: %s", oldLockFile); debug("old lock file: %s", oldLockFile);
struct Override struct OverrideTarget
{ {
FlakeInput input; FlakeInput input;
SourcePath sourcePath; SourcePath sourcePath;
std::optional<InputPath> parentInputPath; // FIXME: rename to inputPathPrefix? std::optional<InputPath> parentInputPath; // FIXME: rename to inputPathPrefix?
}; };
std::map<InputPath, Override> overrides; std::map<InputPath, OverrideTarget> overrides;
std::set<InputPath> explicitCliOverrides; std::set<InputPath> explicitCliOverrides;
std::set<InputPath> overridesUsed, updatesUsed; std::set<InputPath> overridesUsed, updatesUsed;
std::map<ref<Node>, SourcePath> nodePaths; std::map<ref<Node>, SourcePath> nodePaths;
@ -423,7 +423,7 @@ LockedFlake lockFlake(
for (auto & i : lockFlags.inputOverrides) { for (auto & i : lockFlags.inputOverrides) {
overrides.emplace( overrides.emplace(
i.first, i.first,
Override { OverrideTarget {
.input = FlakeInput { .ref = i.second }, .input = FlakeInput { .ref = i.second },
/* Note: any relative overrides /* Note: any relative overrides
(e.g. `--override-input B/C "path:./foo/bar"`) (e.g. `--override-input B/C "path:./foo/bar"`)
@ -474,7 +474,7 @@ LockedFlake lockFlake(
inputPath.push_back(id); inputPath.push_back(id);
inputPath.push_back(idOverride); inputPath.push_back(idOverride);
overrides.emplace(inputPath, overrides.emplace(inputPath,
Override { OverrideTarget {
.input = inputOverride, .input = inputOverride,
.sourcePath = sourcePath, .sourcePath = sourcePath,
.parentInputPath = inputPathPrefix .parentInputPath = inputPathPrefix