diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-02-04 16:14:09 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-02-04 16:20:01 +0100 |
commit | 959eaa1eb834fd47ceab3c5bbbe4967e808d530b (patch) | |
tree | 11af589b50530f3cdd09c895077a203e332464b9 /nix/libstore | |
parent | 4d4a38f620520acc787ff5db2be3736923e14235 (diff) | |
download | guix-959eaa1eb834fd47ceab3c5bbbe4967e808d530b.tar.gz |
daemon: Add "/guix" to default 'nixLibexecDir'.
This makes it easier to run the uninstalled daemon. * nix/local.mk (libstore_a_CPPFLAGS): Append "/guix" to NIX_LIBEXEC_DIR. * build-aux/pre-inst-env.in (NIX_LIBEXEC_DIR): Adjust comment. * nix/libstore/builtins.cc (builtinDownload): Remove SUBDIR and its use. * nix/libstore/local-store.cc (runAuthenticationProgram): Ditto. * nix/libstore/gc.cc (addAdditionalRoots): Remove "/guix" prefix. * nix/nix-daemon/guix-daemon.cc (main): Ditto.
Diffstat (limited to 'nix/libstore')
-rw-r--r-- | nix/libstore/builtins.cc | 10 | ||||
-rw-r--r-- | nix/libstore/gc.cc | 2 | ||||
-rw-r--r-- | nix/libstore/local-store.cc | 10 |
3 files changed, 5 insertions, 17 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/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, |