[Top][All Lists]

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

Re: How do you write a package's deps to a file?

From: Bonface M. K.
Subject: Re: How do you write a package's deps to a file?
Date: Tue, 01 Dec 2020 12:13:38 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)


zimoun <> 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. <>
Chief Emacs Bazu / Rieng ya software sare
Mchochezi of: <> / Twitter: @BonfaceKilz
GPG Key: D4F09EB110177E03C28E2FE1F5BBAE1E0392253F

Attachment: signature.asc
Description: PGP signature

reply via email to

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