diff options
Diffstat (limited to 'guix/packages.scm')
-rw-r--r-- | guix/packages.scm | 15 |
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. |