diff options
author | Eric Bavier <bavier@member.fsf.org> | 2015-07-21 20:45:54 -0500 |
---|---|---|
committer | Eric Bavier <bavier@member.fsf.org> | 2015-09-10 03:21:55 -0500 |
commit | a6d0b306c20f236324e4bd661d0f82750ee00e90 (patch) | |
tree | 05c2c2918637a52964e5782dbab2e4c56a7d9412 /gnu | |
parent | 8b45993235ce1ad71e4038452d6e7b4b063ce448 (diff) | |
download | guix-a6d0b306c20f236324e4bd661d0f82750ee00e90.tar.gz |
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 'gnu')
-rw-r--r-- | gnu/packages/version-control.scm | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 8d8003fe4c..3c0571bac6 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -98,24 +98,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? _) . _) - 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)) - (delete-duplicates ;XXX: efficiency - (append-map package-transitive-propagated-labels* - packages)))) - (define-public git ;; Keep in sync with 'git-manpages'! (package @@ -238,11 +220,13 @@ PACKAGES and their propagated inputs." `("PERL5LIB" ":" prefix ,(map (lambda (o) (string-append o "/lib/perl5/site_perl")) (list - ,@(package-propagated-input-refs + ,@(transitive-input-references 'inputs - (list perl-authen-sasl - perl-net-smtp-ssl - perl-io-socket-ssl)))))) + (map (lambda (l) + (assoc l (inputs))) + '("perl-authen-sasl" + "perl-net-smtp-ssl" + "perl-io-socket-ssl"))))))) ;; Tell 'git-submodule' where Perl is. (wrap-program git-sm |