mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Fix --override-flake and add a test
This commit is contained in:
parent
90d55ed275
commit
b5c9dbc84f
5 changed files with 34 additions and 15 deletions
|
@ -3,6 +3,8 @@
|
|||
#include "download.hh"
|
||||
#include "util.hh"
|
||||
#include "eval.hh"
|
||||
#include "fetchers/registry.hh"
|
||||
#include "flake/flakeref.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
@ -40,7 +42,9 @@ MixEvalArgs::MixEvalArgs()
|
|||
.description("override a flake registry value")
|
||||
.arity(2)
|
||||
.handler([&](std::vector<std::string> ss) {
|
||||
registryOverrides.push_back(std::make_pair(ss[0], ss[1]));
|
||||
fetchers::overrideRegistry(
|
||||
parseFlakeRef(ss[0], absPath(".")).input,
|
||||
parseFlakeRef(ss[1], absPath(".")).input);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue