diff --git a/pkgs/os-specific/linux/nvidia/builder.sh b/pkgs/os-specific/linux/nvidia/builder.sh index 00d70d6198f2..08b1a16606e9 100755 --- a/pkgs/os-specific/linux/nvidia/builder.sh +++ b/pkgs/os-specific/linux/nvidia/builder.sh @@ -8,6 +8,11 @@ unpackFile() { } +patchPhase() { + (cd usr/src/nv && patch -p3 < $patch) +} + + buildPhase=myBuildPhase myBuildPhase() { echo "Building linux driver against kernel: " $kernel; diff --git a/pkgs/os-specific/linux/nvidia/default.nix b/pkgs/os-specific/linux/nvidia/default.nix index 7b414600ccb6..d2a3689c0dea 100644 --- a/pkgs/os-specific/linux/nvidia/default.nix +++ b/pkgs/os-specific/linux/nvidia/default.nix @@ -15,6 +15,13 @@ stdenv.mkDerivation { sha256 = "0bxxjp30bysqaviqjq05vmrhp17w3qn94iwwwj074qmi710zffyy"; }; + # Fix for compiling on Linux >= 2.6.24. + patch = fetchurl { + url = "http://www.nvnews.net/vbulletin/attachment.php?s=41498f047cfc027419df58a2559e9a7f&attachmentid=30771&d=1205875946"; + sha256 = "17bb9yzkys1fsvf0mri3kpj1zvvqwvdcaszcl8ax9jfkxbd47m9n"; + name = "nvidia-2.5.24.patch"; + }; + #xenPatch = ./nvidia-2.6.24-xen.patch; inherit versionNumber kernel;