mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
packages: 'fold-packages' takes #:select? parameter.
* gnu/packages.scm (fold-packages): Add #:select? parameter and honor it.
This commit is contained in:
parent
c9405c461b
commit
96dc8f3527
1 changed files with 5 additions and 5 deletions
|
@ -142,13 +142,13 @@ (define %patch-path
|
|||
|
||||
(define* (fold-packages proc init
|
||||
#:optional
|
||||
(modules (all-modules (%package-module-path))))
|
||||
(modules (all-modules (%package-module-path)))
|
||||
#:key (select? (negate hidden-package?)))
|
||||
"Call (PROC PACKAGE RESULT) for each available package defined in one of
|
||||
MODULES, using INIT as the initial value of RESULT. It is guaranteed to never
|
||||
traverse the same package twice."
|
||||
MODULES that matches SELECT?, using INIT as the initial value of RESULT. It
|
||||
is guaranteed to never traverse the same package twice."
|
||||
(fold-module-public-variables (lambda (object result)
|
||||
(if (and (package? object)
|
||||
(not (hidden-package? object)))
|
||||
(if (and (package? object) (select? object))
|
||||
(proc object result)
|
||||
result))
|
||||
init
|
||||
|
|
Loading…
Reference in a new issue