diff options
-rw-r--r-- | guix/build-system/linux-module.scm | 11 | ||||
-rw-r--r-- | guix/build/linux-module-build-system.scm | 6 |
2 files changed, 11 insertions, 6 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 diff --git a/guix/build/linux-module-build-system.scm b/guix/build/linux-module-build-system.scm index a6664f1eca..01cb8cef6c 100644 --- a/guix/build/linux-module-build-system.scm +++ b/guix/build/linux-module-build-system.scm @@ -32,10 +32,6 @@ ;; ;; Code: -;; TODO: It might make sense to provide "Module.symvers" in the future. -(define* (configure #:key inputs #:allow-other-keys) - #t) - (define* (build #:key inputs make-flags #:allow-other-keys) (apply invoke "make" "-C" (string-append (assoc-ref inputs "linux-module-builder") @@ -64,7 +60,7 @@ (define %standard-phases (modify-phases gnu:%standard-phases - (replace 'configure configure) + (delete 'configure) (replace 'build build) (replace 'install install))) |