Subject: bug#61358: closed (Re: bug#61358: [PATCH] system: default-skeletons: Merge search-paths of multiple profiles.)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 12 May 2023 12:31:02 +0000

Your bug report

#61358: [PATCH] system: default-skeletons: Merge search-paths of multiple profiles.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
61358: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61358
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#61358: [PATCH] system: default-skeletons: Merge search-paths of multiple profiles.
From: 宋文武 <[email-masked]>
To: [email-masked]
Date: Fri, 12 May 2023 20:30:43 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Pushed now!

Subject: [PATCH] system: default-skeletons: Merge search-paths of multiple profiles.
From: [email-masked]
To: [email-masked]
Cc: 宋文武 <[email-masked]>
Date: Wed, 8 Feb 2023 10:37:35 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

From: 宋文武 <[email-masked]>

Fixes <https://issues.guix/gnu.org/20255>.

* gnu/system/shadow.scm (default-skeletons)[bash_profile, zprofile]:
Merge search-paths from multiple profiles via "guix package".
---
 gnu/system/shadow.scm | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 2e87928368..a46f53e784 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -152,11 +152,31 @@ (define (default-skeletons)
 
   (let ((profile (plain-file "bash_profile" "\
 # Honor per-interactive-shell startup file
-if [ -f ~/.bashrc ]; then . ~/.bashrc; fi\n"))
+if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
+
+# Merge search-paths from multiple profiles, the order matters.
+eval \"$(guix package --search-paths \\
+-p $HOME/.config/guix/current \\
+-p $HOME/.guix-profile \\
+-p /run/current-system/profile)\"
+
+# Prepend setuid programs.
+export PATH=/run/setuid-programs:$PATH
+"))
         (bashrc  %default-bashrc)
         (zprofile    (plain-file "zprofile" "\
 # Honor system-wide environment variables
-source /etc/profile\n"))
+source /etc/profile
+
+# Merge search-paths from multiple profiles, the order matters.
+eval \"$(guix package --search-paths \\
+-p $HOME/.config/guix/current \\
+-p $HOME/.guix-profile \\
+-p /run/current-system/profile)\"
+
+# Prepend setuid programs.
+export PATH=/run/setuid-programs:$PATH
+"))
         (xdefaults (plain-file "Xdefaults" "\
 XTerm*utf8: always
 XTerm*metaSendsEscape: true\n"))
-- 
2.39.1