summaryrefslogtreecommitdiff
path: root/nongnu
diff options
context:
space:
mode:
authorHilton Chain <hako@ultrarare.space>2024-01-29 17:12:53 +0800
committerJohn Kehayias <john.kehayias@protonmail.com>2024-04-24 20:06:22 -0400
commitc05b4995abc13695d33cc19f028bd28e8c7263fe (patch)
tree29b35de304955ef61fd2284ce0d5189c06fc35a6 /nongnu
parent5b0465cf31bdca91d28383495489d59e919c8b80 (diff)
nongnu: nvidia-driver: Unbundle EGL external platform libraries.
* nongnu/packages/nvidia.scm (nvidia-source-unbundle-libraries): Remove egl-gbm and egl-wayland libraries. (nvidia-driver)[inputs]: Add egl-gbm, egl-wayland. Remove mesa. [arguments]<#:phases>: Use them for configuration. Adjust RUNPATH accordingly. Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
Diffstat (limited to 'nongnu')
-rw-r--r--nongnu/packages/nvidia.scm15
1 files changed, 10 insertions, 5 deletions
diff --git a/nongnu/packages/nvidia.scm b/nongnu/packages/nvidia.scm
index 4f0e705..d57549e 100644
--- a/nongnu/packages/nvidia.scm
+++ b/nongnu/packages/nvidia.scm
@@ -77,7 +77,11 @@
(use-modules (guix build utils))
(for-each delete-file
(find-files "." (string-join
- '(;; nvidia-settings
+ '(;; egl-gbm
+ "libnvidia-egl-gbm\\.so\\."
+ ;; egl-wayland
+ "libnvidia-egl-wayland\\.so\\."
+ ;; nvidia-settings
"libnvidia-gtk[23]\\.so\\."
;; opencl-icd-loader
"libOpenCL\\.so\\.")
@@ -172,7 +176,7 @@ VERSION as argument and returns a G-expression."
(substitute* '("10_nvidia_wayland.json"
"15_nvidia_gbm.json")
(("libnvidia-egl-(wayland|gbm)\\.so\\.." all)
- (string-append #$output "/lib/" all)))
+ (search-input-file inputs (string-append "lib/" all))))
;; OpenCL vendor ICD configuration
(substitute* "nvidia.icd"
@@ -205,12 +209,12 @@ KERNEL==\"nvidia_uvm\", RUN+=\"@sh@ -c '@mknod@ -m 666 /dev/nvidia-uvm-tools c $
#$(glibc-dynamic-linker)))
(rpath (string-join
(list (string-append #$output "/lib")
+ (string-append #$(this-package-input "egl-wayland") "/lib")
(string-append (ungexp (this-package-input "gcc") "lib") "/lib")
(string-append #$(this-package-input "glibc") "/lib")
(string-append #$(this-package-input "libdrm") "/lib")
(string-append #$(this-package-input "libx11") "/lib")
(string-append #$(this-package-input "libxext") "/lib")
- (string-append #$(this-package-input "mesa") "/lib")
(string-append #$(this-package-input "wayland") "/lib"))
":")))
(define (patch-elf file)
@@ -290,7 +294,9 @@ KERNEL==\"nvidia_uvm\", RUN+=\"@sh@ -c '@mknod@ -m 666 /dev/nvidia-uvm-tools c $
(supported-systems '("i686-linux" "x86_64-linux"))
(native-inputs (list patchelf))
(inputs
- (list `(,gcc "lib")
+ (list egl-gbm
+ egl-wayland
+ `(,gcc "lib")
bash-minimal
coreutils
glibc
@@ -298,7 +304,6 @@ KERNEL==\"nvidia_uvm\", RUN+=\"@sh@ -c '@mknod@ -m 666 /dev/nvidia-uvm-tools c $
libdrm
libx11
libxext
- mesa
wayland))
(home-page "https://www.nvidia.com")
(synopsis "Proprietary NVIDIA driver")