aboutsummaryrefslogtreecommitdiff
path: root/nix/libstore
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-02-06 13:03:26 +0100
committerRicardo Wurmus <rekado@elephly.net>2019-02-06 13:03:26 +0100
commitba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d (patch)
tree75c68e44d3d76440f416552711b1a47ec83e411e /nix/libstore
parentf380f9d55e6757c242acf6c71c4a3ccfcdb066b2 (diff)
parent4aeb7f34c948f32363f2ae29c6942c6328df758c (diff)
downloadguix-ba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d.tar
guix-ba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'nix/libstore')
-rw-r--r--nix/libstore/builtins.cc10
-rw-r--r--nix/libstore/gc.cc2
-rw-r--r--nix/libstore/globals.cc19
-rw-r--r--nix/libstore/globals.hh2
-rw-r--r--nix/libstore/local-store.cc10
5 files changed, 8 insertions, 35 deletions
diff --git a/nix/libstore/builtins.cc b/nix/libstore/builtins.cc
index 1f52511c80..f7c7d42484 100644
--- a/nix/libstore/builtins.cc
+++ b/nix/libstore/builtins.cc
@@ -1,5 +1,5 @@
/* GNU Guix --- Functional package management for GNU
- Copyright (C) 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+ Copyright (C) 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
This file is part of GNU Guix.
@@ -50,13 +50,7 @@ static void builtinDownload(const Derivation &drv,
/* Tell it about options such as "print-extended-build-trace". */
setenv("_NIX_OPTIONS", settings.pack().c_str(), 1);
- /* XXX: Hack our way to use the 'download' script from 'LIBEXECDIR/guix'
- or just 'LIBEXECDIR', depending on whether we're running uninstalled or
- not. */
- const string subdir = getenv("GUIX_UNINSTALLED") != NULL
- ? "" : "/guix";
-
- const string program = settings.nixLibexecDir + subdir + "/download";
+ const string program = settings.nixLibexecDir + "/download";
execv(program.c_str(), (char *const *) argv);
throw SysError(format("failed to run download program '%1%'") % program);
diff --git a/nix/libstore/gc.cc b/nix/libstore/gc.cc
index 125f242814..310b8792fe 100644
--- a/nix/libstore/gc.cc
+++ b/nix/libstore/gc.cc
@@ -340,7 +340,7 @@ Roots LocalStore::findRoots()
static void addAdditionalRoots(StoreAPI & store, PathSet & roots)
{
Path rootFinder = getEnv("NIX_ROOT_FINDER",
- settings.nixLibexecDir + "/guix/list-runtime-roots");
+ settings.nixLibexecDir + "/list-runtime-roots");
if (rootFinder.empty()) return;
diff --git a/nix/libstore/globals.cc b/nix/libstore/globals.cc
index 25f80da2dd..69f6d06563 100644
--- a/nix/libstore/globals.cc
+++ b/nix/libstore/globals.cc
@@ -66,10 +66,9 @@ Settings::Settings()
void Settings::processEnvironment()
{
nixStore = canonPath(getEnv("NIX_STORE_DIR", getEnv("NIX_STORE", NIX_STORE_DIR)));
- nixDataDir = canonPath(getEnv("NIX_DATA_DIR", NIX_DATA_DIR));
- nixLogDir = canonPath(getEnv("NIX_LOG_DIR", NIX_LOG_DIR));
- nixStateDir = canonPath(getEnv("NIX_STATE_DIR", NIX_STATE_DIR));
- nixDBPath = getEnv("NIX_DB_DIR", nixStateDir + "/db");
+ nixLogDir = canonPath(getEnv("GUIX_LOG_DIRECTORY", NIX_LOG_DIR));
+ nixStateDir = canonPath(getEnv("GUIX_STATE_DIRECTORY", NIX_STATE_DIR));
+ nixDBPath = getEnv("GUIX_DATABASE_DIRECTORY", nixStateDir + "/db");
nixConfDir = canonPath(getEnv("GUIX_CONFIGURATION_DIRECTORY", GUIX_CONFIGURATION_DIRECTORY));
nixLibexecDir = canonPath(getEnv("NIX_LIBEXEC_DIR", NIX_LIBEXEC_DIR));
nixBinDir = canonPath(getEnv("NIX_BIN_DIR", NIX_BIN_DIR));
@@ -142,18 +141,6 @@ void Settings::update()
_get(gcKeepDerivations, "gc-keep-derivations");
_get(autoOptimiseStore, "auto-optimise-store");
_get(envKeepDerivations, "env-keep-derivations");
-
- string subs = getEnv("NIX_SUBSTITUTERS", "default");
- if (subs == "default") {
- substituters.clear();
-#if 0
- if (getEnv("NIX_OTHER_STORES") != "")
- substituters.push_back(nixLibexecDir + "/nix/substituters/copy-from-other-stores.pl");
-#endif
- substituters.push_back(nixLibexecDir + "/nix/substituters/download-using-manifests.pl");
- substituters.push_back(nixLibexecDir + "/nix/substituters/download-from-binary-cache.pl");
- } else
- substituters = tokenizeString<Strings>(subs, ":");
}
diff --git a/nix/libstore/globals.hh b/nix/libstore/globals.hh
index a6935c3337..b073f724b6 100644
--- a/nix/libstore/globals.hh
+++ b/nix/libstore/globals.hh
@@ -45,8 +45,6 @@ struct Settings {
/* The directory where we store sources and derived files. */
Path nixStore;
- Path nixDataDir; /* !!! fix */
-
/* The directory where we log various operations. */
Path nixLogDir;
diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc
index eb8a51cc23..892d9300b1 100644
--- a/nix/libstore/local-store.cc
+++ b/nix/libstore/local-store.cc
@@ -1224,14 +1224,8 @@ static void checkSecrecy(const Path & path)
static std::string runAuthenticationProgram(const Strings & args)
{
- /* Use the 'authenticate' script from 'LIBEXECDIR/guix' or just
- 'LIBEXECDIR', depending on whether we're uninstalled or not. */
- const bool installed = getenv("GUIX_UNINSTALLED") == NULL;
- const string program = settings.nixLibexecDir
- + (installed ? "/guix" : "")
- + "/authenticate";
-
- return runProgram(program, false, args);
+ return runProgram(settings.nixLibexecDir + "/authenticate",
+ false, args);
}
void LocalStore::exportPath(const Path & path, bool sign,