summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-10-18 23:12:19 +0900
committerJohn Kehayias <john.kehayias@protonmail.com>2024-10-18 14:51:28 -0400
commit8cffc6b1688dd9a933ac63b5fe934cf99d8febf9 (patch)
treed3372bbd980b0cebd7028b911cf02c532f03e7d8
parent15fa7d02b6d57e8db30b001120f841b7d4efeb45 (diff)
nongnu: linux-firmware: Use Zstd compression.
This halves the size of the firmware collection from 1.1 GiB to 509 MiB. * nongnu/packages/linux.scm (linux-firmware)[phases]: Override install phase. [native-inputs]: Add zstd. Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
-rw-r--r--nongnu/packages/linux.scm18
1 files changed, 16 insertions, 2 deletions
diff --git a/nongnu/packages/linux.scm b/nongnu/packages/linux.scm
index 9731294..038027e 100644
--- a/nongnu/packages/linux.scm
+++ b/nongnu/packages/linux.scm
@@ -26,6 +26,7 @@
26;;; Copyright © 2023 Ada Stevenson <adanskana@gmail.com> 26;;; Copyright © 2023 Ada Stevenson <adanskana@gmail.com>
27;;; Copyright © 2023 Tomas Volf <~@wolfsden.cz> 27;;; Copyright © 2023 Tomas Volf <~@wolfsden.cz>
28;;; Copyright © 2023 PRESFIL <presfil@protonmail.com> 28;;; Copyright © 2023 PRESFIL <presfil@protonmail.com>
29;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
29 30
30(define-module (nongnu packages linux) 31(define-module (nongnu packages linux)
31 #:use-module (gnu packages) 32 #:use-module (gnu packages)
@@ -338,8 +339,21 @@ stable, responsive and smooth desktop experience.")))
338 (substitute* "copy-firmware.sh" 339 (substitute* "copy-firmware.sh"
339 (("./check_whence.py") 340 (("./check_whence.py")
340 "true")))) 341 "true"))))
341 (delete 'configure)))) 342 (delete 'configure)
342 (native-inputs (list rdfind)) 343 (replace 'install
344 ;; Use Zstd compression to reduce space requirements.
345 (lambda* (#:key (parallel-build? #t) (make-flags '())
346 #:allow-other-keys)
347 (let ((num-jobs (if parallel-build?
348 (number->string (parallel-job-count))
349 "1")))
350 ;; Use the best 'standard' compression level.
351 (setenv "ZSTD_CLEVEL" "19")
352 ;; Compress using multiple threads.
353 (setenv "ZSTD_NBTHREADS" num-jobs)
354 (apply invoke "make" "install-zst" "-j" num-jobs
355 make-flags)))))))
356 (native-inputs (list rdfind zstd))
343 (home-page 357 (home-page
344 "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git") 358 "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git")
345 (synopsis "Nonfree firmware blobs for Linux") 359 (synopsis "Nonfree firmware blobs for Linux")