diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2017-05-19 10:45:12 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2017-05-20 10:17:43 +0200 |
| commit | 4ee6584cbfe5389db72f490f29e438f9935c2316 (patch) | |
| tree | 23ebd04d6690c354ca1ff407af02c516e034d32e | |
| parent | 4a628d57fc7956ae8a0fb167337d83ba66fe4f52 (diff) | |
modules: Add more source-less modules.
* guix/modules.scm (%source-less-modules): New variable.
(source-module-dependencies): Use it.
| -rw-r--r-- | guix/modules.scm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/guix/modules.scm b/guix/modules.scm index 8c63f21a97e..24b59035792 100644 --- a/guix/modules.scm +++ b/guix/modules.scm | |||
| @@ -95,11 +95,16 @@ depends on." | |||
| 95 | (('gnu _ ...) #t) | 95 | (('gnu _ ...) #t) |
| 96 | (_ #f))) | 96 | (_ #f))) |
| 97 | 97 | ||
| 98 | (define %source-less-modules | ||
| 99 | ;; These are modules that have no corresponding source files or a source | ||
| 100 | ;; file different from what you'd expect. | ||
| 101 | '((system syntax) ;2.0, defined in boot-9 | ||
| 102 | (ice-9 ports internal) ;2.2, defined in (ice-9 ports) | ||
| 103 | (system syntax internal))) ;2.2, defined in boot-9 | ||
| 104 | |||
| 98 | (define* (source-module-dependencies module #:optional (load-path %load-path)) | 105 | (define* (source-module-dependencies module #:optional (load-path %load-path)) |
| 99 | "Return the modules used by MODULE by looking at its source code." | 106 | "Return the modules used by MODULE by looking at its source code." |
| 100 | ;; The (system syntax) module is a special-case because it has no | 107 | (if (member module %source-less-modules) |
| 101 | ;; corresponding source file (as of Guile 2.0.) | ||
| 102 | (if (equal? module '(system syntax)) | ||
| 103 | '() | 108 | '() |
| 104 | (module-file-dependencies | 109 | (module-file-dependencies |
| 105 | (search-path load-path | 110 | (search-path load-path |
