aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2018-03-03 14:55:27 +0100
committerDanny Milosavljevic <dannym@scratchpost.org>2018-03-03 23:40:02 +0100
commit8b2219d84704a362e9a6c34d94458af275aac88f (patch)
tree170f84e99dcda591bfd6f378a8c510aa7ebd9d07
parentc94752ad22da4f90e16bc2402751bcc6bb6fd79a (diff)
downloadguix-8b2219d84704a362e9a6c34d94458af275aac88f.tar
guix-8b2219d84704a362e9a6c34d94458af275aac88f.tar.gz
linux-modules: Add module-aliases.
* gnu/build/linux-modules.scm (module-aliases): New variable.
-rw-r--r--gnu/build/linux-modules.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm
index 4a6d4ff089..4fe673cca2 100644
--- a/gnu/build/linux-modules.scm
+++ b/gnu/build/linux-modules.scm
@@ -30,6 +30,7 @@
#:use-module (ice-9 rdelim)
#:export (dot-ko
ensure-dot-ko
+ module-aliases
module-dependencies
recursive-module-dependencies
modules-loaded
@@ -95,6 +96,15 @@ contains module names, not actual file names."
(('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"))