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/….
This commit is contained in:
		
							parent
							
								
									795d430d90
								
							
						
					
					
						commit
						ed9d7cb4d9
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -347,12 +347,14 @@ the Nix package manager.")
 | 
				
			||||||
                       "install-nodist_pkglibexecSCRIPTS")
 | 
					                       "install-nodist_pkglibexecSCRIPTS")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
               ;; We need to tell 'guix-daemon' which 'guix' command to use.
 | 
					               ;; We need to tell 'guix-daemon' which 'guix' command to use.
 | 
				
			||||||
               ;; Here we use a questionable hack where we hard-code
 | 
					               ;; Here we use a questionable hack where we hard-code root's
 | 
				
			||||||
               ;; "~root/.config", which could be wrong (XXX).
 | 
					               ;; 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")))
 | 
					               (let ((out (assoc-ref outputs "out")))
 | 
				
			||||||
                 (substitute* (find-files (string-append out "/libexec"))
 | 
					                 (substitute* (find-files (string-append out "/libexec"))
 | 
				
			||||||
                   (("exec \".*/bin/guix\"")
 | 
					                   (("exec \".*/bin/guix\"")
 | 
				
			||||||
                    "exec ~root/.config/guix/current/bin/guix"))
 | 
					                    "exec /var/guix/profiles/per-user/root/current-guix/bin/guix"))
 | 
				
			||||||
                 #t)))
 | 
					                 #t)))
 | 
				
			||||||
           (delete 'wrap-program)))))))
 | 
					           (delete 'wrap-program)))))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue