From mboxrd@z Thu Jan 1 00:00:00 1970 From: ericbavier@openmailbox.org Subject: [PATCH 5/6] guix: Move package-transitive-propagated-labels* and package-propagated-input-refs to (guix packages). Date: Thu, 9 Jul 2015 19:38:08 -0500 Message-ID: <1436488689-4078-5-git-send-email-ericbavier@openmailbox.org> References: <1436488689-4078-1-git-send-email-ericbavier@openmailbox.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDQtv-0005bM-9U for guix-devel@gnu.org; Fri, 10 Jul 2015 01:31:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDQtt-000299-V0 for guix-devel@gnu.org; Fri, 10 Jul 2015 01:31:07 -0400 Received: from smtp26.openmailbox.org ([62.4.1.60]:59985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDQtt-00028v-Na for guix-devel@gnu.org; Fri, 10 Jul 2015 01:31:05 -0400 In-Reply-To: <1436488689-4078-1-git-send-email-ericbavier@openmailbox.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Cc: Eric Bavier From: Eric Bavier * 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 ) 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 ) 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