build-system: linux-module: Allow passing #:make-flags argument.
* guix/build-system/linux-module.scm (linux-module-build): Add #:make-flags. (linux-module-build-cross): Add #:make-flags. * guix/build/linux-module-build-system.scm (install): Pass make-flags. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
This commit is contained in:
parent
b41068edce
commit
f51fd97ec5
2 changed files with 11 additions and 4 deletions
guix
|
@ -129,6 +129,7 @@
|
||||||
(phases '(@ (guix build linux-module-build-system)
|
(phases '(@ (guix build linux-module-build-system)
|
||||||
%standard-phases))
|
%standard-phases))
|
||||||
(outputs '("out"))
|
(outputs '("out"))
|
||||||
|
(make-flags ''())
|
||||||
(system (%current-system))
|
(system (%current-system))
|
||||||
(guile #f)
|
(guile #f)
|
||||||
(substitutable? #t)
|
(substitutable? #t)
|
||||||
|
@ -156,6 +157,7 @@
|
||||||
#:arch ,(system->arch (or target system))
|
#:arch ,(system->arch (or target system))
|
||||||
#:tests? ,tests?
|
#:tests? ,tests?
|
||||||
#:outputs %outputs
|
#:outputs %outputs
|
||||||
|
#:make-flags ,make-flags
|
||||||
#:inputs %build-inputs)))
|
#:inputs %build-inputs)))
|
||||||
|
|
||||||
(define guile-for-build
|
(define guile-for-build
|
||||||
|
@ -181,6 +183,7 @@
|
||||||
target native-drvs target-drvs
|
target native-drvs target-drvs
|
||||||
(guile #f)
|
(guile #f)
|
||||||
(outputs '("out"))
|
(outputs '("out"))
|
||||||
|
(make-flags ''())
|
||||||
(search-paths '())
|
(search-paths '())
|
||||||
(native-search-paths '())
|
(native-search-paths '())
|
||||||
(tests? #f)
|
(tests? #f)
|
||||||
|
@ -228,6 +231,7 @@
|
||||||
#:target ,target
|
#:target ,target
|
||||||
#:arch ,(system->arch (or target system))
|
#:arch ,(system->arch (or target system))
|
||||||
#:outputs %outputs
|
#:outputs %outputs
|
||||||
|
#:make-flags ,make-flags
|
||||||
#:inputs %build-target-inputs
|
#:inputs %build-target-inputs
|
||||||
#:native-inputs %build-host-inputs
|
#:native-inputs %build-host-inputs
|
||||||
#:search-paths
|
#:search-paths
|
||||||
|
|
|
@ -58,12 +58,13 @@
|
||||||
|
|
||||||
;; This block was copied from make-linux-libre--only took the "modules_install"
|
;; This block was copied from make-linux-libre--only took the "modules_install"
|
||||||
;; part.
|
;; part.
|
||||||
(define* (install #:key inputs native-inputs outputs #:allow-other-keys)
|
(define* (install #:key make-flags inputs native-inputs outputs
|
||||||
|
#:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(moddir (string-append out "/lib/modules")))
|
(moddir (string-append out "/lib/modules")))
|
||||||
;; Install kernel modules
|
;; Install kernel modules
|
||||||
(mkdir-p moddir)
|
(mkdir-p moddir)
|
||||||
(invoke "make" "-C"
|
(apply invoke "make" "-C"
|
||||||
(string-append (assoc-ref inputs "linux-module-builder")
|
(string-append (assoc-ref inputs "linux-module-builder")
|
||||||
"/lib/modules/build")
|
"/lib/modules/build")
|
||||||
(string-append "M=" (getcwd))
|
(string-append "M=" (getcwd))
|
||||||
|
@ -76,7 +77,8 @@
|
||||||
(string-append "INSTALL_PATH=" out)
|
(string-append "INSTALL_PATH=" out)
|
||||||
(string-append "INSTALL_MOD_PATH=" out)
|
(string-append "INSTALL_MOD_PATH=" out)
|
||||||
"INSTALL_MOD_STRIP=1"
|
"INSTALL_MOD_STRIP=1"
|
||||||
"modules_install")))
|
"modules_install"
|
||||||
|
(or make-flags '()))))
|
||||||
|
|
||||||
(define %standard-phases
|
(define %standard-phases
|
||||||
(modify-phases gnu:%standard-phases
|
(modify-phases gnu:%standard-phases
|
||||||
|
@ -84,7 +86,8 @@
|
||||||
(replace 'build build)
|
(replace 'build build)
|
||||||
(replace 'install install)))
|
(replace 'install install)))
|
||||||
|
|
||||||
(define* (linux-module-build #:key inputs (phases %standard-phases)
|
(define* (linux-module-build #:key inputs
|
||||||
|
(phases %standard-phases)
|
||||||
#:allow-other-keys #:rest args)
|
#:allow-other-keys #:rest args)
|
||||||
"Build the given package, applying all of PHASES in order, with a Linux
|
"Build the given package, applying all of PHASES in order, with a Linux
|
||||||
kernel in attendance."
|
kernel in attendance."
|
||||||
|
|
Reference in a new issue