* (hidden) wrapper+dependencies inconsistency=manifest fails?
@ 2019-09-20 16:18 zimoun
2019-09-24 8:01 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: zimoun @ 2019-09-20 16:18 UTC (permalink / raw)
To: Guix Devel
Dear,
An example is better than too much words. :-)
This command lists the dependencies of the "guix" package.
guix package --show=guix | recsel -p dependencies
Then this command fails:
guix package --show=autoconf-wrapper
It is expected because the "wrapper" is not a "real" package and it is
not exposed. Only the package "autoconf" is.
Therefore, you cannot chain:
guix package -i `guix package --show=guix | recsel -P dependencies`
guix package: error: autoconf-wrapper: package not found for version 2.69
Moreover, the name in "native-inputs" is not consistent with the
declared name. I mean:
guix repl
> ,use(guix)
> ,use(gnu packages package-management)
> (package-native-inputs guix)
> (map car (package-native-inputs guix))
> (map package-name (map cadr (package-native-inputs guix)))
Last, "specifications->manifest" is nice because one does not have to
know where each dependencies is defined. To be concrete, it is easy:
guix package --show=guix | recesel -p location
gives the name of the file which is the name of the module. So a
manifest is quickly written:
--8<---------------cut here---------------start------------->8---
(use-modules (guix)
(gnu packages package-management))
(specifications->manifest
`(,@(map package-full-name
(map cadr (package-native-inputs guix)))))
--8<---------------cut here---------------end--------------->8---
Then,
guix package -p guix-dev -m the-manifest.scm
But this also fails:
error: autoconf-wrapper: package not found for version 2.69
which is expected. I guess.
Something in this flavour should be added:
--8<---------------cut here---------------start------------->8---
(define* (specifications-native-inputs package #:optional (delimiter "@"))
(define (package-name+delimiter package)
(let ((name (car package))
(version (package-version (cadr package))))
(string-append name delimiter version)))
(map package-name+delimiter
(package-native-inputs package)))
--8<---------------cut here---------------end--------------->8---
Then, the manifest becomes straightforward:
--8<---------------cut here---------------start------------->8---
(use-modules (guix)
(gnu packages package-management))
(specifications->manifest
`(,@(specifications-native-inputs guix)))
--8<---------------cut here---------------end--------------->8---
What do you think?
Does it make sense?
All the best,
simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: (hidden) wrapper+dependencies inconsistency=manifest fails?
2019-09-20 16:18 (hidden) wrapper+dependencies inconsistency=manifest fails? zimoun
@ 2019-09-24 8:01 ` Ludovic Courtès
2019-09-24 16:52 ` zimoun
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2019-09-24 8:01 UTC (permalink / raw)
To: zimoun; +Cc: Guix Devel
Hi!
zimoun <zimon.toutoune@gmail.com> skribis:
> This command lists the dependencies of the "guix" package.
>
> guix package --show=guix | recsel -p dependencies
>
> Then this command fails:
> guix package --show=autoconf-wrapper
>
> It is expected because the "wrapper" is not a "real" package and it is
> not exposed. Only the package "autoconf" is.
>
>
> Therefore, you cannot chain:
>
> guix package -i `guix package --show=guix | recsel -P dependencies`
>
> guix package: error: autoconf-wrapper: package not found for version 2.69
Yes, but it’s a fact of life IMO. :-)
> Moreover, the name in "native-inputs" is not consistent with the
> declared name. I mean:
> guix repl
>> ,use(guix)
>> ,use(gnu packages package-management)
>> (package-native-inputs guix)
>> (map car (package-native-inputs guix))
This gives you the list of labels for each input. The labels do _not_
have to match package names; they can be anything, there can even be
duplicates, etc. You should not rely on them at all to identify
packages.
Eventually, once build systems use gexp, I hope we can even get rid of
these labels. Guix 2.0.
Does that make sense?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: (hidden) wrapper+dependencies inconsistency=manifest fails?
2019-09-24 8:01 ` Ludovic Courtès
@ 2019-09-24 16:52 ` zimoun
0 siblings, 0 replies; 3+ messages in thread
From: zimoun @ 2019-09-24 16:52 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix Devel
Hi Ludo,
Thank you for explaining.
On Tue, 24 Sep 2019 at 10:01, Ludovic Courtès <ludo@gnu.org> wrote:
> zimoun <zimon.toutoune@gmail.com> skribis:
> > Therefore, you cannot chain:
> >
> > guix package -i `guix package --show=guix | recsel -P dependencies`
> >
> > guix package: error: autoconf-wrapper: package not found for version 2.69
>
> Yes, but it’s a fact of life IMO. :-)
It is against the Unix Philosophy: "Expect the output of every program
to become the input to another". ;-)
Isn't it?
Well, I take that as an annoying fact of life. :-)
> > Moreover, the name in "native-inputs" is not consistent with the
> > declared name. I mean:
> > guix repl
> >> ,use(guix)
> >> ,use(gnu packages package-management)
> >> (package-native-inputs guix)
> >> (map car (package-native-inputs guix))
>
> This gives you the list of labels for each input. The labels do _not_
> have to match package names; they can be anything, there can even be
> duplicates, etc. You should not rely on them at all to identify
> packages.
I understand.
But how to lazily create a manifest without diving in too much details?
Well, how can I create a profile to build guix?
> Eventually, once build systems use gexp, I hope we can even get rid of
> these labels. Guix 2.0.
If they are useless. :-)
> Does that make sense?
Thank you for the explanations.
All the best,
simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-24 16:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-20 16:18 (hidden) wrapper+dependencies inconsistency=manifest fails? zimoun
2019-09-24 8:01 ` Ludovic Courtès
2019-09-24 16:52 ` zimoun
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).