aboutsummaryrefslogtreecommitdiff
path: root/guix/build-system
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2019-04-11 23:49:43 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2019-04-12 00:13:34 +0200
commit88e13c2587ab9a0f96bb63488c253fb14ac9ff60 (patch)
tree1a625e1dfac337f4455a1cc22dcbeab720c24d4d /guix/build-system
parentb2521eed916f10911ad7988c007c34f6e918bc93 (diff)
downloadgnu-guix-88e13c2587ab9a0f96bb63488c253fb14ac9ff60.tar
gnu-guix-88e13c2587ab9a0f96bb63488c253fb14ac9ff60.tar.gz
build-system/linux-module: Support module source versioning.
* guix/build-system/linux-module.scm (make-linux-module-builder) [native-inputs]: Add linux. [arguments]<#:phases>[install]: Install "System.map" and "Module.symvers". * guix/build/linux-module-build-system.scm (configure): Delete procedure. (%standard-phases): Delete "configure" phase.
Diffstat (limited to 'guix/build-system')
-rw-r--r--guix/build-system/linux-module.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index 3ed3351353..6084d22210 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -63,6 +63,9 @@
(package
(inherit linux)
(name (string-append (package-name linux) "-module-builder"))
+ (native-inputs
+ `(("linux" ,linux)
+ ,@(package-native-inputs linux)))
(arguments
(substitute-keyword-arguments (package-arguments linux)
((#:phases phases)
@@ -72,11 +75,17 @@
(invoke "make" "modules_prepare")))
(delete 'strip) ; faster.
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(out-lib-build (string-append out "/lib/modules/build")))
; TODO: Only preserve the minimum, i.e. [Kbuild], Kconfig, scripts, include, ".config".
(copy-recursively "." out-lib-build)
+ (let* ((linux (assoc-ref inputs "linux")))
+ (install-file (string-append linux "/System.map")
+ out-lib-build)
+ (let ((source (string-append linux "/Module.symvers")))
+ (if (file-exists? source)
+ (install-file source out-lib-build))))
#t)))))))))
(define* (lower name