nongnu: linux-firmware: Update to 20191022.

* nongnu/packages/linux.scm (linux-firmware): Update to 20191022.
[source]: Switch to tagged and signed tarballs.
[arguments]: Adjust build system for tarball.
(amdgpu-firmware, ath3k-firmware, iwlwifi-firmware, rtlwifi-firmware,
rtl-nic-firmware, rtl-bt-firmware): Adjust build system for tarball.
This commit is contained in:
Alex Griffin 2019-12-03 15:38:05 -06:00
parent 35646e5acf
commit ecf5742326

View file

@ -18,6 +18,7 @@
(define-module (nongnu packages linux) (define-module (nongnu packages linux)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#:use-module (guix packages) #:use-module (guix packages)
@ -71,32 +72,35 @@ on hardware which requires nonfree software to function.")))
(define-public linux linux-5.3) (define-public linux linux-5.3)
(define-public linux-firmware (define-public linux-firmware
(let ((commit "92e17d0dd2437140fab044ae62baf69b35d7d1fa")
(revision "1"))
(package (package
(name "linux-firmware") (name "linux-firmware")
(version (git-version "20190502" revision commit)) (version "20191022")
(source (origin (source (origin
(method git-fetch) (method url-fetch)
(uri (git-reference (uri (string-append "https://git.kernel.org/pub/scm/linux/kernel"
(url (string-append "/git/firmware/linux-firmware.git/snapshot/"
"https://git.kernel.org/pub/scm/" "linux-firmware-" version ".tar.gz"))
"linux/kernel/git/firmware/linux-firmware.git"))
(commit commit)))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"1bsgp124jhs9bbjjq0fzmdsziwx1y5aivkgpj8v56ar0y2zmrw2d")))) "1pb32ldi0qw5hsxkng4bs1xfcadrgl8js93zl4g1rngl8bsvfgyw"))))
(build-system trivial-build-system) (build-system trivial-build-system)
(arguments (arguments
`(#:modules ((guix build utils)) `(#:modules ((guix build utils))
#:builder (begin #:builder (begin
(use-modules (guix build utils)) (use-modules (guix build utils))
(let ((source (assoc-ref %build-inputs "source")) (let ((source (assoc-ref %build-inputs "source"))
(destination (string-append %output "/lib/firmware"))) (destination (string-append %output "/lib/firmware"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p destination) (mkdir-p destination)
(copy-recursively source destination #:follow-symlinks? #t) (copy-recursively "." destination #:follow-symlinks? #t)
#t)))) #t))))
(native-inputs
`(("gzip" ,gzip)
("tar" ,tar)))
(home-page (home-page
"http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git") "http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git")
(synopsis "Nonfree firmware blobs for Linux") (synopsis "Nonfree firmware blobs for Linux")
@ -106,7 +110,7 @@ if your hardware is supported by one of the smaller firmware packages.")
(license (license
(nonfree (nonfree
(string-append "https://git.kernel.org/pub/scm/linux/kernel/git/" (string-append "https://git.kernel.org/pub/scm/linux/kernel/git/"
"firmware/linux-firmware.git/plain/WHENCE")))))) "firmware/linux-firmware.git/plain/WHENCE")))))
(define-public amdgpu-firmware (define-public amdgpu-firmware
(package (package
@ -120,10 +124,15 @@ if your hardware is supported by one of the smaller firmware packages.")
(use-modules (guix build utils)) (use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source")) (let* ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/")) (fw-dir (string-append %output "/lib/firmware/"))
(bin-dir (string-append fw-dir "/amdgpu"))) (bin-dir (string-append fw-dir "/amdgpu"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p bin-dir) (mkdir-p bin-dir)
(copy-recursively (string-append source "/amdgpu") bin-dir) (copy-recursively "./amdgpu" bin-dir)
(install-file (string-append source "/LICENSE.amdgpu") fw-dir) (install-file "./LICENSE.amdgpu" fw-dir)
#t)))) #t))))
(home-page "http://support.amd.com/en-us/download/linux") (home-page "http://support.amd.com/en-us/download/linux")
(synopsis "Nonfree firmware for AMD graphics chips") (synopsis "Nonfree firmware for AMD graphics chips")
@ -148,16 +157,21 @@ advanced 3D.")
(begin (begin
(use-modules (guix build utils)) (use-modules (guix build utils))
(let ((source (assoc-ref %build-inputs "source")) (let ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware"))) (fw-dir (string-append %output "/lib/firmware"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p fw-dir) (mkdir-p fw-dir)
(for-each (lambda (file) (for-each (lambda (file)
(copy-file (string-append source "/" file) (copy-file file
(string-append fw-dir "/" file))) (string-append fw-dir "/" file)))
(list "ath3k-1.fw" (list "ath3k-1.fw"
"LICENCE.atheros_firmware" "LICENCE.atheros_firmware"
"LICENSE.QualcommAtheros_ar3k" "LICENSE.QualcommAtheros_ar3k"
"WHENCE")) "WHENCE"))
(copy-recursively (string-append source "/ar3k") (copy-recursively "./ar3k"
(string-append fw-dir "/ar3k")) (string-append fw-dir "/ar3k"))
#t)))) #t))))
(synopsis "Nonfree firmware blobs for the ath3k Bluetooth driver") (synopsis "Nonfree firmware blobs for the ath3k Bluetooth driver")
@ -185,14 +199,19 @@ is the Linux Bluetooth driver for Atheros AR3011/AR3012 Bluetooth chipsets.")
(begin (begin
(use-modules (guix build utils)) (use-modules (guix build utils))
(let ((source (assoc-ref %build-inputs "source")) (let ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/"))) (fw-dir (string-append %output "/lib/firmware/"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p fw-dir) (mkdir-p fw-dir)
(for-each (lambda (file) (for-each (lambda (file)
(copy-file file (copy-file file
(string-append fw-dir (basename file)))) (string-append fw-dir (basename file))))
(cons* (cons*
(string-append source "/LICENCE.iwlwifi_firmware") "./LICENCE.iwlwifi_firmware"
(find-files source (find-files "."
"iwlwifi-.*\\.ucode$"))) "iwlwifi-.*\\.ucode$")))
#t)))) #t))))
(home-page "https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi") (home-page "https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi")
@ -371,10 +390,15 @@ chipsets from Broadcom:
(use-modules (guix build utils)) (use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source")) (let* ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/")) (fw-dir (string-append %output "/lib/firmware/"))
(bin-dir (string-append fw-dir "/rtlwifi"))) (bin-dir (string-append fw-dir "/rtlwifi"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p bin-dir) (mkdir-p bin-dir)
(copy-recursively (string-append source "/rtlwifi") bin-dir) (copy-recursively "./rtlwifi" bin-dir)
(install-file (string-append source "/LICENCE.rtlwifi_firmware.txt") fw-dir) (install-file "./LICENCE.rtlwifi_firmware.txt" fw-dir)
#t)))) #t))))
(home-page "https://wireless.wiki.kernel.org/en/users/drivers/rtl819x") (home-page "https://wireless.wiki.kernel.org/en/users/drivers/rtl819x")
(synopsis "Nonfree firmware for Realtek wifi chips") (synopsis "Nonfree firmware for Realtek wifi chips")
@ -433,10 +457,15 @@ firmware for the following chips:
(use-modules (guix build utils)) (use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source")) (let* ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/")) (fw-dir (string-append %output "/lib/firmware/"))
(bin-dir (string-append fw-dir "/rtl_nic"))) (bin-dir (string-append fw-dir "/rtl_nic"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p bin-dir) (mkdir-p bin-dir)
(copy-recursively (string-append source "/rtl_nic") bin-dir) (copy-recursively "./rtl_nic" bin-dir)
(install-file (string-append source "/LICENCE.rtlwifi_firmware.txt") fw-dir) (install-file "./LICENCE.rtlwifi_firmware.txt" fw-dir)
#t)))) #t))))
(synopsis "Nonfree firmware for Realtek ethernet chips") (synopsis "Nonfree firmware for Realtek ethernet chips")
(description (description
@ -481,10 +510,15 @@ firmware for the following chips:
(use-modules (guix build utils)) (use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source")) (let* ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/")) (fw-dir (string-append %output "/lib/firmware/"))
(bin-dir (string-append fw-dir "/rtl_bt"))) (bin-dir (string-append fw-dir "/rtl_bt"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p bin-dir) (mkdir-p bin-dir)
(copy-recursively (string-append source "/rtl_bt") bin-dir) (copy-recursively "./rtl_bt" bin-dir)
(install-file (string-append source "/LICENCE.rtlwifi_firmware.txt") fw-dir) (install-file "./LICENCE.rtlwifi_firmware.txt" fw-dir)
#t)))) #t))))
(synopsis "Nonfree firmware for Realtek bluetooth chips") (synopsis "Nonfree firmware for Realtek bluetooth chips")
(description (description
@ -536,6 +570,9 @@ firmware for the following chips:
(let* ((source (assoc-ref %build-inputs "source")) (let* ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware")) (fw-dir (string-append %output "/lib/firmware"))
(bin-dir (string-append fw-dir "/intel-ucode"))) (bin-dir (string-append fw-dir "/intel-ucode")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p bin-dir) (mkdir-p bin-dir)
(copy-recursively (string-append source "/intel-ucode") bin-dir) (copy-recursively (string-append source "/intel-ucode") bin-dir)
(copy-file (copy-file