aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorThéophane Hufschmitt <theophane.hufschmitt@tweag.io>2023-03-21 13:37:19 +0100
committerThéophane Hufschmitt <theophane.hufschmitt@tweag.io>2023-03-23 10:22:42 +0100
commitfb67c1a1fb5eba91abe3ab411a93cb49960454cf (patch)
tree97de0e98ab87a1c3961220af996193aaa5e1a917 /src/libexpr
parent82bd9535dd663209a38c1e6ebd8867875fa363ef (diff)
Factor out the generation of the profile/channel directory
Make sure that all the code paths use the same one, and that the backwards-compatibility measures are probably in place when needed
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/eval.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 2721b6733..584bbc879 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -8,6 +8,7 @@
#include "eval-inline.hh"
#include "filetransfer.hh"
#include "function-trace.hh"
+#include "profiles.hh"
#include <algorithm>
#include <chrono>
@@ -2491,8 +2492,8 @@ Strings EvalSettings::getDefaultNixPath()
if (!evalSettings.restrictEval && !evalSettings.pureEval) {
add(settings.useXDGBaseDirectories ? getStateDir() + "/nix/defexpr/channels" : getHome() + "/.nix-defexpr/channels");
- add(settings.nixStateDir + "/profiles/per-user/root/channels/nixpkgs", "nixpkgs");
- add(settings.nixStateDir + "/profiles/per-user/root/channels");
+ add(rootChannelsDir() + "/nixpkgs", "nixpkgs");
+ add(rootChannelsDir());
}
return res;