nongnu: nvidia-driver: Remove unused dirname variables in post-install phase.

* nongnu/packages/nvidia.scm (nvidia-driver)[arguments]<#:phases>: Remove
dirname variables.

Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
This commit is contained in:
Hilton Chain 2022-11-21 13:19:39 +08:00 committed by Jonathan Brielmaier
parent 61c61bd8c2
commit 3c0e54efbf
No known key found for this signature in database
GPG key ID: ECFC83988B4E4B9F

View file

@ -172,11 +172,7 @@ KERNEL==\"nvidia_uvm\", RUN+=\"@sh@ -c '@mknod@ -m 666 /dev/nvidia-uvm-tools c $
(("@\\<(sh|grep|mknod|cut)\\>@" all cmd) (("@\\<(sh|grep|mknod|cut)\\>@" all cmd)
(search-input-file inputs (string-append "/bin/" cmd))))))) (search-input-file inputs (string-append "/bin/" cmd)))))))
(add-after 'install 'post-install (add-after 'install 'post-install
(lambda* (#:key inputs native-inputs outputs #:allow-other-keys) (lambda _
(let* ((libdir (string-append #$output "/lib"))
(bindir (string-append #$output "/bin"))
(etcdir (string-append #$output "/etc")))
;; ------------------------------ ;; ------------------------------
;; patchelf ;; patchelf
(let* ((ld.so (string-append #$(this-package-input "glibc") (let* ((ld.so (string-append #$(this-package-input "glibc")
@ -206,8 +202,8 @@ KERNEL==\"nvidia_uvm\", RUN+=\"@sh@ -c '@mknod@ -m 666 /dev/nvidia-uvm-tools c $
(for-each (lambda (file) (for-each (lambda (file)
(when (elf-file? file) (when (elf-file? file)
(patch-elf file))) (patch-elf file)))
(find-files #$output ".*\\.so")) (append (find-files #$output ".*\\.so")
(patch-elf (string-append bindir "/" "nvidia-smi"))) (find-files (string-append #$output "/bin")))))
;; ------------------------------ ;; ------------------------------
;; Create short name symbolic links ;; Create short name symbolic links
@ -240,7 +236,7 @@ KERNEL==\"nvidia_uvm\", RUN+=\"@sh@ -c '@mknod@ -m 666 /dev/nvidia-uvm-tools c $
(list soname base)))))) (list soname base))))))
(find-files #$output "\\.so")) (find-files #$output "\\.so"))
(symlink (string-append "libglxserver_nvidia.so." #$version) (symlink (string-append "libglxserver_nvidia.so." #$version)
(string-append #$output "/lib/xorg/modules/extensions/" "libglxserver_nvidia.so")))))))) (string-append #$output "/lib/xorg/modules/extensions/" "libglxserver_nvidia.so")))))))
(supported-systems '("x86_64-linux")) (supported-systems '("x86_64-linux"))
(native-inputs (list patchelf)) (native-inputs (list patchelf))
(inputs (inputs