aboutsummaryrefslogtreecommitdiff
path: root/src/nix/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-04-06 13:15:50 +0200
committerEelco Dolstra <edolstra@gmail.com>2023-04-06 13:15:50 +0200
commit94812cca98fbb157e5f64a15a85a2b852d289feb (patch)
tree2f02c31fc42c7286f3c35dfd3ff1a88f235ab65b /src/nix/main.cc
parent5256ba6d87403f2b58ec4586c26d8fb14027252f (diff)
Backport SourcePath from the lazy-trees branch
This introduces the SourcePath type from lazy-trees as an abstraction for accessing files from inputs that may not be materialized in the real filesystem (e.g. Git repositories). Currently, however, it's just a wrapper around CanonPath, so it shouldn't change any behaviour. (On lazy-trees, SourcePath is a <InputAccessor, CanonPath> tuple.)
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r--src/nix/main.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc
index 54c920b4e..df0a25214 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -197,14 +197,14 @@ static void showHelp(std::vector<std::string> subcommand, NixArgs & toplevel)
auto vGenerateManpage = state.allocValue();
state.eval(state.parseExprFromString(
#include "generate-manpage.nix.gen.hh"
- , "/"), *vGenerateManpage);
+ , CanonPath::root), *vGenerateManpage);
auto vUtils = state.allocValue();
state.cacheFile(
- "/utils.nix", "/utils.nix",
+ CanonPath("/utils.nix"), CanonPath("/utils.nix"),
state.parseExprFromString(
#include "utils.nix.gen.hh"
- , "/"),
+ , CanonPath::root),
*vUtils);
auto vDump = state.allocValue();