diff options
author | OPNA2608 | 2023-10-14 17:15:44 +0200 |
---|---|---|
committer | OPNA2608 | 2023-10-14 17:15:44 +0200 |
commit | 841c4473265f65fc3f82b6c8914fd233dbd6653e (patch) | |
tree | 6ae9fa496e5436da6038703df2010030bbc0f4f9 /pkgs/os-specific/linux/zfs | |
parent | ce2c2b598d81c529e995055563b2ae2058e1489e (diff) |
zfs: Honour NIX_BUILD_CORES in kernel build
Otherwise configuring runs some test builds with `nproc` amount of cores.
Diffstat (limited to 'pkgs/os-specific/linux/zfs')
-rw-r--r-- | pkgs/os-specific/linux/zfs/generic.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix index 1065ea998dec..81ff2214bcad 100644 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ b/pkgs/os-specific/linux/zfs/generic.nix @@ -141,6 +141,14 @@ stdenv'.mkDerivation { "INSTALL_MOD_PATH=\${out}" ]; + preConfigure = '' + # The kernel module builds some tests during the configurePhase, this envvar controls their parallelism + export TEST_JOBS=$NIX_BUILD_CORES + if [ -z "$enableParallelBuilding" ]; then + export TEST_JOBS=1 + fi + ''; + # Enabling BTF causes zfs to be build with debug symbols. # Since zfs compress kernel modules on installation, our strip hooks skip stripping them. # Hence we strip modules prior to compression. |