From: Eric Bavier <bav...@member.fsf.org> * gnu/packages/version-control.scm (package-transitive-propagated-labels*) (package-propagated-input-refs): Move from here... * guix/packages.scm: ...to here. --- gnu/packages/version-control.scm | 17 ----------------- guix/packages.scm | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 15e6fb6..eee3a2f 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -99,23 +99,6 @@ changes to project files over time. It supports both a distributed workflow as well as the classic centralized workflow.") (license gpl2+))) -(define (package-transitive-propagated-labels* package) - "Return a list of the input labels of PACKAGE and its transitive inputs." - (let ((name (package-name package))) - `(,name - ,@(map (match-lambda - ((label (? package? _) . _) - (string-append name "/" label))) - (package-transitive-propagated-inputs package))))) - -(define (package-propagated-input-refs inputs packages) - "Return a list of (assoc-ref INPUTS <package-name>) for each package in -PACKAGES and their propagated inputs." - (map (lambda (l) - `(assoc-ref ,inputs ,l)) - (append-map package-transitive-propagated-labels* - packages))) - (define-public git ;; Keep in sync with 'git-manpages'! (package diff --git a/guix/packages.scm b/guix/packages.scm index 5a28085..e84d129 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -93,6 +93,9 @@ package-output package-grafts + package-transitive-propagated-labels* + package-propagated-input-refs + %supported-systems %hydra-supported-systems supported-package? @@ -559,6 +562,23 @@ for the host system (\"native inputs\"), and not target inputs." recursively." (transitive-inputs (package-propagated-inputs package))) +(define (package-transitive-propagated-labels* package) + "Return a list of the input labels of PACKAGE and its transitive inputs." + (let ((name (package-name package))) + `(,name + ,@(map (match-lambda + ((label (? package? _) . _) + (string-append name "/" label))) + (package-transitive-propagated-inputs package))))) + +(define (package-propagated-input-refs inputs packages) + "Return a list of (assoc-ref INPUTS <package-name>) for each package in +PACKAGES and their transitive propagated inputs." + (map (lambda (l) + `(assoc-ref ,inputs ,l)) + (append-map package-transitive-propagated-labels* + packages))) + (define-syntax define-memoized/v (lambda (form) "Define a memoized single-valued unary procedure with docstring. -- 2.4.3