[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/20: build-system/linux-module: Use G-expressions.
From: |
guix-commits |
Subject: |
10/20: build-system/linux-module: Use G-expressions. |
Date: |
Wed, 19 Jan 2022 13:14:10 -0500 (EST) |
nckx pushed a commit to branch master
in repository guix.
commit 2e86059172d901dcb24d29f7a477d2229b02cd6b
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Thu Dec 23 22:18:22 2021 +0100
build-system/linux-module: Use G-expressions.
* guix/build-system/linux-module.scm (make-linux-module-builder)
[arguments]: Rewrite as G-expressions.
---
guix/build-system/linux-module.scm | 93 +++++++++++++++++++-------------------
1 file changed, 46 insertions(+), 47 deletions(-)
diff --git a/guix/build-system/linux-module.scm
b/guix/build-system/linux-module.scm
index 57fce8e96e..e82a9ca65c 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -61,53 +61,52 @@
`(("linux" ,linux)))
(arguments
(substitute-keyword-arguments (package-arguments linux)
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'build
- (lambda _
- (invoke "make" "modules_prepare")))
- (delete 'strip) ; faster.
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (out-lib-build (string-append out "/lib/modules/build")))
- ;; Delete some huge items that we probably don't need.
- ;; TODO: Only preserve the minimum, i.e. [Kbuild], Kconfig,
- ;; scripts, include, ".config".
- (copy-recursively "." out-lib-build)
- (for-each (lambda (name)
- (when (file-exists? name)
- (delete-file-recursively name)))
- (map (lambda (name)
- (string-append out-lib-build "/" name))
- '("arch" ; 137 MB
- ;"tools" ; 44 MB ; Note: is built by our 'build phase.
- "tools/testing" ; 14 MB
- "tools/perf" ; 17 MB
- "drivers" ; 600 MB
- "Documentation" ; 52 MB
- "fs" ; 43 MB
- "net" ; 33 MB
- "samples" ; 2 MB
- "sound"))) ; 40 MB
- ;; Reinstate arch/**/dts since "scripts/dtc" depends on it.
- ;; Reinstate arch/**/include directories.
- ;; Reinstate arch/**/Makefile.
- ;; Reinstate arch/**/module.lds.
- (for-each
- (lambda (name)
- (mkdir-p (dirname (string-append out-lib-build "/" name)))
- (copy-recursively name
- (string-append out-lib-build "/" name)))
- (append (find-files "arch" "^(dts|include)$" #:directories?
#t)
- (find-files "arch" "^(Makefile|module.lds)$")))
- (let* ((linux (assoc-ref inputs "linux")))
- (install-file (string-append linux "/System.map")
- out-lib-build)
- (let ((source (string-append linux "/Module.symvers")))
- (when (file-exists? source)
- (install-file source out-lib-build))))
- #t)))))))))
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (replace 'build
+ (lambda _
+ (invoke "make" "modules_prepare")))
+ (delete 'strip) ; faster
+ (replace 'install
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((out-lib-build (string-append #$output
"/lib/modules/build")))
+ ;; Delete some huge items that we probably don't need.
+ ;; TODO: Only preserve the minimum, i.e. [Kbuild], Kconfig,
+ ;; scripts, include, ".config".
+ (copy-recursively "." out-lib-build)
+ (for-each (lambda (name)
+ (when (file-exists? name)
+ (delete-file-recursively name)))
+ (map (lambda (name)
+ (string-append out-lib-build "/" name))
+ '("arch" ; 137 MB
+ ;;"tools" ; 44 MB built by our 'build
phase
+ "tools/testing" ; 14 MB
+ "tools/perf" ; 17 MB
+ "drivers" ; 600 MB
+ "Documentation" ; 52 MB
+ "fs" ; 43 MB
+ "net" ; 33 MB
+ "samples" ; 2 MB
+ "sound"))) ; 40 MB
+ ;; Reinstate arch/**/dts since "scripts/dtc" depends on it.
+ ;; Reinstate arch/**/include directories.
+ ;; Reinstate arch/**/Makefile.
+ ;; Reinstate arch/**/module.lds.
+ (for-each
+ (lambda (name)
+ (mkdir-p (dirname (string-append out-lib-build "/" name)))
+ (copy-recursively name
+ (string-append out-lib-build "/" name)))
+ (append (find-files "arch" "^(dts|include)$"
+ #:directories? #t)
+ (find-files "arch" "^(Makefile|module.lds)$")))
+ (let* ((linux #$(this-package-input "linux")))
+ (install-file (string-append linux "/System.map")
+ out-lib-build)
+ (let ((source (string-append linux "/Module.symvers")))
+ (when (file-exists? source)
+ (install-file source out-lib-build)))))))))))))
(define* (lower name
#:key source inputs native-inputs outputs
- branch master updated (6e92790b42 -> 42f246eb84), guix-commits, 2022/01/19
- 01/20: gnu: bind: Update to 9.16.25., guix-commits, 2022/01/19
- 09/20: gnu: make-linux-libre*: Use G-expressions., guix-commits, 2022/01/19
- 04/20: gnu: hostapd: Use PKG-CONFIG-FOR-TARGET., guix-commits, 2022/01/19
- 05/20: gnu: hostapd: Use G-expressions., guix-commits, 2022/01/19
- 08/20: gnu: scanbd: Fix build., guix-commits, 2022/01/19
- 06/20: gnu: chromaprint: Update to 1.5.1., guix-commits, 2022/01/19
- 07/20: gnu: scanbd: Use G-expressions., guix-commits, 2022/01/19
- 11/20: gnu: acpi-call-linux-module: Use G-expressions., guix-commits, 2022/01/19
- 10/20: build-system/linux-module: Use G-expressions.,
guix-commits <=
- 12/20: gnu: librem-ec-acpi-linux-module: Unquote arguments., guix-commits, 2022/01/19
- 15/20: gnu: vhba-module: Unquote arguments., guix-commits, 2022/01/19
- 16/20: gnu: bbswitch-module: Unquote arguments., guix-commits, 2022/01/19
- 02/20: gnu: expat: Add replacement for [security fixes]., guix-commits, 2022/01/19
- 03/20: gnu: hostapd: Update to 2.10., guix-commits, 2022/01/19
- 13/20: gnu: rtl8821ce-linux-module: Use G-expressions., guix-commits, 2022/01/19
- 14/20: gnu: rtl8812au-aircrack-ng-linux-module: Use G-expressions., guix-commits, 2022/01/19
- 17/20: gnu: ddcci-driver-linux: Update to 0.4.2., guix-commits, 2022/01/19
- 18/20: gnu: ddcci-driver-linux: Use G-expressions., guix-commits, 2022/01/19
- 19/20: gnu: v4l2loopback-linux-module: Unquote arguments., guix-commits, 2022/01/19