all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Best practices for Guix environment variables on foreign distro
@ 2018-03-10 22:32 Jorge
  2018-03-12 10:11 ` Ludovic Courtès
  2018-03-12 22:32 ` Jorge
  0 siblings, 2 replies; 8+ messages in thread
From: Jorge @ 2018-03-10 22:32 UTC (permalink / raw)
  To: help-guix

Hi.  I use Guix on Ubuntu 16.04.4[1] to get up-to-date packages while
running Ubuntu LTS.  When setting up Guix environment variables I feared
disrupting the foreign distro.  If a program P on the foreign distro
invokes binary B, it expects the B version shipped with the foreign
distro.  If the Guix version of B is on the search path I fear trouble.
Therefore, instead of configuring all Guix environment variables on
`~/.profile', I only configured there `GUIX_PROFILE', `INFOPATH',
`MANPATH' and `GUIX_LOCPATH'.  I put the configuration of `SSL_CERT_DIR'
and `SSL_CERT_FILE' and the statement to source
`"${GUIX_PROFILE}/etc/profile' (which configures `PATH') on `~/.bashrc'
so they do affect interactive Bash shells but not programs spawned by
GNOME or by systemd.

However, I found an e-mail message on this list[2] and the footnote on
[info:guix#Invoking guix environment], both of which recommend against
sourcing `"${GUIX_PROFILE}/etc/profile' from `~/.bashrc'.

If my attempt is recommended against then how else should I enable Guix
on Emacs and interactive Bash shells while preventing it from disrupting
the foreign distro (e.g. programs spawned by GNOME)?  Or is this feared
disruption a non-issue in practice and I’m creating unnecessary
complication?

A related question: how do I make all info manuals from Guix accessible
to Emacs?  Not every Guix package is installed on my profile.  For now,
I configured INFOPATH to include both my user profile and root’s:

┌────
│ INFOPATH="/var/guix/profiles/per-user/root/guix-profile/share/info/:${INFOPATH-}"
│ export INFOPATH="${GUIX_PROFILE}/share/info/:${INFOPATH-}"
└────



Footnotes
─────────

[1] It came preinstalled with my Dell notebook.  I intend to later
migrate to a distro more respectful of free (libre) software ethics.

[2]
[https://lists.gnu.org/archive/html/help-guix/2017-05/msg00082.html]

- I am Brazilian. I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free/libre software for Android: https://f-droid.org
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]

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

* Re: Best practices for Guix environment variables on foreign distro
  2018-03-10 22:32 Best practices for Guix environment variables on foreign distro Jorge
@ 2018-03-12 10:11 ` Ludovic Courtès
  2018-03-13  6:48   ` Konrad Hinsen
  2018-03-12 22:32 ` Jorge
  1 sibling, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2018-03-12 10:11 UTC (permalink / raw)
  To: Jorge; +Cc: help-guix

Hello Jorge,

"Jorge" <jorge+list@disroot.org> skribis:

> Hi.  I use Guix on Ubuntu 16.04.4[1] to get up-to-date packages while
> running Ubuntu LTS.  When setting up Guix environment variables I feared
> disrupting the foreign distro.  If a program P on the foreign distro
> invokes binary B, it expects the B version shipped with the foreign
> distro.  If the Guix version of B is on the search path I fear trouble.
> Therefore, instead of configuring all Guix environment variables on
> `~/.profile', I only configured there `GUIX_PROFILE', `INFOPATH',
> `MANPATH' and `GUIX_LOCPATH'.  I put the configuration of `SSL_CERT_DIR'
> and `SSL_CERT_FILE' and the statement to source
> `"${GUIX_PROFILE}/etc/profile' (which configures `PATH') on `~/.bashrc'
> so they do affect interactive Bash shells but not programs spawned by
> GNOME or by systemd.
>
> However, I found an e-mail message on this list[2] and the footnote on
> [info:guix#Invoking guix environment], both of which recommend against
> sourcing `"${GUIX_PROFILE}/etc/profile' from `~/.bashrc'.
>
> If my attempt is recommended against then how else should I enable Guix
> on Emacs and interactive Bash shells while preventing it from disrupting
> the foreign distro (e.g. programs spawned by GNOME)?  Or is this feared
> disruption a non-issue in practice and I’m creating unnecessary
> complication?

The suggestion is to source ~/.guix-profile/etc/profile from
~/.bash_profile (or similar).

> A related question: how do I make all info manuals from Guix accessible
> to Emacs?  Not every Guix package is installed on my profile.  For now,
> I configured INFOPATH to include both my user profile and root’s:
>
> ┌────
> │ INFOPATH="/var/guix/profiles/per-user/root/guix-profile/share/info/:${INFOPATH-}"
> │ export INFOPATH="${GUIX_PROFILE}/share/info/:${INFOPATH-}"
> └────

That’s the right approach!

HTH,
Ludo’.

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

* Re: Best practices for Guix environment variables on foreign distro
  2018-03-10 22:32 Best practices for Guix environment variables on foreign distro Jorge
  2018-03-12 10:11 ` Ludovic Courtès
@ 2018-03-12 22:32 ` Jorge
  2018-03-13 12:24   ` Adonay Felipe Nogueira
  1 sibling, 1 reply; 8+ messages in thread
From: Jorge @ 2018-03-12 22:32 UTC (permalink / raw)
  To: ludo; +Cc: help-guix

March 12, 2018 7:18 AM, ludo@gnu.org wrote:

> The suggestion is to source ~/.guix-profile/etc/profile from
> ~/.bash_profile (or similar).
I have just tried your suggestion.  I verified that it does not pollute
GNOME’s environment and it does set up Guix environment variables in
Emacs.  However, it does not set up the Guix environment on
gnome-terminal, as I suspected.  According to Bash’s info manual[1],
interactive non-login Bash shells (such as those spawned by
gnome-terminal) only read `~/.bashrc' or the file specified by the
`--rcfile' option, but *not* (by default) `/.bash_profile'.

Footnotes
─────────

[1] [info:bash#Bash Startup Files]

- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free/libre software for Android: https://f-droid.org/
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]

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

* Re: Best practices for Guix environment variables on foreign distro
  2018-03-12 10:11 ` Ludovic Courtès
@ 2018-03-13  6:48   ` Konrad Hinsen
  2018-03-13 12:37     ` Adonay Felipe Nogueira
  2018-03-13 17:32     ` Jorge
  0 siblings, 2 replies; 8+ messages in thread
From: Konrad Hinsen @ 2018-03-13  6:48 UTC (permalink / raw)
  To: help-guix

On 12/03/2018 11:11, Ludovic Courtès wrote:

>> If my attempt is recommended against then how else should I enable Guix
>> on Emacs and interactive Bash shells while preventing it from disrupting
>> the foreign distro (e.g. programs spawned by GNOME)?  Or is this feared
>> disruption a non-issue in practice and I’m creating unnecessary
>> complication?
> 
> The suggestion is to source ~/.guix-profile/etc/profile from
> ~/.bash_profile (or similar).

That's what I am using in exactly the same setup (Guix on Ubuntu 
16.04LTS) and it works fine. Sourcing ~/.guix-profile/etc/profile from 
$HOME/.profile, on the other hand, prevents logins to GNOME or Unity 
sessions.

Konrad.

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

* Re: Best practices for Guix environment variables on foreign distro
  2018-03-12 22:32 ` Jorge
@ 2018-03-13 12:24   ` Adonay Felipe Nogueira
  0 siblings, 0 replies; 8+ messages in thread
From: Adonay Felipe Nogueira @ 2018-03-13 12:24 UTC (permalink / raw)
  To: help-guix

I don't know if this is recommended, but I set all my variables inside
"${HOME}/.profile". Morever, the first thing I do in "${HOME}/.profile"
is to source my user's Guix profile --- `source
"${GUIX_PROFILE}/etc/profile"'.

The caveat is that every time GNU Guix changes my profile generation, I
have to log out and then back in --- no need to reboot --- for the
changes to take effect or for the variables to be re-instated, because
it seems that, after the changes made by GNU Guix, programs "forget"
some variables or other information.

-- 
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
  instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.

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

* Re: Best practices for Guix environment variables on foreign distro
  2018-03-13  6:48   ` Konrad Hinsen
@ 2018-03-13 12:37     ` Adonay Felipe Nogueira
  2018-03-13 17:32     ` Jorge
  1 sibling, 0 replies; 8+ messages in thread
From: Adonay Felipe Nogueira @ 2018-03-13 12:37 UTC (permalink / raw)
  To: help-guix

> 16.04LTS) and it works fine. Sourcing ~/.guix-profile/etc/profile from
> $HOME/.profile, on the other hand, prevents logins to GNOME or Unity
> sessions.

I don't know if Unity respects ${XDG_DATA_DIRS}, but I hope so. If it does:
then perhaps because you have to treat ${XDG_DATA_DIRS} specially, as I
explained in other posts.

There are various ways to go about this:

a) make foreign distro project change the behavior of Xsession.d scripts
   that set ${XDG_DATA_DIRS}.

b) make (a) but only locally.

c) make ${XDG_DATA_DIRS} be changed specially instead of the usual
   "${VAR:+:}$VAR" recommendation.

   If you want to know more, search in all GNU Guix mailing lists about
   "adfeno XDG_DATA_DIRS".

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

* Re: Best practices for Guix environment variables on foreign distro
  2018-03-13  6:48   ` Konrad Hinsen
  2018-03-13 12:37     ` Adonay Felipe Nogueira
@ 2018-03-13 17:32     ` Jorge
  2018-03-14 11:54       ` Adonay Felipe Nogueira
  1 sibling, 1 reply; 8+ messages in thread
From: Jorge @ 2018-03-13 17:32 UTC (permalink / raw)
  To: Adonay Felipe Nogueira, help-guix

March 13, 2018 9:38 AM, "Adonay Felipe Nogueira" <adfeno@hyperbola.info> wrote:

>> 16.04LTS) and it works fine. Sourcing ~/.guix-profile/etc/profile from
>> $HOME/.profile, on the other hand, prevents logins to GNOME or Unity
>> sessions.
> 
> I don't know if Unity respects ${XDG_DATA_DIRS}, but I hope so. If it does:
> then perhaps because you have to treat ${XDG_DATA_DIRS} specially, as I
> explained in other posts.
I forgot to mention that I run Ubuntu GNOME.

When I arrive home (I am at work) I will look at the suggestions in
this thread.

Thank you in advance.

- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free/libre software for Android: https://f-droid.org/
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]

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

* Re: Best practices for Guix environment variables on foreign distro
  2018-03-13 17:32     ` Jorge
@ 2018-03-14 11:54       ` Adonay Felipe Nogueira
  0 siblings, 0 replies; 8+ messages in thread
From: Adonay Felipe Nogueira @ 2018-03-14 11:54 UTC (permalink / raw)
  To: help-guix

> When I arrive home (I am at work) I will look at the suggestions in

Have you succeeded?

> Thank you in advance.

You're welcome! :D

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

end of thread, other threads:[~2018-03-14 11:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-10 22:32 Best practices for Guix environment variables on foreign distro Jorge
2018-03-12 10:11 ` Ludovic Courtès
2018-03-13  6:48   ` Konrad Hinsen
2018-03-13 12:37     ` Adonay Felipe Nogueira
2018-03-13 17:32     ` Jorge
2018-03-14 11:54       ` Adonay Felipe Nogueira
2018-03-12 22:32 ` Jorge
2018-03-13 12:24   ` Adonay Felipe Nogueira

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.