aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/package-management.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-10-11 18:27:21 +0200
committerLudovic Courtès <ludo@gnu.org>2018-10-11 18:29:11 +0200
commited9d7cb4d95f8f4776e6fee2778ab52bc2852969 (patch)
tree0535384fa131ef783f9c8fefa16250ea323550dc /gnu/packages/package-management.scm
parent795d430d90e41eb172315bfccf79c9f13fc0ebfa (diff)
downloadguix-ed9d7cb4d95f8f4776e6fee2778ab52bc2852969.tar
guix-ed9d7cb4d95f8f4776e6fee2778ab52bc2852969.tar.gz
gnu: guix-daemon: Run 'guix' from /var/guix/profiles/per-user/root.
Fixes <https://bugs.gnu.org/32183>. Reported by Pjotr Prins <pjotr.public12@thebird.nl> and Konrad Hinsen <konrad.hinsen@fastmail.net>. * gnu/packages/package-management.scm (guix-daemon)[arguments]: Execute /var/guix/profiles/per-user/root/current-guix/bin/guix instead of ~root/….
Diffstat (limited to 'gnu/packages/package-management.scm')
-rw-r--r--gnu/packages/package-management.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 500abd5125..9a0023233f 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -347,12 +347,14 @@ the Nix package manager.")
"install-nodist_pkglibexecSCRIPTS")
;; We need to tell 'guix-daemon' which 'guix' command to use.
- ;; Here we use a questionable hack where we hard-code
- ;; "~root/.config", which could be wrong (XXX).
+ ;; Here we use a questionable hack where we hard-code root's
+ ;; current guix, which could be wrong (XXX). Note that scripts
+ ;; like 'guix perform-download' do not run as root so we assume
+ ;; that they have access to /var/guix/profiles/per-user/root.
(let ((out (assoc-ref outputs "out")))
(substitute* (find-files (string-append out "/libexec"))
(("exec \".*/bin/guix\"")
- "exec ~root/.config/guix/current/bin/guix"))
+ "exec /var/guix/profiles/per-user/root/current-guix/bin/guix"))
#t)))
(delete 'wrap-program)))))))