diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-03-21 00:39:14 +0900 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-03-21 00:39:14 +0900 |
commit | e12455a5e8d524c5c3fba1ae56ebc6819b4f9320 (patch) | |
tree | 1db671a73592da630a302f065402facbc6f1b049 | |
parent | 7a26e14ca2d0757423f174b370c09bf2635dac46 (diff) | |
download | guix-e12455a5e8d524c5c3fba1ae56ebc6819b4f9320.tar.gz guix-e12455a5e8d524c5c3fba1ae56ebc6819b4f9320.zip |
gnu: zfs: Enable parallel build.
* gnu/packages/file-systems.scm (zfs)
[phases] {build}: Honor #:parallel-build? and #:make-flags.
{install}: Likewise.
Change-Id: I9dc395364edc0c60c696c1f30fed5190350939ce
-rw-r--r-- | gnu/packages/file-systems.scm | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index 2d1438bc4f..01c564bc77 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2025 Julian Flake <flake@uni-koblenz.de> ;;; Copyright © 2025 Ashish SHUKLA <ashish.is@lostca.se> +;;; Copyright © 2020-2025 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;; ;;; This file is part of GNU Guix. ;;; @@ -1595,13 +1596,13 @@ with the included @command{xfstests-check} helper.") (version "2.3.1") (outputs '("out" "module" "src")) (source - (origin - (method url-fetch) - (uri (string-append "https://github.com/openzfs/zfs/releases" - "/download/zfs-" version - "/zfs-" version ".tar.gz")) - (sha256 - (base32 "01lh3yxzh271hzzlgn4b5rj3wb4ckbhx08kfcgf0p4l6jdwk6ch5")))) + (origin + (method url-fetch) + (uri (string-append "https://github.com/openzfs/zfs/releases" + "/download/zfs-" version + "/zfs-" version ".tar.gz")) + (sha256 + (base32 "01lh3yxzh271hzzlgn4b5rj3wb4ckbhx08kfcgf0p4l6jdwk6ch5")))) (build-system linux-module-build-system) (arguments (list @@ -1702,24 +1703,33 @@ with the included @command{xfstests-check} helper.") (("/sbin/modprobe") (search-input-file inputs "/bin/modprobe"))))) (replace 'build - (lambda _ (invoke "make"))) + (lambda* (#:key make-flags parallel-build? #:allow-other-keys) + (apply invoke "make" + `(,@(if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + ,@make-flags)))) (replace 'install - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (let* ((kmod (assoc-ref (or native-inputs inputs) "kmod"))) - (invoke "make" "install" - (string-append "DEFAULT_INITCONF_DIR=" - #$output "/etc/default") - (string-append "DEPMOD=" - (search-input-file - (or native-inputs inputs) - "/bin/depmod")) - (string-append "INSTALL_PATH=" #$output) - (string-append "INSTALL_MOD_PATH=" #$output:module) - "INSTALL_MOD_STRIP=1") - (install-file - "contrib/bash_completion.d/zfs" - (string-append #$output - "/share/bash-completion/completions")))))))) + (lambda* (#:key inputs native-inputs + make-flags parallel-build? #:allow-other-keys) + (apply invoke "make" "install" + (string-append "DEFAULT_INITCONF_DIR=" + #$output "/etc/default") + (string-append "DEPMOD=" + (search-input-file + (or native-inputs inputs) + "/bin/depmod")) + (string-append "INSTALL_PATH=" #$output) + (string-append "INSTALL_MOD_PATH=" #$output:module) + "INSTALL_MOD_STRIP=1" + `(,@(if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + ,@make-flags)) + (install-file + "contrib/bash_completion.d/zfs" + (string-append #$output + "/share/bash-completion/completions"))))))) (native-inputs (list attr kmod pkg-config)) (inputs (list eudev |