lol

Merge pull request #186834 from Kiskae/nvidia-branches

nvidia_x11: reorganize latest versions

authored by

superherointj and committed by
GitHub
b01f02f9 3867731e

+35 -19
+24 -14
pkgs/os-specific/linux/nvidia-x11/default.nix
··· 12 12 13 13 kernel = callPackage # a hacky way of extracting parameters from callPackage 14 14 ({ kernel, libsOnly ? false }: if libsOnly then { } else kernel) { }; 15 + 16 + selectHighestVersion = a: b: if lib.versionOlder a.version b.version 17 + then b 18 + else a; 15 19 in 16 20 rec { 21 + # Official Unix Drivers - https://www.nvidia.com/en-us/drivers/unix/ 22 + # Branch/Maturity data - http://people.freedesktop.org/~aplattner/nvidia-versions.txt 23 + 17 24 # Policy: use the highest stable version as the default (on our master). 18 - stable = if stdenv.hostPlatform.system == "x86_64-linux" 19 - then generic { 20 - version = "515.65.01"; 21 - sha256_64bit = "sha256-BJLdxbXmWqAMvHYujWaAIFyNCOEDtxMQh6FRJq7klek="; 22 - openSha256 = "sha256-GCCDnaDsbXTmbCYZBCM3fpHmOSWti/DkBJwYrRGAMPI="; 23 - settingsSha256 = "sha256-kBELMJCIWD9peZba14wfCoxsi3UXO3ehFYcVh4nvzVg="; 24 - persistencedSha256 = "sha256-P8oT7g944HvNk2Ot/0T0sJM7dZs+e0d+KwbwRrmsuDY="; 25 - } 26 - else legacy_390; 25 + stable = if stdenv.hostPlatform.system == "i686-linux" then legacy_390 else latest; 27 26 28 - # see https://www.nvidia.com/en-us/drivers/unix/ "Production branch" 29 - production = stable; 27 + production = generic { 28 + version = "515.65.01"; 29 + sha256_64bit = "sha256-BJLdxbXmWqAMvHYujWaAIFyNCOEDtxMQh6FRJq7klek="; 30 + openSha256 = "sha256-GCCDnaDsbXTmbCYZBCM3fpHmOSWti/DkBJwYrRGAMPI="; 31 + settingsSha256 = "sha256-kBELMJCIWD9peZba14wfCoxsi3UXO3ehFYcVh4nvzVg="; 32 + persistencedSha256 = "sha256-P8oT7g944HvNk2Ot/0T0sJM7dZs+e0d+KwbwRrmsuDY="; 33 + }; 30 34 31 - beta = generic { 35 + latest = selectHighestVersion production (generic { 36 + version = "495.46"; 37 + sha256_64bit = "2Dt30X2gxUZnqlsT1uqVpcUTBCV7Hs8vjUo7WuMcYvU="; 38 + settingsSha256 = "vbcZYn+UBBGwjfrJ6SyXt3+JLBeNcXK4h8mjj7qxZPk="; 39 + persistencedSha256 = "ieYqkVxe26cLw1LUgBsFSSowAyfZkTcItIzQCestCXI="; 40 + }); 41 + 42 + beta = selectHighestVersion latest (generic { 32 43 version = "515.43.04"; 33 44 sha256_64bit = "sha256-PodaTTUOSyMW8rtdtabIkSLskgzAymQyfToNlwxPPcc="; 34 45 openSha256 = "sha256-1bAr5dWZ4jnY3Uo2JaEz/rhw2HuW9LZ5bACmA1VG068="; 35 46 settingsSha256 = "sha256-j47LtP6FNTPfiXFh9KwXX8vZOQzlytA30ZfW9N5F2PY="; 36 47 persistencedSha256 = "sha256-hULBy0wnVpLH8I0L6O9/HfgvJURtE2whpXOgN/vb3Wo="; 37 - broken = kernel.kernelAtLeast "5.19"; # Added at 2022-08-12 38 - }; 48 + }); 39 49 40 50 # Vulkan developer beta driver 41 51 # See here for more information: https://developer.nvidia.com/vulkan-driver
+4 -1
pkgs/os-specific/linux/nvidia-x11/generic.nix
··· 103 103 disallowedReferences = optional (!libsOnly) [ kernel.dev ]; 104 104 105 105 passthru = { 106 - open = mapNullable (hash: callPackage (import ./open.nix self hash) { }) openSha256; 106 + open = mapNullable (hash: callPackage ./open.nix { 107 + inherit hash broken; 108 + nvidia_x11 = self; 109 + }) openSha256; 107 110 settings = (if settings32Bit then pkgsi686Linux.callPackage else callPackage) (import ./settings.nix self settingsSha256) { 108 111 withGtk2 = preferGtk2; 109 112 withGtk3 = !preferGtk2;
+4 -2
pkgs/os-specific/linux/nvidia-x11/open.nix
··· 1 - nvidia_x11: hash: 2 1 { stdenv 3 2 , lib 4 3 , fetchFromGitHub 5 4 , kernel 5 + , nvidia_x11 6 + , hash 7 + , broken ? false 6 8 }: 7 9 8 10 stdenv.mkDerivation { ··· 32 34 homepage = "https://github.com/NVIDIA/open-gpu-kernel-modules"; 33 35 license = with licenses; [ gpl2Plus mit ]; 34 36 platforms = platforms.linux; 35 - broken = kernel.kernelAtLeast "5.19"; 36 37 maintainers = with maintainers; [ nickcao ]; 38 + inherit broken; 37 39 }; 38 40 }
+3 -2
pkgs/top-level/linux-kernels.nix
··· 356 356 357 357 nvidiaPackages = dontRecurseIntoAttrs (lib.makeExtensible (_: callPackage ../os-specific/linux/nvidia-x11 { })); 358 358 359 + nvidia_x11 = nvidiaPackages.stable; 360 + nvidia_x11_beta = nvidiaPackages.beta; 359 361 nvidia_x11_legacy340 = nvidiaPackages.legacy_340; 360 362 nvidia_x11_legacy390 = nvidiaPackages.legacy_390; 361 363 nvidia_x11_legacy470 = nvidiaPackages.legacy_470; 362 - nvidia_x11_beta = nvidiaPackages.beta; 364 + nvidia_x11_production = nvidiaPackages.production; 363 365 nvidia_x11_vulkan_beta = nvidiaPackages.vulkan_beta; 364 - nvidia_x11 = nvidiaPackages.stable; 365 366 366 367 # this is not a replacement for nvidia_x11 367 368 # only the opensource kernel driver exposed for hydra to build