help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attempt to create a profile


From: Kyle Andrews
Subject: Re: attempt to create a profile
Date: Tue, 14 Feb 2023 06:00:04 +0000

This makes a lot more sense to me than sequentially sourcing
$SOME/etc/profile files as currently mentioned in the cookbook.

Thanks for sharing!

The fact that guix package supports multiple -p arguments got me excited
enough to try out a similar command with guix shell.

```
guix shell -p $HOME/my/profile/emacs -p $HOME/my/profile/rstats
--container
guix shell -p $HOME/my/profile/rstats -p $HOME/my/profile/emacs --container
```

Both commands ran for me. However, the first environment didn't provide
Emacs. The second did provide even though it didn't run because there
was no X11 available and so it errored out.

It seems that multiple -p arguments to guix shell doesn't really work
like I would hope. Ideally it would produce the same sort of system
environment as is produced by eval'ing `guix package --search-paths` with 
multiple profiles.

宋文武 <iyzsong@envs.net> writes:

> Kyle Andrews <kyle@posteo.net> writes:
>
>> In my case I am hopeful there must be some way to extend the man and info
>> paths when multiple profiles are activated, and maybe that would resolve
>> my particular issue. I would love a suggestion to be placed in the
>> cookbook about this.
>
> Hello, you can merge search-paths from multiple profiles with:
>
> --8<---------------cut here---------------start------------->8---
> # Honor system-wide environment variables
> source /etc/profile
>
> # Merge search-paths from multiple profiles, the order matters.
> eval "$(guix package --search-paths \
> -p $HOME/.config/guix/profiles/a \
> -p $HOME/.config/guix/profiles/b \
> -p $HOME/.config/guix/current \
> -p $HOME/.guix-profile \
> -p /run/current-system/profile)"
>
> # Prepend setuid programs.
> export PATH=/run/setuid-programs:$PATH
> --8<---------------cut here---------------end--------------->8---
>
> As discussed in #20255 and #61358.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]