nixpkgs/pkgs/os-specific/linux/zfs/2_1.nix
Raito Bezarius e04c0b0d99 zfs_2_1: init at 2.1.13
This re-introduces the old stable ZFS version we had in the past following
the many predicted issues of ZFS 2.2.x series, that is much more stable
than any further ZFS version at the moment.

I am also removing myself from maintenance of any further ZFS versions as I am
planning to quit ZFS maintenance at some point.

In the meantime, for users like me who depend on ZFS for critical operations, here is a ZFS version
that is known to work for LTS kernels.
2023-11-24 15:47:21 +01:00

50 lines
1.3 KiB
Nix

{ callPackage
, kernel ? null
, stdenv
, linuxKernel
, removeLinuxDRM ? false
, lib
, nixosTests
, fetchpatch
, ...
} @ args:
let
stdenv' = if kernel == null then stdenv else kernel.stdenv;
in
callPackage ./generic.nix args {
# You have to ensure that in `pkgs/top-level/linux-kernels.nix`
# this attribute is the correct one for this package.
kernelModuleAttribute = "zfs_2_1";
# check the release notes for compatible kernels
kernelCompatible =
if stdenv'.isx86_64 || removeLinuxDRM
then kernel.kernelOlder "6.6"
else kernel.kernelOlder "6.2";
latestCompatibleLinuxPackages = if stdenv'.isx86_64 || removeLinuxDRM
then linuxKernel.packages.linux_6_5
else linuxKernel.packages.linux_6_1;
# This is a fixed version to the 2.1.x series, move only
# if the 2.1.x series moves.
version = "2.1.13";
extraPatches = [
(fetchpatch {
# https://github.com/openzfs/zfs/pull/15571
# Remove when it's backported to 2.1.x.
url = "https://github.com/robn/zfs/commit/617c990a4cf1157b0f8332f35672846ad16ca70a.patch";
hash = "sha256-j5YSrud7BaWk2npBl31qwFFLYltbut3CUjI1cjZOpag=";
})
];
hash = "sha256-tqUCn/Hf/eEmyWRQthWQdmTJK2sDspnHiiEfn9rz2Kc=";
tests = [
nixosTests.zfs.series_2_1
];
maintainers = [ lib.maintainers.raitobezarius ];
}