From 959eaa1eb834fd47ceab3c5bbbe4967e808d530b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 4 Feb 2019 16:14:09 +0100 Subject: 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. --- nix/libstore/builtins.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'nix/libstore/builtins.cc') 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 + Copyright (C) 2016, 2017, 2018, 2019 Ludovic Courtès 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); -- cgit v1.2.3