nongnu: nvidia-driver: Remove libraries provided by nvidia-settings.

* nongnu/packages/nvidia.scm (nvidia-source-unbundle-libraries): Remove
libraries provided by nvidia-settings.
(nvidia-driver)[arguments]<#:phases>: Remove their dependencies from RUNPATH.
[inputs]: Remove atk, cairo, gdk-pixbuf, glib, gtk+, gtk+-2, pango.

Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
This commit is contained in:
Hilton Chain 2023-12-15 20:59:52 +08:00 committed by John Kehayias
parent 4bc11de5dd
commit 99e12e9cbe
No known key found for this signature in database
GPG key ID: 499097AE5EA815D9

View file

@ -73,7 +73,13 @@
(define (nvidia-source-unbundle-libraries version) (define (nvidia-source-unbundle-libraries version)
#t) #~(begin
(use-modules (guix build utils))
(for-each delete-file
(find-files "." (string-join
'(;; nvidia-settings
"libnvidia-gtk[23]\\.so\\.")
"|")))))
(define* (make-nvidia-source (define* (make-nvidia-source
version hash version hash
@ -197,18 +203,11 @@ KERNEL==\"nvidia_uvm\", RUN+=\"@sh@ -c '@mknod@ -m 666 /dev/nvidia-uvm-tools c $
(list "$ORIGIN" (list "$ORIGIN"
(string-append #$output "/lib") (string-append #$output "/lib")
(string-append #$gcc:lib "/lib") (string-append #$gcc:lib "/lib")
(string-append #$gtk+-2 "/lib")
(string-append #$(this-package-input "atk") "/lib")
(string-append #$(this-package-input "cairo") "/lib")
(string-append #$(this-package-input "gdk-pixbuf") "/lib")
(string-append #$(this-package-input "glib") "/lib")
(string-append #$(this-package-input "glibc") "/lib") (string-append #$(this-package-input "glibc") "/lib")
(string-append #$(this-package-input "gtk+") "/lib")
(string-append #$(this-package-input "libdrm") "/lib") (string-append #$(this-package-input "libdrm") "/lib")
(string-append #$(this-package-input "libx11") "/lib") (string-append #$(this-package-input "libx11") "/lib")
(string-append #$(this-package-input "libxext") "/lib") (string-append #$(this-package-input "libxext") "/lib")
(string-append #$(this-package-input "mesa") "/lib") (string-append #$(this-package-input "mesa") "/lib")
(string-append #$(this-package-input "pango") "/lib")
(string-append #$(this-package-input "wayland") "/lib")) (string-append #$(this-package-input "wayland") "/lib"))
":"))) ":")))
(define (patch-elf file) (define (patch-elf file)
@ -265,23 +264,16 @@ KERNEL==\"nvidia_uvm\", RUN+=\"@sh@ -c '@mknod@ -m 666 /dev/nvidia-uvm-tools c $
(native-inputs (list patchelf)) (native-inputs (list patchelf))
(inputs (inputs
(list `(,gcc "lib") (list `(,gcc "lib")
atk
bash-minimal bash-minimal
cairo
coreutils coreutils
gdk-pixbuf
glib
glibc glibc
grep grep
gtk+
gtk+-2
kmod kmod
libdrm libdrm
libx11 libx11
libxext libxext
linux-lts linux-lts
mesa mesa
pango
wayland)) wayland))
(home-page "https://www.nvidia.com") (home-page "https://www.nvidia.com")
(synopsis "Proprietary NVIDIA driver") (synopsis "Proprietary NVIDIA driver")