[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/14: gnu: crda: Use G-expressions.
From: |
guix-commits |
Subject: |
13/14: gnu: crda: Use G-expressions. |
Date: |
Fri, 7 Jul 2023 17:35:27 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 59da3b68921d9e2f273e38fe8fbc1d0af4744919
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Jul 2 02:00:01 2023 +0200
gnu: crda: Use G-expressions.
* gnu/packages/linux.scm (crda)[arguments]:
Rewrite as G-expressions.
---
gnu/packages/linux.scm | 106 ++++++++++++++++++++++++-------------------------
1 file changed, 53 insertions(+), 53 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 89ae442e83..cd6b50129e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4569,60 +4569,60 @@ interface.")
(patches (search-patches "crda-optional-gcrypt.patch"))))
(build-system gnu-build-system)
(arguments
- `(#:phases (modify-phases %standard-phases
- (delete 'configure)
- (add-after 'unpack 'gzip-determinism
- (lambda _
- (substitute* "Makefile"
- (("gzip") "gzip --no-name"))))
- ,@(if (%current-target-system)
- '((add-after
- 'unpack 'fix-pkg-config
- (lambda* (#:key target #:allow-other-keys)
- (substitute*
- "Makefile"
- (("pkg-config")
- (string-append target
"-pkg-config"))))))
- '())
- (add-before 'build 'patch-Makefile
- (lambda _
- (substitute* "Makefile"
- (("ldconfig") "true"))))
- (add-before 'build 'set-regulatory-db-file-name
- (lambda* (#:key native-inputs inputs #:allow-other-keys)
- ;; Tell CRDA where to find our database.
- (let ((regdb (assoc-ref (or native-inputs inputs)
- "wireless-regdb")))
- (substitute* "crda.c"
- (("\"/lib/crda/regulatory.bin\"")
- (string-append "\"" regdb
- "/lib/crda/regulatory.bin\"")))))))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'gzip-deterministically
+ (lambda _
+ (substitute* "Makefile"
+ (("gzip" command)
+ (string-append command " --no-name")))))
+ #$@(if (%current-target-system)
+ #~((add-after 'unpack 'fix-pkg-config
+ (lambda* (#:key target #:allow-other-keys)
+ (substitute* "Makefile"
+ (("pkg-config" command)
+ (string-append target "-" command))))))
+ #~())
+ (add-before 'build 'patch-Makefile
+ (lambda _
+ (substitute* "Makefile"
+ (("ldconfig") "true"))))
+ (add-before 'build 'set-regulatory-db-file-name
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ ;; Tell CRDA where to find our database.
+ (let ((regdb (assoc-ref (or native-inputs inputs)
+ "wireless-regdb")))
+ (substitute* "crda.c"
+ (("\"/lib/crda/regulatory.bin\"")
+ (string-append "\"" regdb
+ "/lib/crda/regulatory.bin\"")))))))
#:test-target "verify"
- #:make-flags (let ((out (assoc-ref %outputs "out"))
- (regdb (assoc-ref %build-inputs "wireless-regdb")))
- (list
- (string-append "CC=" ,(cc-for-target))
- "V=1"
-
- ;; Disable signature-checking on 'regulatory.bin'.
- ;; The reason is that this simplifies maintenance
- ;; on our side (no need to manage a distro key
- ;; pair), and we can guarantee integrity of
- ;; 'regulatory.bin' by other means anyway, such as
- ;; 'guix gc --verify'. See
- ;;
<https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
- ;; for a discssion.
- "USE_OPENSSL=0"
-
- (string-append "PREFIX=" out)
- (string-append "SBINDIR=" out "/sbin/")
- (string-append "UDEV_RULE_DIR="
- out "/lib/udev/rules.d")
- (string-append "LDFLAGS=-Wl,-rpath="
- out "/lib -L.")
- (string-append "REG_BIN=" regdb
- "/lib/crda/regulatory.bin")
- "all_noverify"))))
+ #:make-flags
+ #~(list
+ (string-append "CC=" #$(cc-for-target))
+ "V=1"
+
+ ;; Disable signature-checking on 'regulatory.bin'.
+ ;; The reason is that this simplifies maintenance
+ ;; on our side (no need to manage a distro key
+ ;; pair), and we can guarantee integrity of
+ ;; 'regulatory.bin' by other means anyway, such as
+ ;; 'guix gc --verify'. See
+ ;;
<https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
+ ;; for a discssion.
+ "USE_OPENSSL=0"
+
+ (string-append "PREFIX=" #$output)
+ (string-append "SBINDIR=" #$output "/sbin/")
+ (string-append "UDEV_RULE_DIR="
+ #$output "/lib/udev/rules.d")
+ (string-append "LDFLAGS=-Wl,-rpath="
+ #$output "/lib -L.")
+ (string-append "REG_BIN="
+ #$(this-package-native-input "wireless-regdb")
+ "/lib/crda/regulatory.bin")
+ "all_noverify")))
(native-inputs (list pkg-config wireless-regdb))
(inputs (list libnl))
(home-page
- 06/14: gnu: dpkg: Use the (intended) input perl's version., (continued)
- 06/14: gnu: dpkg: Use the (intended) input perl's version., guix-commits, 2023/07/07
- 04/14: gnu: wcslib: Download source over HTTPS., guix-commits, 2023/07/07
- 07/14: gnu: dpkg: Use G-expressions., guix-commits, 2023/07/07
- 08/14: gnu: lynx: Update to 2.9.0dev.12., guix-commits, 2023/07/07
- 01/14: gnu: wireless-regdb: Update to 2023.05.03., guix-commits, 2023/07/07
- 03/14: gnu: wcslib: Update to 8.1., guix-commits, 2023/07/07
- 12/14: gnu: crda: Update to 4.15., guix-commits, 2023/07/07
- 09/14: gnu: lynx: Use G-expressions., guix-commits, 2023/07/07
- 10/14: gnu: lynx: Mark up acronyms in description., guix-commits, 2023/07/07
- 11/14: gnu: smartmontools: Update to 7.3., guix-commits, 2023/07/07
- 13/14: gnu: crda: Use G-expressions.,
guix-commits <=
- 14/14: gnu: crda: Mark up acronyms in description., guix-commits, 2023/07/07