mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
commit
3b4ef34fa0
2 changed files with 23 additions and 4 deletions
|
@ -31,10 +31,10 @@ in
|
|||
};
|
||||
|
||||
legacy_304 = generic {
|
||||
version = "304.134";
|
||||
sha256_32bit = "178wx0a2pmdnaypa9pq6jh0ii0i8ykz1sh1liad9zfriy4d8kxw4";
|
||||
sha256_64bit = "0pydw7nr4d2dply38kwvjbghsbilbp2q0mas4nfq5ad050d2c550";
|
||||
settingsSha256 = "0q92xw4fr9p5nbhj1plynm50d32881861daxfwrisywszqijhmlf";
|
||||
version = "304.135";
|
||||
sha256_32bit = "14qdl39wird04sqba94dcb77i63igmxxav62ndr4qyyavn8s3c2w";
|
||||
sha256_64bit = "125mianhvq591np7y5jjrv9vmpbvixnkicr49ni48mcr0yjnjqkh";
|
||||
settingsSha256 = "1y7swikdngq4nlwzkrq20yfah9zr31n1a5i6nw37awnp8xjilhzm";
|
||||
persistencedSha256 = null;
|
||||
useGLVND = false;
|
||||
useProfiles = false;
|
||||
|
|
|
@ -42,6 +42,25 @@ let
|
|||
}
|
||||
else throw "nvidia-x11 does not support platform ${stdenv.system}";
|
||||
|
||||
prePatch = let
|
||||
debPatches = fetchurl {
|
||||
url = "mirror://debian/pool/non-free/n/nvidia-graphics-drivers-legacy-304xx/"
|
||||
+ "nvidia-graphics-drivers-legacy-304xx_304.135-2.debian.tar.xz";
|
||||
sha256 = "0mhji0ssn7075q5a650idigs48kzf11pzj2ca2n07rwxg3vj6pdr";
|
||||
};
|
||||
prefix = "debian/module/debian/patches";
|
||||
applyPatches = pnames: if pnames == [] then null else
|
||||
''
|
||||
tar xf '${debPatches}'
|
||||
sed 's|^\([+-]\{3\} [ab]\)/|\1/kernel/|' -i ${prefix}/*.patch
|
||||
patches="$patches ${concatMapStringsSep " " (pname: "${prefix}/${pname}.patch") pnames}"
|
||||
'';
|
||||
in
|
||||
# TODO: perhaps other branches also need patching?
|
||||
if (versionOlder version "340") then applyPatches
|
||||
[ "fix-typos" "drm-driver-legacy" "deprecated-cpu-events" "disable-mtrr" ]
|
||||
else null;
|
||||
|
||||
# patch to get the nvidia and nvidiaBeta driver to compile on kernel 4.10
|
||||
patches = if libsOnly
|
||||
then null
|
||||
|
|
Loading…
Reference in a new issue