mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 21:46:35 +01:00
packages: Add `package-transitive-propagated-inputs'.
* guix/packages.scm (transitive-inputs): New procedure. (package-transitive-inputs): Rewrite in terms of `transitive-inputs'. (package-transitive-propagated-inputs): New procedure.
This commit is contained in:
parent
a2ebaddda7
commit
113aef68fb
1 changed files with 15 additions and 6 deletions
|
@ -61,6 +61,7 @@ (define-module (guix packages)
|
||||||
package-location
|
package-location
|
||||||
|
|
||||||
package-transitive-inputs
|
package-transitive-inputs
|
||||||
|
package-transitive-propagated-inputs
|
||||||
package-source-derivation
|
package-source-derivation
|
||||||
package-derivation
|
package-derivation
|
||||||
package-cross-derivation
|
package-cross-derivation
|
||||||
|
@ -196,12 +197,8 @@ (define (package-source-derivation store source)
|
||||||
(($ <origin> uri method sha256 name)
|
(($ <origin> uri method sha256 name)
|
||||||
(method store uri 'sha256 sha256 name))))
|
(method store uri 'sha256 sha256 name))))
|
||||||
|
|
||||||
(define (package-transitive-inputs package)
|
(define (transitive-inputs inputs)
|
||||||
"Return the transitive inputs of PACKAGE---i.e., its direct inputs along
|
(let loop ((inputs inputs)
|
||||||
with their propagated inputs, recursively."
|
|
||||||
(let loop ((inputs (concatenate (list (package-native-inputs package)
|
|
||||||
(package-inputs package)
|
|
||||||
(package-propagated-inputs package))))
|
|
||||||
(result '()))
|
(result '()))
|
||||||
(match inputs
|
(match inputs
|
||||||
(()
|
(()
|
||||||
|
@ -217,6 +214,18 @@ (define (package-transitive-inputs package)
|
||||||
((input rest ...)
|
((input rest ...)
|
||||||
(loop rest (cons input result))))))
|
(loop rest (cons input result))))))
|
||||||
|
|
||||||
|
(define (package-transitive-inputs package)
|
||||||
|
"Return the transitive inputs of PACKAGE---i.e., its direct inputs along
|
||||||
|
with their propagated inputs, recursively."
|
||||||
|
(transitive-inputs (append (package-native-inputs package)
|
||||||
|
(package-inputs package)
|
||||||
|
(package-propagated-inputs package))))
|
||||||
|
|
||||||
|
(define (package-transitive-propagated-inputs package)
|
||||||
|
"Return the propagated inputs of PACKAGE, and their propagated inputs,
|
||||||
|
recursively."
|
||||||
|
(transitive-inputs (package-propagated-inputs package)))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Package derivations.
|
;;; Package derivations.
|
||||||
|
|
Loading…
Reference in a new issue