diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-09-02 15:57:56 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-09-02 15:57:56 +0200 |
commit | 30dfac27a5642c36e7bb1ba7966566864ba2d28d (patch) | |
tree | 3b59623014eeea1df02cda5f926d803b9a36a828 /gnu/packages.scm | |
parent | d2ee294c0400ac8f2a10f10c3c9644da513a3712 (diff) | |
parent | 65e4109cdc96fbaee088f50d0138af8acef43141 (diff) | |
download | patches-30dfac27a5642c36e7bb1ba7966566864ba2d28d.tar patches-30dfac27a5642c36e7bb1ba7966566864ba2d28d.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages.scm')
-rw-r--r-- | gnu/packages.scm | 12 |
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 |