From 570df959e20b32884cb8ba62a6509257dbf20ce7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 13 Dec 2021 15:38:16 +0100 Subject: ... --- overlays/zfs.nix | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/overlays/zfs.nix b/overlays/zfs.nix index 1da10050..7291e2e4 100644 --- a/overlays/zfs.nix +++ b/overlays/zfs.nix @@ -1,13 +1,21 @@ -final: prev: { +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: { + packagesFor = kernel_: (prev.linuxKernel.packagesFor kernel_).extend (self: super: rec { zfsUnstable = super.zfsUnstable.overrideAttrs (oldAttrs: { - meta = oldAttrs.meta // (assert (oldAttrs.src.outputHash == "sha256-UUuJa5w/GsEvsgH/BnXFsP/dsOt9wwmPqKzDxLPrhiY="); rec { - broken = !(self.kernel.kernelAtLeast "3.10" && self.kernel.kernelOlder "5.16"); - latestCompatibleLinuxPackages = final.linuxPackages_5_15; - }); + 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; }); }; - # linuxPackages_latest = final.linuxPackages_5_15; } -- cgit v1.2.3