me
/
guix
Archived
1
0
Fork 0

gnu: wireless-regdb: Improve style.

* gnu/packages/linux.scm (wireless-regdb)[arguments]: Use gexps, remove
  trailing booleans.
  (native-inputs): Remove labels.
master
Guillaume Le Vaillant 2023-03-22 13:09:33 +01:00
parent 90111d83a9
commit 45974a39d1
No known key found for this signature in database
GPG Key ID: 6BE8208ADF21FE3F
1 changed files with 39 additions and 43 deletions

View File

@ -54,7 +54,7 @@
;;; Copyright © 2021 B. Wilson <elaexuotee@wilsonb.com> ;;; Copyright © 2021 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru> ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2021, 2023 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net> ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 Josselin Poiret <josselin.poiret@protonmail.ch> ;;; Copyright © 2021 Josselin Poiret <josselin.poiret@protonmail.ch>
@ -4654,57 +4654,53 @@ compliance.")
"mirror://kernel.org/software/network/wireless-regdb/" "mirror://kernel.org/software/network/wireless-regdb/"
"wireless-regdb-" version ".tar.xz")) "wireless-regdb-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32 "0wrf1c7mbsklwdn7jpwzlpjxwj0vgr61qyh88lx7bi2dd6lfi0gy"))
"0wrf1c7mbsklwdn7jpwzlpjxwj0vgr61qyh88lx7bi2dd6lfi0gy"))
;; We're building 'regulatory.bin' by ourselves. ;; We're building 'regulatory.bin' by ourselves.
(snippet '(begin (snippet '(begin
(delete-file "regulatory.bin") (delete-file "regulatory.bin")))))
#t))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases (list
(modify-phases %standard-phases #:phases
(add-after 'unpack 'gzip-determinism #~(modify-phases %standard-phases
(lambda _ (add-after 'unpack 'gzip-determinism
(substitute* "Makefile" (lambda _
(("gzip") "gzip --no-name")) (substitute* "Makefile"
#t)) (("gzip") "gzip --no-name"))))
(add-after 'unpack 'omit-signature (add-after 'unpack 'omit-signature
(lambda _ (lambda _
(substitute* "Makefile" (substitute* "Makefile"
;; Signing requires a REGDB_PUBCERT and REGDB_PRIVKEY which we ;; Signing requires a REGDB_PUBCERT and REGDB_PRIVKEY which we
;; don't provide (see below). Disable it. ;; don't provide (see below). Disable it.
((" regulatory\\.db\\.p7s") "") ((" regulatory\\.db\\.p7s") "")
;; regulatory.db is built as a dependency of regulatory.db.p7s, ;; regulatory.db is built as a dependency of regulatory.db.p7s,
;; but make install depends only on the latter while installing ;; but make install depends only on the latter while
;; both (and failing). Depend on it explicitly. ;; installing both (and failing). Depend on it explicitly.
(("^install: " all) (string-append all "regulatory.db "))) (("^install: " all) (string-append all "regulatory.db ")))))
#t)) (delete 'configure)) ; no configure script
(delete 'configure)) ; no configure script
;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
;; is computed and can be equal to 'maintainer-clean'; when that ;; is computed and can be equal to 'maintainer-clean'; when that
;; happens, we can end up deleting the 'regulatory.bin' file that we ;; happens, we can end up deleting the 'regulatory.bin' file that we
;; just built. Thus, build things sequentially. ;; just built. Thus, build things sequentially.
#:parallel-build? #f #:parallel-build? #f
#:tests? #f ; no tests #:tests? #f ; no tests
#:make-flags #:make-flags
(let ((out (assoc-ref %outputs "out"))) #~(list (string-append "PREFIX=" #$output)
(list (string-append "PREFIX=" out) (string-append "FIRMWARE_PATH=$(PREFIX)/lib/firmware")
(string-append "FIRMWARE_PATH=$(PREFIX)/lib/firmware")
;; Leave this empty so that db2bin.py doesn't try to sign ;; Leave this empty so that db2bin.py doesn't try to sign
;; regulatory.bin. This allows us to avoid managing a key ;; regulatory.bin. This allows us to avoid managing a key
;; pair for the whole distribution. ;; pair for the whole distribution.
(string-append "REGDB_PRIVKEY=") (string-append "REGDB_PRIVKEY=")
;; Don't generate a public key for the same reason. These are ;; Don't generate a public key for the same reason. These are
;; used as Makefile targets and can't be the empty string. ;; used as Makefile targets and can't be the empty string.
(string-append "REGDB_PUBCERT=/dev/null") (string-append "REGDB_PUBCERT=/dev/null")
(string-append "REGDB_PUBKEY=/dev/null"))))) (string-append "REGDB_PUBKEY=/dev/null"))))
(native-inputs (native-inputs
`(("python" ,python-wrapper))) (list python-wrapper))
(home-page (home-page
"https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb") "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
(synopsis "Wireless regulatory database") (synopsis "Wireless regulatory database")