summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/build-system/linux-module.scm4
-rw-r--r--guix/build/linux-module-build-system.scm9
2 files changed, 8 insertions, 5 deletions
diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index fc3d959ce7..33bc8c95df 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -158,6 +158,7 @@
(outputs '("out"))
(make-flags ''())
(system (%current-system))
+ (source-directory ".")
(guile #f)
(substitutable? #t)
(imported-modules
@@ -175,7 +176,8 @@
((source)
source)
(source
- source))
+ source))
+ #:source-directory ,source-directory
#:search-paths ',(map search-path-specification->sexp
search-paths)
#:phases ,phases
diff --git a/guix/build/linux-module-build-system.scm b/guix/build/linux-module-build-system.scm
index d51d76f94b..729ab6154f 100644
--- a/guix/build/linux-module-build-system.scm
+++ b/guix/build/linux-module-build-system.scm
@@ -49,16 +49,17 @@
; TODO: kernel ".config".
#t)
-(define* (build #:key inputs make-flags #:allow-other-keys)
+(define* (build #:key inputs make-flags (source-directory ".") #:allow-other-keys)
(apply invoke "make" "-C"
(string-append (assoc-ref inputs "linux-module-builder")
"/lib/modules/build")
- (string-append "M=" (getcwd))
+ (string-append "M=" (getcwd) "/" source-directory)
(or make-flags '())))
;; This block was copied from make-linux-libre--only took the "modules_install"
;; part.
-(define* (install #:key make-flags inputs native-inputs outputs
+(define* (install #:key make-flags (source-directory ".")
+ inputs native-inputs outputs
#:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(moddir (string-append out "/lib/modules")))
@@ -67,7 +68,7 @@
(apply invoke "make" "-C"
(string-append (assoc-ref inputs "linux-module-builder")
"/lib/modules/build")
- (string-append "M=" (getcwd))
+ (string-append "M=" (getcwd) "/" source-directory)
;; Disable depmod because the Guix system's module directory
;; is an union of potentially multiple packages. It is not
;; possible to use depmod to usefully calculate a dependency