aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-09-02 15:57:56 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-09-02 15:57:56 +0200
commit30dfac27a5642c36e7bb1ba7966566864ba2d28d (patch)
tree3b59623014eeea1df02cda5f926d803b9a36a828 /gnu/packages.scm
parentd2ee294c0400ac8f2a10f10c3c9644da513a3712 (diff)
parent65e4109cdc96fbaee088f50d0138af8acef43141 (diff)
downloadpatches-30dfac27a5642c36e7bb1ba7966566864ba2d28d.tar
patches-30dfac27a5642c36e7bb1ba7966566864ba2d28d.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages.scm')
-rw-r--r--gnu/packages.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm
index 5629061788..b4ac6661ca 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -140,17 +140,19 @@ for system '~a'")
directory))
%load-path)))
-(define (fold-packages proc init)
- "Call (PROC PACKAGE RESULT) for each available package, using INIT as
-the initial value of RESULT. It is guaranteed to never traverse the
-same package twice."
+(define* (fold-packages proc init
+ #:optional
+ (modules (all-modules (%package-module-path))))
+ "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."
(fold-module-public-variables (lambda (object result)
(if (and (package? object)
(not (hidden-package? object)))
(proc object result)
result))
init
- (all-modules (%package-module-path))))
+ modules))
(define find-packages-by-name
(let ((packages (delay