summaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2015-07-21 20:45:54 -0500
committerEric Bavier <bavier@member.fsf.org>2015-09-10 03:21:55 -0500
commita6d0b306c20f236324e4bd661d0f82750ee00e90 (patch)
tree05c2c2918637a52964e5782dbab2e4c56a7d9412 /guix/packages.scm
parent8b45993235ce1ad71e4038452d6e7b4b063ce448 (diff)
guix: packages: Add transitive-input-references.
* guix/packages.scm (transitive-input-references): New procedure. * gnu/packages/version-control.scm (package-transitive-propagated-labels*) (package-propagated-input-refs): Delete. (git)[arguments]: Adjust to transitive-input-references.
Diffstat (limited to 'guix/packages.scm')
-rw-r--r--guix/packages.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 3983d1409a..e466ffeda0 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -93,6 +94,8 @@
package-output
package-grafts
+ transitive-input-references
+
%supported-systems
%hydra-supported-systems
supported-package?
@@ -579,6 +582,18 @@ for the host system (\"native inputs\"), and not target inputs."
recursively."
(transitive-inputs (package-propagated-inputs package)))
+(define (transitive-input-references alist inputs)
+ "Return a list of (assoc-ref ALIST <label>) for each (<label> <package> . _)
+in INPUTS and their transitive propagated inputs."
+ (define label
+ (match-lambda
+ ((label . _)
+ label)))
+
+ (map (lambda (input)
+ `(assoc-ref ,alist ,(label input)))
+ (transitive-inputs inputs)))
+
(define-syntax define-memoized/v
(lambda (form)
"Define a memoized single-valued unary procedure with docstring.