mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
linux-modules: Add module-aliases.
* gnu/build/linux-modules.scm (module-aliases): New variable.
This commit is contained in:
parent
c94752ad22
commit
8b2219d847
1 changed files with 10 additions and 0 deletions
|
@ -30,6 +30,7 @@ (define-module (gnu build linux-modules)
|
|||
#:use-module (ice-9 rdelim)
|
||||
#:export (dot-ko
|
||||
ensure-dot-ko
|
||||
module-aliases
|
||||
module-dependencies
|
||||
recursive-module-dependencies
|
||||
modules-loaded
|
||||
|
@ -95,6 +96,15 @@ (define (module-dependencies file)
|
|||
(('depends . what)
|
||||
(string-tokenize what %not-comma)))))
|
||||
|
||||
(define (module-aliases file)
|
||||
"Return the list of aliases of module FILE."
|
||||
(let ((info (modinfo-section-contents file)))
|
||||
(filter-map (match-lambda
|
||||
(('alias . value)
|
||||
value)
|
||||
(_ #f))
|
||||
(modinfo-section-contents file))))
|
||||
|
||||
(define dot-ko
|
||||
(cut string-append <> ".ko"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue