diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh index 07a9961a1bab..b7824f209776 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh @@ -64,6 +64,7 @@ installPhase() { for i in $lib32 $out; do rm -f $i/lib/lib{glx,nvidia-wfb}.so.* # handled separately rm -f $i/lib/libnvidia-gtk* # built from source + rm -f $i/lib/libnvidia-wayland-client* # built from source if [ "$useGLVND" = "1" ]; then # Pre-built libglvnd rm $i/lib/lib{GL,GLX,EGL,GLESv1_CM,GLESv2,OpenGL,GLdispatch}.so.* diff --git a/pkgs/os-specific/linux/nvidia-x11/settings.nix b/pkgs/os-specific/linux/nvidia-x11/settings.nix index 6112b65eabd9..0b801d4b2724 100644 --- a/pkgs/os-specific/linux/nvidia-x11/settings.nix +++ b/pkgs/os-specific/linux/nvidia-x11/settings.nix @@ -1,9 +1,25 @@ nvidia_x11: sha256: -{ stdenv, lib, fetchFromGitHub, fetchpatch, pkg-config, m4, jansson, gtk2, dbus, gtk3 -, libXv, libXrandr, libXext, libXxf86vm, libvdpau -, librsvg, wrapGAppsHook -, withGtk2 ? false, withGtk3 ? true +{ stdenv +, lib +, fetchFromGitHub +, fetchpatch +, pkg-config +, m4 +, jansson +, gtk2 +, dbus +, gtk3 +, libXv +, libXrandr +, libXext +, libXxf86vm +, libvdpau +, librsvg +, wrapGAppsHook +, addOpenGLRunpath +, withGtk2 ? false +, withGtk3 ? true }: let @@ -75,10 +91,10 @@ stdenv.mkDerivation { fi ''; - nativeBuildInputs = [ pkg-config m4 ]; + nativeBuildInputs = [ pkg-config m4 addOpenGLRunpath ]; buildInputs = [ jansson libXv libXrandr libXext libXxf86vm libvdpau nvidia_x11 gtk2 dbus ] - ++ lib.optionals withGtk3 [ gtk3 librsvg wrapGAppsHook ]; + ++ lib.optionals withGtk3 [ gtk3 librsvg wrapGAppsHook ]; installFlags = [ "PREFIX=$(out)" ]; @@ -106,6 +122,8 @@ stdenv.mkDerivation { postFixup = '' patchelf --set-rpath "$(patchelf --print-rpath $out/bin/$binaryName):$out/lib:${libXv}/lib" \ $out/bin/$binaryName + + addOpenGLRunpath $out/bin/$binaryName ''; passthru = {