aboutsummaryrefslogtreecommitdiff
path: root/src/nix-env/nix-env.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-env/nix-env.cc')
-rw-r--r--src/nix-env/nix-env.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 91b073b49..3dc3db0fc 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -15,6 +15,7 @@
#include "value-to-json.hh"
#include "xml-writer.hh"
#include "legacy.hh"
+#include "eval-settings.hh" // for defexpr
#include <cerrno>
#include <ctime>
@@ -1399,7 +1400,7 @@ static int main_nix_env(int argc, char * * argv)
globals.instSource.type = srcUnknown;
globals.instSource.systemFilter = "*";
- Path nixExprPath = settings.useXDGBaseDirectories ? createNixStateDir() + "/defexpr" : getHome() + "/.nix-defexpr";
+ Path nixExprPath = getNixDefExpr();
if (!pathExists(nixExprPath)) {
try {