Merge pull request #249158 from Kiskae/nvidia-settings/fix-path

linuxPackages.nvidia_x11.settings: fix runpath
This commit is contained in:
Nick Cao 2023-08-14 18:43:48 -06:00 committed by GitHub
commit 467e4c2e93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 6 deletions

View file

@ -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.*

View file

@ -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 = {