aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/common-eval-args.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-01-22 20:00:58 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-01-22 20:00:58 +0100
commitb5c9dbc84f31a1e9d1e5b6642b1716daa13c18ed (patch)
tree9c064107d9c9a81bb7f4ce821e55b522a2ca048d /src/libexpr/common-eval-args.cc
parent90d55ed275220962f7239f4869905b0237dd24fb (diff)
Fix --override-flake and add a test
Diffstat (limited to 'src/libexpr/common-eval-args.cc')
-rw-r--r--src/libexpr/common-eval-args.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libexpr/common-eval-args.cc b/src/libexpr/common-eval-args.cc
index 7c0d268bd..e3135b472 100644
--- a/src/libexpr/common-eval-args.cc
+++ b/src/libexpr/common-eval-args.cc
@@ -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);
});
}