unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Andreas Enge <andreas@enge.fr>
To: "Tomás Chapunov" <tomaschapunov@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: How do I retrieve the path to a Guix installed program from command line in a foreign distro?
Date: Wed, 17 Mar 2021 14:21:47 +0100	[thread overview]
Message-ID: <YFICax5oS6laSAgN@jurong> (raw)
In-Reply-To: <CAB3e=ndetK30mUgRykA5hN3o0H4d_x+V1TECzEzzYLVuZhtPRw@mail.gmail.com>

Hello,

Am Wed, Mar 17, 2021 at 09:32:29AM -0300 schrieb Tomás Chapunov:
> Is there a canonical way to retrieve the full path in my profile to a
> specific package with a command, in Guix on a foreign distro?
> I used locate or find, but I can't figure out from the output how to detect
> and select the correct one.

I think you are looking for "which". This shows you which program would
be executed depending on your $PATH variable, and assuming that the Guix
directories are at the front of it, the Guix program will be preferred.
Like so:
$ which calibre
/home/andreas/.guix-profile/bin/calibre

This is actually the common pattern; you can expect the full path to be
$HOME/.guix-profile/bin/name-of-the-binary

Using this would follow updates of your user profile. If you want to know
the real binary behind the scenes, you could use
$ readlink `which calibre`
/gnu/store/bhasa1a7pvv1icmdm6nrpscazw23pa03-calibre-4.18.0/bin/calibre

It does not move, but thus can of course become outdated or even deleted
when you do a "guix gc".

Andreas



  reply	other threads:[~2021-03-17 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 12:32 How do I retrieve the path to a Guix installed program from command line in a foreign distro? Tomás Chapunov
2021-03-17 13:21 ` Andreas Enge [this message]
2021-03-17 14:08   ` Tomás Chapunov

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YFICax5oS6laSAgN@jurong \
    --to=andreas@enge.fr \
    --cc=help-guix@gnu.org \
    --cc=tomaschapunov@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).