summaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2014-07-20 11:29:48 -0500
committerEric Bavier <bavier@member.fsf.org>2014-07-20 11:36:09 -0500
commit7d193ec34881843573a8013163347cfd8b1e9001 (patch)
tree5bbcc39c2ef9c23c096e289e1803f50977d793e5 /guix/packages.scm
parent516e3b6f7a57f6b6f378c9174f8c5ffc990df7db (diff)
guix: refresh: Add --list-dependent option.
* guix/packages.scm (package-direct-inputs): New procedure. * gnu/packages.scm (vhash-refq, package-direct-dependents) (package-transitive-dependents, package-covering-dependents): New procedures. * guix/scripts/refresh.scm (%options, show-help, guix-refresh): Add --list-dependent option. * doc/guix.texi (Invoking guix refresh): Document '--list-dependent' option.
Diffstat (limited to 'guix/packages.scm')
-rw-r--r--guix/packages.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 985a573fd3..5c3da9f2ff 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -75,6 +75,7 @@
package-location
package-field-location
+ package-direct-inputs
package-transitive-inputs
package-transitive-target-inputs
package-transitive-native-inputs
@@ -484,12 +485,17 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
((input rest ...)
(loop rest (cons input result))))))
+(define (package-direct-inputs package)
+ "Return all the direct inputs of PACKAGE---i.e, its direct inputs along
+with their propagated inputs."
+ (append (package-native-inputs package)
+ (package-inputs package)
+ (package-propagated-inputs package)))
+
(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))))
+ (transitive-inputs (package-direct-inputs package)))
(define (package-transitive-target-inputs package)
"Return the transitive target inputs of PACKAGE---i.e., its direct inputs