diff --git a/pkgs/os-specific/linux/zfs/2_1.nix b/pkgs/os-specific/linux/zfs/2_1.nix index d950f5cac15d2..97173a5154a59 100644 --- a/pkgs/os-specific/linux/zfs/2_1.nix +++ b/pkgs/os-specific/linux/zfs/2_1.nix @@ -1,6 +1,7 @@ { callPackage , kernel ? null , stdenv +, linuxKernel , lib , nixosTests , ... @@ -14,7 +15,9 @@ callPackage ./generic.nix args { # this attribute is the correct one for this package. kernelModuleAttribute = "zfs_2_1"; # check the release notes for compatible kernels - kernelCompatible = kernel: kernel.kernelOlder "6.8"; + kernelCompatible = kernel.kernelOlder "6.8"; + + latestCompatibleLinuxPackages = linuxKernel.packages.linux_6_6; # This is a fixed version to the 2.1.x series, move only # if the 2.1.x series moves. diff --git a/pkgs/os-specific/linux/zfs/2_2.nix b/pkgs/os-specific/linux/zfs/2_2.nix index befb83b205690..3e3d48808732c 100644 --- a/pkgs/os-specific/linux/zfs/2_2.nix +++ b/pkgs/os-specific/linux/zfs/2_2.nix @@ -2,6 +2,7 @@ , kernel ? null , stdenv , lib +, linuxKernel , nixosTests , ... } @ args: @@ -14,7 +15,9 @@ callPackage ./generic.nix args { # this attribute is the correct one for this package. kernelModuleAttribute = "zfs_2_2"; # check the release notes for compatible kernels - kernelCompatible = kernel: kernel.kernelOlder "6.11"; + kernelCompatible = kernel.kernelOlder "6.11"; + + latestCompatibleLinuxPackages = linuxKernel.packages.linux_6_6; # this package should point to the latest release. version = "2.2.6"; diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix index 0973cd2a95c4b..63340bdffd8c3 100644 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ b/pkgs/os-specific/linux/zfs/generic.nix @@ -2,7 +2,6 @@ let genericBuild = { pkgs, lib, stdenv, fetchFromGitHub, fetchpatch , autoreconfHook269, util-linux, nukeReferences, coreutils - , linuxKernel , perl , configFile ? "all" @@ -28,6 +27,7 @@ let , kernelModuleAttribute , extraPatches ? [] , rev ? "zfs-${version}" + , latestCompatibleLinuxPackages , kernelCompatible ? null , maintainers ? (with lib.maintainers; [ amarshall ]) , tests @@ -200,13 +200,7 @@ let outputs = [ "out" ] ++ optionals buildUser [ "dev" ]; passthru = { - inherit enableMail kernelModuleAttribute; - latestCompatibleLinuxPackages = lib.pipe linuxKernel.packages [ - builtins.attrValues - (builtins.filter (kPkgs: (builtins.tryEval kPkgs).success && kPkgs ? kernel && kPkgs.kernel.pname == "linux" && kernelCompatible kPkgs.kernel)) - (builtins.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version))) - lib.last - ]; + inherit enableMail latestCompatibleLinuxPackages kernelModuleAttribute; # The corresponding userspace tools to this instantiation # of the ZFS package set. userspaceTools = genericBuild (outerArgs // { @@ -243,7 +237,7 @@ let mainProgram = "zfs"; # If your Linux kernel version is not yet supported by zfs, try zfs_unstable. # On NixOS set the option `boot.zfs.package = pkgs.zfs_unstable`. - broken = buildKernel && (kernelCompatible != null) && !(kernelCompatible kernel); + broken = buildKernel && (kernelCompatible != null) && !kernelCompatible; }; }; in diff --git a/pkgs/os-specific/linux/zfs/unstable.nix b/pkgs/os-specific/linux/zfs/unstable.nix index e635c8950c0ef..90111e924fb79 100644 --- a/pkgs/os-specific/linux/zfs/unstable.nix +++ b/pkgs/os-specific/linux/zfs/unstable.nix @@ -1,6 +1,7 @@ { callPackage , kernel ? null , stdenv +, linuxKernel , nixosTests , ... } @ args: @@ -13,7 +14,9 @@ callPackage ./generic.nix args { # this attribute is the correct one for this package. kernelModuleAttribute = "zfs_unstable"; # check the release notes for compatible kernels - kernelCompatible = kernel: kernel.kernelOlder "6.11"; + kernelCompatible = kernel.kernelOlder "6.11"; + + latestCompatibleLinuxPackages = linuxKernel.packages.linux_6_10; # this package should point to a version / git revision compatible with the latest kernel release # IMPORTANT: Always use a tagged release candidate or commits from the