From 0ae85eb25e82ef3c9748b8ad3100e90b8f77a004 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Wed, 24 Jan 2024 22:41:57 +0800 Subject: [PATCH] nongnu: nvidia-driver: Install GBM and VDPAU library to correct path. * nongnu/packages/nvidia.scm (nvidia-driver)[arguments]<#:phases>: Install GBM and VDPAU library to correct path. Signed-off-by: John Kehayias --- nongnu/packages/nvidia.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/nongnu/packages/nvidia.scm b/nongnu/packages/nvidia.scm index 8ca79cc..0aeada5 100644 --- a/nongnu/packages/nvidia.scm +++ b/nongnu/packages/nvidia.scm @@ -320,13 +320,27 @@ ACTION==\"unbind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\ '("nvidia-smi"))))) (add-before 'patch-elf 'relocate-libraries (lambda _ - (let* ((libdir (string-append #$output "/lib")) + (let* ((version #$(package-version this-package)) + (libdir (string-append #$output "/lib")) + (gbmdir (string-append libdir "/gbm")) + (vdpaudir (string-append libdir "/vdpau")) (xorgmoddir (string-append libdir "/xorg/modules")) (xorgdrvdir (string-append xorgmoddir "/drivers")) (xorgextdir (string-append xorgmoddir "/extensions")) (move-to-dir (lambda (file dir) (install-file file dir) (delete-file file)))) + (for-each + (lambda (file) + (mkdir-p gbmdir) + (with-directory-excursion gbmdir + (symlink file "nvidia-drm_gbm.so"))) + (find-files libdir "libnvidia-allocator\\.so\\.")) + + (for-each + (cut move-to-dir <> vdpaudir) + (find-files libdir "libvdpau_nvidia\\.so\\.")) + (for-each (cut move-to-dir <> xorgdrvdir) (find-files libdir "nvidia_drv\\.so$"))