help-guix
[Top][All Lists]
Advanced

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

Re: Package recommended environment variables


From: Tobias Geerinckx-Rice
Subject: Re: Package recommended environment variables
Date: Thu, 16 May 2019 13:21:12 +0200

Tk,

Tk wrote:
When installing packages, I often get warnings about adding variables to .profile .

Which warnings are these?  Are you sure that's what they mean?

Something like ‘the following variable definitions might be needed’ doesn't mean you should go edit your .profile, but you're far from the first to do so. They are printed because guix cannot change the environment of the shell that invoked it, so ‘guix install foo; foo’ won't work if foo needs a certain environment variable to be set. It will work if you open a new shell. That's a Unix limitation¹.

There was some talk about rephrasing that warning, but IIRC that was difficult to do without making other assumptions. I don't know if anything came of it.

These warnings, however, get easily lost when installing bunch of stuff automatically. Is there a way of extracting this info again? Should I grep through package definitions?

Grepping won't help since these variables (‘search paths’) are almost always propagated from dependencies, such as glib. Take a look at the ‘--search-paths’ argument to ‘guix package’. It will probably do what you want. Note that it's not limited to a single package.

However, why are you interested in this information?

- If it's because you're manually adding variables to .profile: don't; Guix already takes care of this automatically, you should simply source <guix-profile>/etc/profile if you aren't already.

- If it's because you're using an incompatible shell and are maintaining your own ‘port’ of that file: you're *probably* better off with a simple ‘bash -c ". guix-profile/etc/profile && exec myshell"’ wrapper.

- If it's because Guix's …/etc/profile is otherwise lacking for you, please let us know why.

Kind regards,

T G-R

[1]: There are horrible ways to fake this but let's not.

Attachment: signature.asc
Description: PGP signature


reply via email to

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