diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index bc66e3c8b7eb..598ac6a4c451 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -13,6 +13,8 @@ let kernel = callPackage # a hacky way of extracting parameters from callPackage ({ kernel, libsOnly ? false }: if libsOnly then { } else kernel) { }; + kernelModVersion = lib.versions.majorMinor kernel.modDirVersion; + selectHighestVersion = a: b: if lib.versionOlder a.version b.version then b else a; @@ -30,6 +32,8 @@ rec { openSha256 = "sha256-GCCDnaDsbXTmbCYZBCM3fpHmOSWti/DkBJwYrRGAMPI="; settingsSha256 = "sha256-kBELMJCIWD9peZba14wfCoxsi3UXO3ehFYcVh4nvzVg="; persistencedSha256 = "sha256-P8oT7g944HvNk2Ot/0T0sJM7dZs+e0d+KwbwRrmsuDY="; + + brokenOpen = kernelModVersion == "5.4" && kernel.isHardened; }; latest = selectHighestVersion production (generic { @@ -50,14 +54,16 @@ rec { # Vulkan developer beta driver # See here for more information: https://developer.nvidia.com/vulkan-driver vulkan_beta = generic rec { - version = "470.62.13"; - persistencedVersion = "470.86"; - settingsVersion = "470.86"; - sha256_64bit = "sha256-itBFNPMy+Nn0g8V8qdkRb+ELHj57GRso1lXhPHUxKVI="; - settingsSha256 = "sha256-fq6RlD6g3uylvvTjE4MmaQwxPJYU0u6IMfpPVzks0tI="; - persistencedSha256 = "sha256-eHvauvh8Wd+b8DK6B3ZWNjoWGztupWrR8iog9ok58io="; + version = "515.49.14"; + persistencedVersion = "515.48.07"; + settingsVersion = "515.48.07"; + sha256_64bit = "sha256-xNaqTeIfYQIdCxo841rQ87RQc+br5OhP6K12o4V3I18="; + openSha256 = "sha256-4KvOOAR0RQkHTFJkkG32y6uOSHB85Lh6PyVSgRjU1l4="; + settingsSha256 = "sha256-XwdMsAAu5132x2ZHqjtFvcBJk6Dao7I86UksxrOkknU="; + persistencedSha256 = "sha256-BTfYNDJKe4tOvV71/1JJSPltJua0Mx/RvDcWT5ccRRY="; url = "https://developer.nvidia.com/vulkan-beta-${lib.concatStrings (lib.splitString "." version)}-linux"; - broken = kernel.kernelAtLeast "5.17"; + + broken = kernelModVersion == "5.4" && kernel.isHardened; }; # Update note: @@ -84,7 +90,7 @@ rec { patches = let patch390 = o: - (lib.optional ((lib.versions.majorMinor kernel.modDirVersion) == o.version) (fetchpatch { + (lib.optional (kernelModVersion == o.version) (fetchpatch { inherit (o) sha256; url = "https://gitlab.com/herecura/packages/nvidia-390xx-dkms/-/raw/herecura/kernel-${o.version}.patch"; })); diff --git a/pkgs/os-specific/linux/nvidia-x11/generic.nix b/pkgs/os-specific/linux/nvidia-x11/generic.nix index d6dcc7ad6cd0..b694dc1fd0ca 100644 --- a/pkgs/os-specific/linux/nvidia-x11/generic.nix +++ b/pkgs/os-specific/linux/nvidia-x11/generic.nix @@ -15,6 +15,7 @@ , prePatch ? "" , patches ? [] , broken ? false +, brokenOpen ? broken }@args: { lib, stdenv, callPackage, pkgs, pkgsi686Linux, fetchurl @@ -104,8 +105,9 @@ let passthru = { open = mapNullable (hash: callPackage ./open.nix { - inherit hash broken; + inherit hash; nvidia_x11 = self; + broken = brokenOpen; }) openSha256; settings = (if settings32Bit then pkgsi686Linux.callPackage else callPackage) (import ./settings.nix self settingsSha256) { withGtk2 = preferGtk2; diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 5c78eb12f105..ba84eca34c81 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -364,9 +364,12 @@ in { nvidia_x11_production = nvidiaPackages.production; nvidia_x11_vulkan_beta = nvidiaPackages.vulkan_beta; - # this is not a replacement for nvidia_x11 + # this is not a replacement for nvidia_x11* # only the opensource kernel driver exposed for hydra to build - nvidia_x11_beta_open = nvidiaPackages.beta.open; + nvidia_x11_beta_open = nvidiaPackages.beta.open; + nvidia_x11_production_open = nvidiaPackages.production.open; + nvidia_x11_stable_open = nvidiaPackages.stable.open; + nvidia_x11_vulkan_beta_open = nvidiaPackages.vulkan_beta.open; openrazer = callPackage ../os-specific/linux/openrazer/driver.nix { };