From c79b173db5b4a61782d0afb8a798ac15ff355301 Mon Sep 17 00:00:00 2001 From: Kiskae Date: Mon, 5 Jun 2023 19:49:17 +0200 Subject: [PATCH] linuxPackages.nvidia_x11_beta: fix optix denoiser OptiX tries loading `$ORIGIN/nvoptix.bin` before `/usr/share/nvidia/nvoptix.bin`. Additionally OptiX isn't supported for 32-bit. --- pkgs/os-specific/linux/nvidia-x11/builder.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh index a2ced98b89dc..2b0f55c03879 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh @@ -124,12 +124,14 @@ installPhase() { if [ -e nvngx.dll ] && [ -e _nvngx.dll ]; then install -Dm644 -t $i/lib/nvidia/wine/ nvngx.dll _nvngx.dll fi - - if [ -e nvoptix.bin ]; then - install -Dm444 -t $i/share/nvidia/ nvoptix.bin - fi done + + # OptiX tries loading `$ORIGIN/nvoptix.bin` first + if [ -e nvoptix.bin ]; then + install -Dm444 -t $out/lib/ nvoptix.bin + fi + if [ -n "$bin" ]; then # Install the X drivers. mkdir -p $bin/lib/xorg/modules