From ba0ddcc4ac1f8181bdf14d23602d34e72b43d43d Mon Sep 17 00:00:00 2001 From: Alex Griffin Date: Sun, 5 Jan 2020 12:32:00 -0600 Subject: nongnu: ath3k-firmware: Use gnu-build-system. * nongnu/packages/linux.scm (ath3k-firmware): Use gnu-build-system. --- nongnu/packages/linux.scm | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/nongnu/packages/linux.scm b/nongnu/packages/linux.scm index f0fc5e8..16c5fb5 100644 --- a/nongnu/packages/linux.scm +++ b/nongnu/packages/linux.scm @@ -145,30 +145,23 @@ advanced 3D.") (package (inherit linux-firmware) (name "ath3k-firmware") - (build-system trivial-build-system) + (build-system gnu-build-system) (arguments - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (let ((source (assoc-ref %build-inputs "source")) - (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) - (for-each (lambda (file) - (copy-file file - (string-append fw-dir "/" file))) - (list "ath3k-1.fw" - "LICENCE.atheros_firmware" - "LICENSE.QualcommAtheros_ar3k" - "WHENCE")) - (copy-recursively "./ar3k" - (string-append fw-dir "/ar3k")) - #t)))) + `(#:tests? #f + #:license-file-regexp + "LICEN[CS]E\\.(atheros_firmware|QualcommAtheros_ar3k)" + #:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (fw-dir (string-append out "/lib/firmware")) + (bin-dir (string-append fw-dir "/ar3k"))) + (mkdir-p bin-dir) + (copy-recursively "./ar3k" bin-dir) + (install-file "ath3k-1.fw" fw-dir) + #t))) + (delete 'validate-runpath)))) (synopsis "Nonfree firmware blobs for the ath3k Bluetooth driver") (description "Nonfree firmware blobs for the ath3k Bluetooth driver. ath3k is the Linux Bluetooth driver for Atheros AR3011/AR3012 Bluetooth chipsets.") -- cgit v1.2.3