guix-devel
[Top][All Lists]
Advanced

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

Re: Finding the channel in which a package is defined


From: Ricardo Wurmus
Subject: Re: Finding the channel in which a package is defined
Date: Thu, 01 Apr 2021 15:04:58 +0200
User-agent: mu4e 1.4.15; emacs 27.2

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



reply via email to

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