mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
packages: Export 'scheme-modules'.
* gnu/packages.scm (package-modules): Rename to... (scheme-modules): ... this. Export. Update callers.
This commit is contained in:
parent
94b4274d0d
commit
2a6ba87086
1 changed files with 5 additions and 4 deletions
|
@ -45,6 +45,7 @@ (define-module (gnu packages)
|
|||
%package-module-path
|
||||
|
||||
fold-packages
|
||||
scheme-modules ;XXX: for lack of a better place
|
||||
|
||||
find-packages-by-name
|
||||
find-best-packages-by-name
|
||||
|
@ -158,8 +159,8 @@ (define file-name->module-name
|
|||
(map string->symbol
|
||||
(string-tokenize (string-drop-right file 4) not-slash)))))
|
||||
|
||||
(define* (package-modules directory #:optional sub-directory)
|
||||
"Return the list of modules that provide packages for the distribution.
|
||||
(define* (scheme-modules directory #:optional sub-directory)
|
||||
"Return the list of Scheme modules available under DIRECTORY.
|
||||
Optionally, narrow the search to SUB-DIRECTORY."
|
||||
(define prefix-len
|
||||
(string-length directory))
|
||||
|
@ -184,9 +185,9 @@ (define* (all-package-modules #:optional (path (%package-module-path)))
|
|||
(fold-right (lambda (spec result)
|
||||
(match spec
|
||||
((? string? directory)
|
||||
(append (package-modules directory) result))
|
||||
(append (scheme-modules directory) result))
|
||||
((directory . sub-directory)
|
||||
(append (package-modules directory sub-directory)
|
||||
(append (scheme-modules directory sub-directory)
|
||||
result))))
|
||||
'()
|
||||
path))
|
||||
|
|
Loading…
Reference in a new issue