[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(hidden) wrapper+dependencies inconsistency=manifest fails?
From: |
zimoun |
Subject: |
(hidden) wrapper+dependencies inconsistency=manifest fails? |
Date: |
Fri, 20 Sep 2019 18:18:01 +0200 |
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
- (hidden) wrapper+dependencies inconsistency=manifest fails?,
zimoun <=