unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Bonface M. K." <bonfacemunyoki@gmail.com>
To: zimoun <zimon.toutoune@gmail.com>
Cc: help-guix@gnu.org, Pjotr Prins <pjotr2020@thebird.nl>
Subject: Re: How do you write a package's deps to a file?
Date: Tue, 01 Dec 2020 12:13:38 +0300	[thread overview]
Message-ID: <86k0u1ga7x.fsf@gmail.com> (raw)
In-Reply-To: <868saiwhsx.fsf@gmail.com> (zimoun's message of "Tue, 01 Dec 2020 00:23:10 +0100")

[-- Attachment #1: Type: text/plain, Size: 2169 bytes --]

Hi!

zimoun <zimon.toutoune@gmail.com> writes:

[...]
> …I am not convinced it is the right level to extract the
> information you need since ’input’ is, e.g.,
>
>   ;;; (("source" . "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"))
>   ;;; (("grep" . "/gnu/store/yhqc5imq7sn2sf9f48dj4gk12y4kw4s4-grep-3.4"))
>   ;;; (("libc:static" . "/gnu/store/s3dcqzwqaakv1yx37by9chksdbkgih17-glibc-2.31-static"))
>   
> therefore you need ’specification->package’ to find back the package
> mapping to the string in order to access the metadata (version,
> home-page, etc.).  Aside the issue that some do not have corresponding
> packages (source, libc:static for instance).  Aside the issue of
> multiple versions, for instance compare the version of the ’gcc’ input
> of ’hello’ returning the string “gcc” with:
>
> scheme@(guix-user)> (specification->package "gcc")
> guix repl: package 'gcc' has been superseded by 'gcc-toolchain'
> $1 = #<package gcc-toolchain@10.2.0 gnu/packages/commencement.scm:3836 7f3b72596640>
>

I sse that now. Thanks for pointing that out.

>
> What do you want?  Get the list of inputs and their metadata when typing
> “guix install foo”?  And this list becoming part of the outputs?  Or
> simply get somehow the list of inputs and their metadata?  Which is
> straightforward.
>

Yes! Ideally I want to get details of the package
inputs, so that I could use that info to write to
a file somewhere in the outputs dir. The end goal
is to use that file to display (on some website)
the dependencies the project has. So when you do,
say, `guix install <my-awesome-package>`, as part
of your outputs, you also generate a file that
explicitly list the deps as part of your output ;)

>
> Well, I am interested by the answer of: is it possible to get the
>

I think Efraim's suggestion in this thread is more
pragmatic ;)

> All the best,
> simon
>

-- 
Bonface M. K. <https://www.bonfacemunyoki.com>
Chief Emacs Bazu / Rieng ya software sare
Mchochezi of: <https://upbookclub.com> / Twitter: @BonfaceKilz
GPG Key: D4F09EB110177E03C28E2FE1F5BBAE1E0392253F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 869 bytes --]

  reply	other threads:[~2020-12-01  9:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 16:25 How do you write a package's deps to a file? Bonface M. K.
2020-11-30 17:17 ` Julien Lepiller
2020-11-30 23:23   ` zimoun
2020-12-01  9:13     ` Bonface M. K. [this message]
2020-12-01  9:59       ` zimoun
2020-12-01 18:04         ` Bonface M. K.
2020-12-01  8:29   ` Bonface M. K.
2020-12-01  7:35 ` Efraim Flashner
2020-12-01  9:15   ` Bonface M. K.

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=86k0u1ga7x.fsf@gmail.com \
    --to=bonfacemunyoki@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=pjotr2020@thebird.nl \
    --cc=zimon.toutoune@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).