dotfiles/overlays/bumps/linux_6_8.nix

100 lines
3.7 KiB
Nix
Raw Normal View History

{inputs, ...}: final: prev: let
zfs = args:
prev.callPackage "${inputs.nixpkgs}/pkgs/os-specific/linux/zfs/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 = "zfsUnstable";
# check the release notes for compatible kernels
kernelCompatible = final.linuxKernel.kernels.linux_6_8.kernelOlder "6.9";
latestCompatibleLinuxPackages = final.linuxKernel.packages.linux_6_8;
# 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
# zfs-<version>-staging branch, because this is tested by the OpenZFS
# maintainers.
version = "2.2.4";
# rev = "";
isUnstable = true;
tests = [
final.nixosTests.zfs.unstable
];
hash = "sha256-SSp/1Tu1iGx5UDcG4j0k2fnYxK05cdE8gzfSn8DU5Z4=";
};
inherit
(final.lib)
versionOlder
;
in {
zfsUnstable = assert (versionOlder prev.zfsUnstable.version "2.2.4");
prev.callPackage zfs {
configFile = "user";
};
linuxKernel =
prev.linuxKernel
// {
kernels = prev.linuxKernel.kernels.extend (prev': _: {
linux_6_8 = assert !(prev ? "linux_6_8");
prev.callPackage "${inputs.nixpkgs}/pkgs/os-specific/linux/kernel/mainline.nix" {
branch = "6.8";
kernelPatches = with final; [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
kernelPatches.rust_1_75
{
name = "rust-1.76.patch";
patch = fetchurl {
name = "rust-1.76.patch";
url = "https://lore.kernel.org/rust-for-linux/20240217002638.57373-2-ojeda@kernel.org/raw";
hash = "sha256-q3iNBo8t4b1Rn5k5lau2myqOAqdA/9V9A+ok2jGkLdY=";
};
}
{
name = "nouveau-rip-out-busy-fence-waits.patch";
patch = fetchurl {
name = "nouveau-rip-out-busy-fence-waits.patch";
url = "https://gitlab.freedesktop.org/gfxstrand/linux/-/commit/8a6e23f29986636c16c79a77e7020b1ec5438c14.patch";
hash = "sha256-+KwJ2IW0wzcpxCdm60CvvQTU2SVqQEaGc4C5vU+CasM=";
};
}
{
name = "drm-nouveau-use-tile_mode-and-pte_kind-for-VM_BIND-bo.patch";
patch = fetchurl {
name = "drm-nouveau-use-tile_mode-and-pte_kind-for-VM_BIND-bo.patch";
url = "https://gitlab.freedesktop.org/gfxstrand/linux/-/commit/b03f259e41c9bf5db2de9ba065ee3d229de69c2d.patch";
hash = "sha256-Fp67ROonkuVxwsfizLwIoB1m1b9KM5ntpLRD40pLLvM=";
};
}
];
argsOverride = {
src = final.fetchurl {
url = "mirror://kernel/linux/kernel/v6.x/linux-6.8.9.tar.xz";
hash = "sha256-+QXxI46nqOhTFLrPKDMC6AlwBgENJfzqcm0N4OpbybY=";
};
version = "6.8.9";
modDirVersion = "6.8.9";
};
};
});
packages =
prev.linuxKernel.packages
// {
linux_6_8 = final.linuxKernel.packagesFor final.linuxKernel.kernels.linux_6_8;
};
packagesFor = kernel:
(prev.linuxKernel.packagesFor kernel).extend (_: prev': {
zfsUnstable = assert (versionOlder prev'.zfsUnstable.version "2.2.4");
prev.callPackage zfs {
configFile = "kernel";
inherit final kernel;
};
});
};
}