diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-09-01 19:21:06 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-09-02 19:58:03 +0200 |
commit | 113aef68fb489b08f020c57bddfbc76d7d14d45d (patch) | |
tree | 5a3b83c69a9c8a9febc0a9680776aa879a495bc7 /guix | |
parent | a2ebaddda7a5bd2b18193c5039f2650c07cce754 (diff) | |
download | gnu-guix-113aef68fb489b08f020c57bddfbc76d7d14d45d.tar gnu-guix-113aef68fb489b08f020c57bddfbc76d7d14d45d.tar.gz |
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.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/packages.scm | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/guix/packages.scm b/guix/packages.scm index 2ab45f9fb4..03b6174224 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -61,6 +61,7 @@ package-location package-transitive-inputs + package-transitive-propagated-inputs package-source-derivation package-derivation package-cross-derivation @@ -196,12 +197,8 @@ representation." (($ <origin> uri method sha256 name) (method store uri 'sha256 sha256 name)))) -(define (package-transitive-inputs package) - "Return the transitive inputs of PACKAGE---i.e., its direct inputs along -with their propagated inputs, recursively." - (let loop ((inputs (concatenate (list (package-native-inputs package) - (package-inputs package) - (package-propagated-inputs package)))) +(define (transitive-inputs inputs) + (let loop ((inputs inputs) (result '())) (match inputs (() @@ -217,6 +214,18 @@ with their propagated inputs, recursively." ((input rest ...) (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. |