1
0
Fork 0
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:
Eelco Dolstra 2020-01-22 20:00:58 +01:00
parent 90d55ed275
commit b5c9dbc84f
5 changed files with 34 additions and 15 deletions

View file

@ -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);
});
}