Merge pull request #139354 from colemickens/nvidia
nvidia: fix egl-wayland loading
This commit is contained in:
commit
fd6e9350d0
@ -284,6 +284,10 @@ in
|
||||
source = "${nvidia_x11.bin}/share/nvidia/nvidia-application-profiles-rc";
|
||||
};
|
||||
|
||||
# 'nvidia_x11' installs it's files to /run/opengl-driver/...
|
||||
environment.etc."egl/egl_external_platform.d".source =
|
||||
"/run/opengl-driver/share/egl/egl_external_platform.d/";
|
||||
|
||||
hardware.opengl.package = mkIf (!offloadCfg.enable) nvidia_x11.out;
|
||||
hardware.opengl.package32 = mkIf (!offloadCfg.enable) nvidia_x11.lib32;
|
||||
hardware.opengl.extraPackages = optional offloadCfg.enable nvidia_x11.out;
|
||||
|
@ -106,8 +106,16 @@ installPhase() {
|
||||
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
|
||||
|
||||
install -Dm644 10_nvidia.json.fixed $i/share/glvnd/egl_vendor.d/nvidia.json
|
||||
install -Dm644 10_nvidia_wayland.json.fixed $i/share/glvnd/egl_vendor.d/nvidia_wayland.json
|
||||
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
|
||||
|
||||
mkdir -p $i/lib/gbm
|
||||
ln -s $i/lib/libnvidia-allocator.so $i/lib/gbm/nvidia-drm_gbm.so
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
|
@ -41,7 +41,7 @@ let
|
||||
i686bundled = versionAtLeast version "391" && !disable32Bit;
|
||||
|
||||
libPathFor = pkgs: pkgs.lib.makeLibraryPath [ pkgs.libdrm pkgs.xorg.libXext pkgs.xorg.libX11
|
||||
pkgs.xorg.libXv pkgs.xorg.libXrandr pkgs.xorg.libxcb pkgs.zlib pkgs.stdenv.cc.cc ];
|
||||
pkgs.xorg.libXv pkgs.xorg.libXrandr pkgs.xorg.libxcb pkgs.zlib pkgs.stdenv.cc.cc pkgs.wayland ];
|
||||
|
||||
self = stdenv.mkDerivation {
|
||||
name = "nvidia-x11-${version}${nameSuffix}";
|
||||
|
Loading…
Reference in New Issue
Block a user