all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#61358] [PATCH] system: default-skeletons: Merge search-paths of multiple profiles.
@ 2023-02-08  2:37 iyzsong--- via Guix-patches via
  2023-02-08  5:18 ` Liliana Marie Prikler
  2023-05-12 12:30 ` bug#61358: " 宋文武 via Guix-patches via
  0 siblings, 2 replies; 4+ messages in thread
From: iyzsong--- via Guix-patches via @ 2023-02-08  2:37 UTC (permalink / raw)
  To: 61358; +Cc: 宋文武

From: 宋文武 <iyzsong@member.fsf.org>

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





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#61358] [PATCH] system: default-skeletons: Merge search-paths of multiple profiles.
  2023-02-08  2:37 [bug#61358] [PATCH] system: default-skeletons: Merge search-paths of multiple profiles iyzsong--- via Guix-patches via
@ 2023-02-08  5:18 ` Liliana Marie Prikler
  2023-02-08  7:20   ` 宋文武 via Guix-patches via
  2023-05-12 12:30 ` bug#61358: " 宋文武 via Guix-patches via
  1 sibling, 1 reply; 4+ messages in thread
From: Liliana Marie Prikler @ 2023-02-08  5:18 UTC (permalink / raw)
  To: iyzsong, 61358; +Cc: 宋文武

Am Mittwoch, dem 08.02.2023 um 10:37 +0800 schrieb iyzsong@envs.net:
> From: 宋文武 <iyzsong@member.fsf.org>
> 
> 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"))
Why not do this in /etc/profile?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#61358] [PATCH] system: default-skeletons: Merge search-paths of multiple profiles.
  2023-02-08  5:18 ` Liliana Marie Prikler
@ 2023-02-08  7:20   ` 宋文武 via Guix-patches via
  0 siblings, 0 replies; 4+ messages in thread
From: 宋文武 via Guix-patches via @ 2023-02-08  7:20 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 宋文武, 61358

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Mittwoch, dem 08.02.2023 um 10:37 +0800 schrieb iyzsong@envs.net:
>> From: 宋文武 <iyzsong@member.fsf.org>
>> 
>> 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(-)
>>  [...]

> Why not do this in /etc/profile?

It's easier to modify ~/.bash_profile If you don't like the way (eval!
and speed as disscussed in #20255).

Also this doesn't include home profiles, which a user likely want to add
them into "guix package -p ..." too.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#61358: [PATCH] system: default-skeletons: Merge search-paths of multiple profiles.
  2023-02-08  2:37 [bug#61358] [PATCH] system: default-skeletons: Merge search-paths of multiple profiles iyzsong--- via Guix-patches via
  2023-02-08  5:18 ` Liliana Marie Prikler
@ 2023-05-12 12:30 ` 宋文武 via Guix-patches via
  1 sibling, 0 replies; 4+ messages in thread
From: 宋文武 via Guix-patches via @ 2023-05-12 12:30 UTC (permalink / raw)
  To: 61358-done


Pushed now!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-12 12:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08  2:37 [bug#61358] [PATCH] system: default-skeletons: Merge search-paths of multiple profiles iyzsong--- via Guix-patches via
2023-02-08  5:18 ` Liliana Marie Prikler
2023-02-08  7:20   ` 宋文武 via Guix-patches via
2023-05-12 12:30 ` bug#61358: " 宋文武 via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.