diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-12-03 14:34:26 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-12-03 14:34:26 +0100 |
commit | fbb380a088cae8e64d85f0fb3eecebf02841eeaa (patch) | |
tree | f166378cfad9b1bd68beb41744df5f0dca38e21d | |
parent | 720e87fe9194cebf52be182d22678e7a78d67130 (diff) | |
download | guix-fbb380a088cae8e64d85f0fb3eecebf02841eeaa.tar.gz guix-fbb380a088cae8e64d85f0fb3eecebf02841eeaa.zip |
self: Factorize package dependency enumeration.
* guix/self.scm (transitive-package-dependencies): New procedure.
(compiled-guix)[dependencies]: Use it.
-rw-r--r-- | guix/self.scm | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/guix/self.scm b/guix/self.scm index e510596d96..c0de14b79a 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -777,6 +777,13 @@ Info manual." (copy-recursively #$miscellany #$output #:log (%make-void-port "w"))))))) +(define (transitive-package-dependencies package) + "Return the list of packages propagated by PACKAGE, including PACKAGE +itself." + (match (package-transitive-propagated-inputs package) + (((labels packages _ ...) ...) + (cons package packages)))) + (define* (compiled-guix source #:key (version %guix-version) (pull-version 1) (name (string-append "guix-" version)) @@ -818,14 +825,10 @@ Info manual." (specification->package "gnutls")) (define dependencies - (match (append-map (lambda (package) - (cons (list "x" package) - (package-transitive-propagated-inputs package))) - (list guile-gcrypt gnutls guile-git guile-avahi - guile-json guile-semver guile-ssh guile-sqlite3 - guile-zlib guile-lzlib)) - (((labels packages _ ...) ...) - packages))) + (append-map transitive-package-dependencies + (list guile-gcrypt gnutls guile-git guile-avahi + guile-json guile-semver guile-ssh guile-sqlite3 + guile-zlib guile-lzlib))) (define *core-modules* (scheme-node "guix-core" |