summaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-09-13 21:28:01 +0200
committerLudovic Courtès <ludo@gnu.org>2015-09-13 21:28:01 +0200
commit75710da66710cef1d32053cd8f350d13057d02a7 (patch)
treeabef6a326c741b1eb18db866b2f2bacee3e5fc51 /guix/packages.scm
parentab20c2cc33063ce783515d8ae7899ec7e2ca6f96 (diff)
parent610075f7c94c80b8321887b7ccf8bb1a7edd2b8e (diff)
downloadgnu-guix-75710da66710cef1d32053cd8f350d13057d02a7.tar
gnu-guix-75710da66710cef1d32053cd8f350d13057d02a7.tar.gz
Merge branch 'master' into core-updates
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 da4940981d..49c6b44884 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
%hurd-systems
%hydra-supported-systems
@@ -604,6 +607,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.