I’m trying to get the latest linux kernel compiling and failing due to an issue in Nvidia DKMS.
https://github.com/NixOS/nixpkgs/issues/137507
There are a few other related issues covering this same problem.
I’m trying to avoid having to checkout and modify nixpkgs, I just want to use the .nix configs to apply this patch.
No matter what I do, I keep getting the same compilation error, ie the patches aren’t applying.
I’ve tried:
nixpkgs = {
overlays = [
(self: super: {
linuxPackages_latest = super.linuxPackages_latest.extend (self: super: {
nvidia_x11 = super.nvidia_x11.overrideAttrs (attrs: {
patches = [
(pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/Frogging-Family/nvidia-all/master/patches/kernel-5.14.patch";
sha256 = "042zyspddka1acmli9l4h4cbzpfgq8a9lcdwjgwjr0npdgqk3j3f";
stripLen = 2;
extraPrefix = "kernel/";
})
];
});
});
})
];
};
boot.kernelPatches = [{
name = "nvidia-fix";
patch = (pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/Frogging-Family/nvidia-all/master/patches/kernel-5.14.patch";
sha256 = "042zyspddka1acmli9l4h4cbzpfgq8a9lcdwjgwjr0npdgqk3j3f";
stripLen = 2;
extraPrefix = "kernel/";
});
}];
let
linuxPackages_patched = pkgs.linuxPackages_latest.extend (self: super: {
nvidia_x11 = super.nvidia_x11.overrideAttrs (oA: {
patches = [
(pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/Frogging-Family/nvidia-all/master/patches/kernel-5.14.patch";
sha256 = "042zyspddka1acmli9l4h4cbzpfgq8a9lcdwjgwjr0npdgqk3j3f";
stripLen = 2;
extraPrefix = "kernel/";
})
] ++ oA.patches;
});
});
in {
boot.kernelPackages = pkgs.linuxPackages_patched;
}
I’m out of ideas, any suggestions?