From: Ricardo Wurmus <rekado@elephly.net>
To: Konrad Hinsen <konrad.hinsen@fastmail.net>
Cc: guix-devel@gnu.org
Subject: Re: Finding the channel in which a package is defined
Date: Thu, 01 Apr 2021 15:04:58 +0200 [thread overview]
Message-ID: <87k0pm2m11.fsf@elephly.net> (raw)
In-Reply-To: <m135wa47zd.fsf@khs-macbook.home>
Konrad Hinsen <konrad.hinsen@fastmail.net> writes:
> Tobias,
>
> Thanks for your reply!
>
>> Does the ‘location’ field of ‘guix show PACKAGE’ do what you want?
>
> Taking coreutils as a test case, it displays:
>
> gnu/packages/base.scm:328:2
>
> as a link pointing to:
>
> /gnu/store/3qykwxq1mqlin3lrb93s3rzi1ah5xia8-guix-module-union/share/guile/site/3.0/gnu/packages/base.scm
>
> and that is the same file that is opened with "guix edit". But it's a
> copy of the input source file that is part of some channel, so the
> provenance is lost.
I’m pretty sure that the union file itself is a link. By using
“readlink -f
/gnu/store/3qykwxq1mqlin3lrb93s3rzi1ah5xia8-guix-module-union/share/guile/site/3.0/gnu/packages/base.scm”
you could get the source directory of that file. The prefix will
indicate that this is a Guix source checkout, whereas for files from
other channels the prefix directory will differ.
Still, that’s a bit crude. It might be better to record a channel
reference in the package values.
--
Ricardo
next prev parent reply other threads:[~2021-04-01 13:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 10:07 Finding the channel in which a package is defined Konrad Hinsen
2021-04-01 10:11 ` Tobias Geerinckx-Rice
2021-04-01 10:25 ` Konrad Hinsen
2021-04-01 12:27 ` Tobias Geerinckx-Rice
2021-04-01 13:04 ` Ricardo Wurmus [this message]
2021-04-01 13:26 ` Mathieu Othacehe
2021-04-01 13:39 ` Tobias Geerinckx-Rice
2021-04-01 14:06 ` Pierre Neidhardt
2021-04-01 16:11 ` Konrad Hinsen
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=87k0pm2m11.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=guix-devel@gnu.org \
--cc=konrad.hinsen@fastmail.net \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).