Merge pull request #329450 from Kiskae/nvidia/560.28.03

This commit is contained in:
Franz Pletz 2024-07-29 09:19:52 +02:00 committed by GitHub
commit 1e00e90307
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 24 additions and 17 deletions

View File

@ -256,7 +256,9 @@ in
open = lib.mkEnableOption ''
the open source NVIDIA kernel module
'';
'' // {
defaultText = lib.literalExpression ''lib.versionAtLeast config.hardware.nvidia.package.version "560"'';
};
};
};
@ -305,6 +307,8 @@ in
extraPackages32 = [ nvidia_x11.lib32 ];
};
environment.systemPackages = [ nvidia_x11.bin ];
hardware.nvidia.open = lib.mkDefault (lib.versionAtLeast nvidia_x11.version "560");
})
# X11

View File

@ -112,16 +112,17 @@ installPhase() {
# EGL
if [ "$useGLVND" = "1" ]; then
sed -E "s#(libEGL_nvidia)#$i/lib/\\1#" 10_nvidia.json > 10_nvidia.json.fixed
sed -E "s#(libnvidia-egl-wayland)#$i/lib/\\1#" 10_nvidia_wayland.json > 10_nvidia_wayland.json.fixed
mkdir -p "$i/share/egl/egl_external_platform.d"
for icdname in $(find . -name '*_nvidia*.json')
do
cat "$icdname" | jq ".ICD.library_path |= \"$i/lib/\(.)\"" | tee "$i/share/egl/egl_external_platform.d/$icdname"
done
install -Dm644 10_nvidia.json.fixed $i/share/glvnd/egl_vendor.d/10_nvidia.json
install -Dm644 10_nvidia_wayland.json.fixed $i/share/egl/egl_external_platform.d/10_nvidia_wayland.json
if [[ -f "15_nvidia_gbm.json" ]]; then
sed -E "s#(libnvidia-egl-gbm)#$i/lib/\\1#" 15_nvidia_gbm.json > 15_nvidia_gbm.json.fixed
install -Dm644 15_nvidia_gbm.json.fixed $i/share/egl/egl_external_platform.d/15_nvidia_gbm.json
# glvnd icd
mkdir -p "$i/share/glvnd/egl_vendor.d"
mv "$i/share/egl/egl_external_platform.d/10_nvidia.json" "$i/share/glvnd/egl_vendor.d/10_nvidia.json"
if [[ -f "$i/share/egl/egl_external_platform.d/15_nvidia_gbm.json" ]]; then
mkdir -p $i/lib/gbm
ln -s $i/lib/libnvidia-allocator.so $i/lib/gbm/nvidia-drm_gbm.so
fi

View File

@ -51,12 +51,12 @@ rec {
});
beta = selectHighestVersion latest (generic {
version = "555.52.04";
sha256_64bit = "sha256-nVOubb7zKulXhux9AruUTVBQwccFFuYGWrU1ZiakRAI=";
sha256_aarch64 = "sha256-Kt60kTTO3mli66De2d1CAoE3wr0yUbBe7eqCIrYHcWk=";
openSha256 = "sha256-wDimW8/rJlmwr1zQz8+b1uvxxxbOf3Bpk060lfLKuy0=";
settingsSha256 = "sha256-PMh5efbSEq7iqEMBr2+VGQYkBG73TGUh6FuDHZhmwHk=";
persistencedSha256 = "sha256-KAYIvPjUVilQQcD04h163MHmKcQrn2a8oaXujL2Bxro=";
version = "560.28.03";
sha256_64bit = "sha256-martv18vngYBJw1IFUCAaYr+uc65KtlHAMdLMdtQJ+Y=";
sha256_aarch64 = "sha256-+u0ZolZcZoej4nqPGmZn5qpyynLvu2QSm9Rd3wLdDmM=";
openSha256 = "sha256-asGpqOpU0tIO9QqceA8XRn5L27OiBFuI9RZ1NjSVwaM=";
settingsSha256 = "sha256-b4nhUMCzZc3VANnNb0rmcEH6H7SK2D5eZIplgPV59c8=";
persistencedSha256 = "sha256-MhITuC8tH/IPhCOUm60SrPOldOpitk78mH0rg+egkTE=";
});
# Vulkan developer beta driver

View File

@ -41,6 +41,7 @@
, nukeReferences
, which
, libarchive
, jq
, # Whether to build the libraries only (i.e. not the kernel module or
# nvidia-settings). Used to support 32-bit binaries on 64-bit
# Linux.
@ -175,7 +176,7 @@ let
libPath = libPathFor pkgs;
libPath32 = optionalString i686bundled (libPathFor pkgsi686Linux);
nativeBuildInputs = [ perl nukeReferences which libarchive ]
nativeBuildInputs = [ perl nukeReferences which libarchive jq ]
++ optionals (!libsOnly) kernel.moduleBuildDependencies;
disallowedReferences = optionals (!libsOnly) [ kernel.dev ];

View File

@ -9,6 +9,7 @@ nvidia_x11: sha256:
, jansson
, gtk2
, dbus
, vulkan-headers
, gtk3
, libXv
, libXrandr
@ -117,7 +118,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ pkg-config m4 addDriverRunpath ]
++ lib.optionals withGtk3 [ wrapGAppsHook3 ];
buildInputs = [ jansson libXv libXrandr libXext libXxf86vm libvdpau nvidia_x11 dbus ]
buildInputs = [ jansson libXv libXrandr libXext libXxf86vm libvdpau nvidia_x11 dbus vulkan-headers ]
++ lib.optionals (withGtk2 || lib.versionOlder nvidia_x11.settingsVersion "525.53") [ gtk2 ]
++ lib.optionals withGtk3 [ gtk3 librsvg ];