nvidia_x11_legacy304: fix build with kernel 4.14

/cc #31640.
This commit is contained in:
Vladimír Čunát 2017-11-30 09:51:17 +01:00
parent 1e4d675c4e
commit b934716782
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -4,6 +4,15 @@ let
generic = args: callPackage (import ./generic.nix args) { };
kernel = callPackage # a hacky way of extracting parameters from callPackage
({ kernel, libsOnly ? false }: if libsOnly then { } else kernel) { };
maybePatch_drm_legacy =
lib.optional (lib.versionOlder "4.14" (kernel.version or "0"))
(fetchurl {
url = "https://raw.githubusercontent.com/MilhouseVH/LibreELEC.tv/b5d2d6a1"
+ "/packages/x11/driver/xf86-video-nvidia-legacy/patches/"
+ "xf86-video-nvidia-legacy-0010-kernel-4.14.patch";
sha256 = "18clfpw03g8dxm61bmdkmccyaxir3gnq451z6xqa2ilm3j820aa5";
});
in
{
# Policy: use the highest stable version as the default (on our master).
@ -23,6 +32,7 @@ in
persistencedSha256 = "08315rb9l932fgvy758an5vh3jgks0qc4g36xip4l32pkxd9k963";
};
legacy_340 = generic {
version = "340.104";
sha256_32bit = "1l8w95qpxmkw33c4lsf5ar9w2fkhky4x23rlpqvp1j66wbw1b473";
@ -31,15 +41,7 @@ in
persistencedSha256 = "0zqws2vsrxbxhv6z0nn2galnghcsilcn3s0f70bpm6jqj9wzy7x8";
useGLVND = false;
patches =
lib.optional (lib.versionOlder "4.14" (kernel.version or "0"))
(fetchurl {
url = "https://raw.githubusercontent.com/MilhouseVH/LibreELEC.tv/b5d2d6a1"
+ "/packages/x11/driver/xf86-video-nvidia-legacy/patches/"
+ "xf86-video-nvidia-legacy-0010-kernel-4.14.patch";
sha256 = "18clfpw03g8dxm61bmdkmccyaxir3gnq451z6xqa2ilm3j820aa5";
})
;
patches = maybePatch_drm_legacy;
};
legacy_304 = generic {
@ -65,6 +67,7 @@ in
patches="$patches ${lib.concatMapStringsSep " " (pname: "${prefix}/${pname}.patch") pnames}"
'';
in applyPatches [ "fix-typos" ];
patches = maybePatch_drm_legacy;
};
legacy_173 = callPackage ./legacy173.nix { };