diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 2b9221ec5d72..325aa5f093f8 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -11,7 +11,8 @@ let # FIXME: should introduce an option like # ‘hardware.video.nvidia.package’ for overriding the default NVIDIA # driver. - enabled = elem "nvidia" drivers || elem "nvidiaLegacy173" drivers || elem "nvidiaLegacy304" drivers; + enabled = elem "nvidia" drivers || elem "nvidiaLegacy173" drivers + || elem "nvidiaLegacy304" drivers || elem "nvidiaLegacy340" drivers; nvidia_x11 = if elem "nvidia" drivers then @@ -20,6 +21,8 @@ let config.boot.kernelPackages.nvidia_x11_legacy173 else if elem "nvidiaLegacy304" drivers then config.boot.kernelPackages.nvidia_x11_legacy304 + else if elem "nvidiaLegacy340" drivers then + config.boot.kernelPackages.nvidia_x11_legacy340 else throw "impossible"; in diff --git a/pkgs/os-specific/linux/nvidia-x11/builder-legacy.sh b/pkgs/os-specific/linux/nvidia-x11/builder-legacy173.sh similarity index 100% rename from pkgs/os-specific/linux/nvidia-x11/builder-legacy.sh rename to pkgs/os-specific/linux/nvidia-x11/builder-legacy173.sh diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder-legacy340.sh similarity index 100% rename from pkgs/os-specific/linux/nvidia-x11/builder.sh rename to pkgs/os-specific/linux/nvidia-x11/builder-legacy340.sh diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix index 0014a5d2ee53..9182139c0a83 100644 --- a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix +++ b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl, kernel, xlibs, zlib, gtk, atk, pango, glib, gdk_pixbuf}: -let +let versionNumber = "173.14.39"; @@ -8,9 +8,9 @@ in stdenv.mkDerivation { name = "nvidia-x11-${versionNumber}-${kernel.version}"; - - builder = ./builder-legacy.sh; - + + builder = ./builder-legacy173.sh; + src = if stdenv.system == "i686-linux" then fetchurl { diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/legacy340.nix similarity index 86% rename from pkgs/os-specific/linux/nvidia-x11/default.nix rename to pkgs/os-specific/linux/nvidia-x11/legacy340.nix index 1a56545cab05..ad0c0c0b367a 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/legacy340.nix @@ -13,14 +13,17 @@ assert (!libsOnly) -> kernel != null; let versionNumber = "340.58"; - + /* This branch is needed for G8x, G9x, and GT2xx GPUs, and motherboard chipsets based on them. + Ongoing support for new Linux kernels and X servers, as well as fixes for critical bugs, + will be included in 340.* legacy releases through the end of 2019. + */ inherit (stdenv.lib) makeLibraryPath; in stdenv.mkDerivation { name = "nvidia-x11-${versionNumber}${optionalString (!libsOnly) "-${kernel.version}"}"; - builder = ./builder.sh; + builder = ./builder-legacy340.sh; src = if stdenv.system == "i686-linux" then diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 29f1dea4a4a5..54483719f111 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8294,10 +8294,11 @@ let nvidiabl = callPackage ../os-specific/linux/nvidiabl { }; - nvidia_x11 = callPackage ../os-specific/linux/nvidia-x11 { }; + nvidia_x11 = self.nvidia_x11_legacy340; nvidia_x11_legacy173 = callPackage ../os-specific/linux/nvidia-x11/legacy173.nix { }; nvidia_x11_legacy304 = callPackage ../os-specific/linux/nvidia-x11/legacy304.nix { }; + nvidia_x11_legacy340 = callPackage ../os-specific/linux/nvidia-x11/legacy340.nix { }; openafsClient = callPackage ../servers/openafs-client { };