summary refs log tree commit diff
path: root/pkgs/os-specific/linux/nvidia-x11
diff options
context:
space:
mode:
authorJoe Hermaszewski <git@monoid.al>2020-09-24 22:53:05 +0800
committerGitHub <noreply@github.com>2020-09-24 10:53:05 -0400
commit99d2db8dce032a47430117f27f6c4fe97e8b07ff (patch)
tree443aacb24352a7ae589af3b8773fde3430a249aa /pkgs/os-specific/linux/nvidia-x11
parentf5061117b2b1b4df42190238d8d496337d8d9fd3 (diff)
downloadnixpkgs-99d2db8dce032a47430117f27f6c4fe97e8b07ff.tar
nixpkgs-99d2db8dce032a47430117f27f6c4fe97e8b07ff.tar.gz
nixpkgs-99d2db8dce032a47430117f27f6c4fe97e8b07ff.tar.bz2
nixpkgs-99d2db8dce032a47430117f27f6c4fe97e8b07ff.tar.lz
nixpkgs-99d2db8dce032a47430117f27f6c4fe97e8b07ff.tar.xz
nixpkgs-99d2db8dce032a47430117f27f6c4fe97e8b07ff.tar.zst
nixpkgs-99d2db8dce032a47430117f27f6c4fe97e8b07ff.zip
nvidia-x11.vulkan_beta: init at 450.56.11 (#97882)
- This is fetched from a different URL, so allow passing that explicitly.

- There also isn't an nvidia-persistenced or nvidia-settings release for
  this version, so use 450.57 instead. Also implement passing
  persistenced and settings version explicitly.

Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Diffstat (limited to 'pkgs/os-specific/linux/nvidia-x11')
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/default.nix11
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/generic.nix10
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/persistenced.nix6
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/settings.nix6
4 files changed, 24 insertions, 9 deletions
diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix
index df71a953fee..7c37fcf231f 100644
--- a/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -32,6 +32,17 @@ rec {
   # No active beta right now
   beta = stable;
 
+  # Vulkan developer beta driver
+  vulkan_beta = generic {
+    version = "450.56.11";
+    persistencedVersion = "450.57";
+    settingsVersion = "450.57";
+    sha256_64bit = "1k64h8sp4rf6kc7liypznjgkmxi67njy1s8xy2r341fhl62pl010";
+    settingsSha256 = "1clbj9a3kv3j8jg35c197gd7b3f9f9f4h9ll5hlax95hdg12lgan";
+    persistencedSha256 = "17747z1fsbiznfsmahxmz8kmhwwcjanpfih60v5mwzk63gy4i3d5";
+    url = "https://developer.nvidia.com/vulkan-beta-4505611-linux";
+  };
+
   # Last one supporting x86
   legacy_390 = generic {
     version = "390.138";
diff --git a/pkgs/os-specific/linux/nvidia-x11/generic.nix b/pkgs/os-specific/linux/nvidia-x11/generic.nix
index 63091e9875f..8a9e340a20a 100644
--- a/pkgs/os-specific/linux/nvidia-x11/generic.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/generic.nix
@@ -1,8 +1,11 @@
 { version
+, url ? null
 , sha256_32bit ? null
 , sha256_64bit
 , settingsSha256
+, settingsVersion ? version
 , persistencedSha256
+, persistencedVersion ? version
 , useGLVND ? true
 , useProfiles ? true
 , preferGtk2 ? false
@@ -11,7 +14,7 @@
 , prePatch ? ""
 , patches ? []
 , broken ? false
-}:
+}@args:
 
 { stdenv, callPackage, pkgs, pkgsi686Linux, fetchurl
 , kernel ? null, perl, nukeReferences
@@ -46,12 +49,12 @@ let
     src =
       if stdenv.hostPlatform.system == "x86_64-linux" then
         fetchurl {
-          url = "https://download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}${pkgSuffix}.run";
+          url = args.url or "https://download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}${pkgSuffix}.run";
           sha256 = sha256_64bit;
         }
       else if stdenv.hostPlatform.system == "i686-linux" then
         fetchurl {
-          url = "https://download.nvidia.com/XFree86/Linux-x86/${version}/NVIDIA-Linux-x86-${version}${pkgSuffix}.run";
+          url = args.url or "https://download.nvidia.com/XFree86/Linux-x86/${version}/NVIDIA-Linux-x86-${version}${pkgSuffix}.run";
           sha256 = sha256_32bit;
         }
       else throw "nvidia-x11 does not support platform ${stdenv.hostPlatform.system}";
@@ -89,6 +92,7 @@ let
         withGtk3 = !preferGtk2;
       };
       persistenced = mapNullable (hash: callPackage (import ./persistenced.nix self hash) { }) persistencedSha256;
+      inherit persistencedVersion settingsVersion;
     };
 
     meta = with stdenv.lib; {
diff --git a/pkgs/os-specific/linux/nvidia-x11/persistenced.nix b/pkgs/os-specific/linux/nvidia-x11/persistenced.nix
index de36ad06c60..ff2792ac315 100644
--- a/pkgs/os-specific/linux/nvidia-x11/persistenced.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/persistenced.nix
@@ -2,14 +2,14 @@ nvidia_x11: sha256:
 
 { stdenv, fetchFromGitHub, m4 }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "nvidia-persistenced";
-  inherit (nvidia_x11) version;
+  version = nvidia_x11.persistencedVersion;
 
   src = fetchFromGitHub {
     owner = "NVIDIA";
     repo = "nvidia-persistenced";
-    rev = nvidia_x11.version;
+    rev = nvidia_x11.persistencedVersion;
     inherit sha256;
   };
 
diff --git a/pkgs/os-specific/linux/nvidia-x11/settings.nix b/pkgs/os-specific/linux/nvidia-x11/settings.nix
index b1250e56ee0..fbddd7b7fa2 100644
--- a/pkgs/os-specific/linux/nvidia-x11/settings.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/settings.nix
@@ -9,13 +9,13 @@ let
   src = fetchFromGitHub {
     owner = "NVIDIA";
     repo = "nvidia-settings";
-    rev = nvidia_x11.version;
+    rev = nvidia_x11.settingsVersion;
     inherit sha256;
   };
 
   libXNVCtrl = stdenv.mkDerivation {
     pname = "libXNVCtrl";
-    inherit (nvidia_x11) version;
+    version = nvidia_x11.settingsVersion;
     inherit src;
 
     buildInputs = [ libXrandr libXext ];
@@ -42,7 +42,7 @@ in
 
 stdenv.mkDerivation {
   pname = "nvidia-settings";
-  inherit (nvidia_x11) version;
+  version = nvidia_x11.settingsVersion;
   inherit src;
 
   nativeBuildInputs = [ pkgconfig m4 ];