mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 23:46:13 -05:00
modules: Add more source-less modules.
* guix/modules.scm (%source-less-modules): New variable. (source-module-dependencies): Use it.
This commit is contained in:
parent
ffa5e0a6d2
commit
7afc2aabdf
1 changed files with 8 additions and 3 deletions
|
@ -95,11 +95,16 @@ (define (guix-module-name? name)
|
|||
(('gnu _ ...) #t)
|
||||
(_ #f)))
|
||||
|
||||
(define %source-less-modules
|
||||
;; These are modules that have no corresponding source files or a source
|
||||
;; file different from what you'd expect.
|
||||
'((system syntax) ;2.0, defined in boot-9
|
||||
(ice-9 ports internal) ;2.2, defined in (ice-9 ports)
|
||||
(system syntax internal))) ;2.2, defined in boot-9
|
||||
|
||||
(define* (source-module-dependencies module #:optional (load-path %load-path))
|
||||
"Return the modules used by MODULE by looking at its source code."
|
||||
;; The (system syntax) module is a special-case because it has no
|
||||
;; corresponding source file (as of Guile 2.0.)
|
||||
(if (equal? module '(system syntax))
|
||||
(if (member module %source-less-modules)
|
||||
'()
|
||||
(module-file-dependencies
|
||||
(search-path load-path
|
||||
|
|
Loading…
Reference in a new issue