summaryrefslogtreecommitdiff
path: root/overlays/zfs.nix
blob: 7291e2e4746a8ac610fa929280b860a0f16d878e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
final: prev:
let
  overrides = {
    "sha256-UUuJa5w/GsEvsgH/BnXFsP/dsOt9wwmPqKzDxLPrhiY=" = { self }: {
      broken = !(self.kernel.kernelAtLeast "3.10" && self.kernel.kernelOlder "5.16");
      latestCompatibleLinuxPackages = final.linuxPackages_5_15;
    };
  };
in {
  linuxKernel = prev.linuxKernel // {
    packagesFor = kernel_: (prev.linuxKernel.packagesFor kernel_).extend (self: super: rec {
      zfsUnstable = super.zfsUnstable.overrideAttrs (oldAttrs: {
        meta = oldAttrs.meta // (overrides.${oldAttrs.src.outputHash} or (_: {})) { inherit self; };
      });
      zfsStable = super.zfsUnstable.overrideAttrs (oldAttrs: {
        meta = oldAttrs.meta // (overrides.${oldAttrs.src.outputHash} or (_: {})) { inherit self; };
      });
      zfs = zfsStable;
    });
  };
}