From: Tobias Geerinckx-Rice <me@tobias.gr>
To: Garjola Dindi <garjola@garjola.net>
Cc: help-guix@gnu.org
Subject: Re: Packages don't get installed in the correct path
Date: Wed, 17 Mar 2021 07:51:18 +0100 [thread overview]
Message-ID: <877dm6mfx5.fsf@nckx> (raw)
In-Reply-To: <87blbig7sb.fsf@pc-117-162.ovh.com>
[-- Attachment #1: Type: text/plain, Size: 2807 bytes --]
Hi Garjola!
Garjola Dindi 写道:
> I have added the following to my ~/.basrhc as indicated in the
> manual:
>
> ,----[ bash ]
> | export
> PATH="/home/garjola/.config/guix/current/bin${PATH:+:}$PATH"
Which mad-Max manual indicates this? Not [my copy of] Guix's:
“(1) Users sometimes wrongfully augment environment variables
such as 'PATH' in their '~/.bashrc' file. As a consequence,
when 'guix environment' launches it, Bash may read '~/.bashrc',
thereby introducing "impurities" in these environment variables.
It is an error to define such environment variables in
'.bashrc'; instead, they should be defined in '.bash_profile',
which is sourced only by log-in shells.
*Note (bash)Bash Startup Files::, for details on Bash start-up
files.”
-- info "(guix)Invoking guix environment"
Adding PATH to .bashrc is almost always a mistake, and round that
up to ‘always’. As a Guix System user I'm less familiar with
GUIX_LOCPATH, but the manual doesn't suggest adding it either.
> Actually, despite the configuration in .bashrc
Side note: sourcing <profile>/etc/profile configures your
environment to ‘see’ Guix-installed software. It does not
configure Guix, which will install to ~/.guix-profile unless you
specify another one with --profile= (-p).
> the packages do not get installed in the $HOME tree, but in
> /var/..../per-user/.
Lo:
~ λ ls -l ~/.guix-profile
lrwxrwxrwx 1 nckx nckx 45 Sep 28 09:01 /home/nckx/.guix-profile
-> /var/guix/profiles/per-user/nckx/guix-profile/
Unless something has gone *very* wrong, your installed packages
should show up under both /var/... and ~/.guix-profile alike.
> The $HOME tree only contains the guix binaries:
>
> ,----[ bash ]
> | $ ls ${HOME}/.config/guix/current/bin
> | guix guix-daemon
> `----
This is good: ~/.config/guix/current is not ~/.guix-profile.
The latter is your default profile, where ‘guix install’ and
friends install software. The former is exclusively for use by
‘guix pull’ and provides the ‘guix’ command itself, to avoid a
chicken-and-egg problem.
> The most annoying thing is that the programs are not in the path
I don't want to presume what you mean: that they're not where you
thought they would be (not in ~/.config/guix), or that you can't
actually run them (not in PATH)?
There's nothing wrong with any of the directories you mentioned.
If you can run Guix-installed software from the shell immediately
after installing it, I'd say that the /var thing is just a quirk
of running Guix on a foreign distribution.
Quite a few regulars do so, some on Debian. I'll let them correct
me if I'm wrong (and explain the mystery that is GUIX_LOCPATH).
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
next prev parent reply other threads:[~2021-03-17 6:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 20:31 Packages don't get installed in the correct path Garjola Dindi
2021-03-17 6:51 ` Tobias Geerinckx-Rice [this message]
2021-03-17 7:31 ` Garjola Dindi
2021-03-17 7:49 ` Ricardo Wurmus
2021-03-17 9:25 ` Garjola Dindi
2021-03-17 13:22 ` Garjola Dindi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dm6mfx5.fsf@nckx \
--to=me@tobias.gr \
--cc=garjola@garjola.net \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.