diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2016-06-20 22:30:16 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2016-06-20 23:50:46 +0200 |
| commit | 2a6ba870867e31a32faca0dbf0e062bf9f5c0d78 (patch) | |
| tree | 078403659ac21a03a64317123798a9f3d86657f7 /gnu/packages.scm | |
| parent | 94b4274d0dc5768bac255980c7e785bd3dff261f (diff) | |
packages: Export 'scheme-modules'.
* gnu/packages.scm (package-modules): Rename to...
(scheme-modules): ... this. Export. Update callers.
Diffstat (limited to 'gnu/packages.scm')
| -rw-r--r-- | gnu/packages.scm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm index 7130f58fdd6..9496a270ebb 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | %package-module-path | 45 | %package-module-path |
| 46 | 46 | ||
| 47 | fold-packages | 47 | fold-packages |
| 48 | scheme-modules ;XXX: for lack of a better place | ||
| 48 | 49 | ||
| 49 | find-packages-by-name | 50 | find-packages-by-name |
| 50 | find-best-packages-by-name | 51 | find-best-packages-by-name |
| @@ -158,8 +159,8 @@ returned list is sorted in alphabetical order." | |||
| 158 | (map string->symbol | 159 | (map string->symbol |
| 159 | (string-tokenize (string-drop-right file 4) not-slash))))) | 160 | (string-tokenize (string-drop-right file 4) not-slash))))) |
| 160 | 161 | ||
| 161 | (define* (package-modules directory #:optional sub-directory) | 162 | (define* (scheme-modules directory #:optional sub-directory) |
| 162 | "Return the list of modules that provide packages for the distribution. | 163 | "Return the list of Scheme modules available under DIRECTORY. |
| 163 | Optionally, narrow the search to SUB-DIRECTORY." | 164 | Optionally, narrow the search to SUB-DIRECTORY." |
| 164 | (define prefix-len | 165 | (define prefix-len |
| 165 | (string-length directory)) | 166 | (string-length directory)) |
| @@ -184,9 +185,9 @@ search." | |||
| 184 | (fold-right (lambda (spec result) | 185 | (fold-right (lambda (spec result) |
| 185 | (match spec | 186 | (match spec |
| 186 | ((? string? directory) | 187 | ((? string? directory) |
| 187 | (append (package-modules directory) result)) | 188 | (append (scheme-modules directory) result)) |
| 188 | ((directory . sub-directory) | 189 | ((directory . sub-directory) |
| 189 | (append (package-modules directory sub-directory) | 190 | (append (scheme-modules directory sub-directory) |
| 190 | result)))) | 191 | result)))) |
| 191 | '() | 192 | '() |
| 192 | path)) | 193 | path)) |
