From 352d9d9741d8e95157140fc6e6c240a62adf5f77 Mon Sep 17 00:00:00 2001 From: Alex Griffin Date: Sun, 5 Jan 2020 12:52:52 -0600 Subject: [PATCH] nongnu: rtlwifi-firmware: Use gnu-build-system. * nongnu/packages/linux.scm (rtlwifi-firmware): Use gnu-build-system. --- nongnu/packages/linux.scm | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/nongnu/packages/linux.scm b/nongnu/packages/linux.scm index 63a5281..e6176a3 100644 --- a/nongnu/packages/linux.scm +++ b/nongnu/packages/linux.scm @@ -391,24 +391,21 @@ chipsets from Broadcom: (package (inherit linux-firmware) (name "rtlwifi-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/")) - (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) - (copy-recursively "./rtlwifi" bin-dir) - (install-file "./LICENCE.rtlwifi_firmware.txt" fw-dir) - #t)))) + `(#:tests? #f + #:license-file-regexp "LICENCE.rtlwifi_firmware.txt" + #: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 "/rtlwifi"))) + (mkdir-p bin-dir) + (copy-recursively "./rtlwifi" bin-dir) + #t))) + (delete 'validate-runpath)))) (home-page "https://wireless.wiki.kernel.org/en/users/drivers/rtl819x") (synopsis "Nonfree firmware for Realtek wifi chips") (description