From 9b908fa70a07219a110ddd63ec3593c2c2269918 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 24 Jul 2023 14:02:05 -0400 Subject: Factor out `nix-defexpr` path computation Avoid duplicated code, and also avoid "on the fly" path construction (which makes it harder to keep track of which paths we use). The factored out code doesn't create the Nix state dir anymore, but this is fine because other in nix-env and nix-channel does: - nix-channel: Line 158 in this commit - nix-env: Line 1407 in this commit --- src/libexpr/eval-settings.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libexpr/eval-settings.hh') diff --git a/src/libexpr/eval-settings.hh b/src/libexpr/eval-settings.hh index 043af6cab..e6666061a 100644 --- a/src/libexpr/eval-settings.hh +++ b/src/libexpr/eval-settings.hh @@ -95,4 +95,9 @@ struct EvalSettings : Config extern EvalSettings evalSettings; +/** + * Conventionally part of the default nix path in impure mode. + */ +Path getNixDefExpr(); + } -- cgit v1.2.3