From 09b37c490e4b6d4f5861c1422e8784778e474ff1 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Mon, 21 Nov 2022 13:23:22 +0800 Subject: nongnu: nvidia-driver: Split post-install phase. * nongnu/packages/nvidia.scm (nvidia-driver)[arguments]<#:phases>: Split post-install phase into patch-elf and create-short-name-symlinks phases. Signed-off-by: Jonathan Brielmaier --- nongnu/packages/nvidia.scm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nongnu/packages/nvidia.scm b/nongnu/packages/nvidia.scm index f1419c7..5230270 100644 --- a/nongnu/packages/nvidia.scm +++ b/nongnu/packages/nvidia.scm @@ -171,10 +171,8 @@ KERNEL==\"nvidia_uvm\", RUN+=\"@sh@ -c '@mknod@ -m 666 /dev/nvidia-uvm-tools c $ (substitute* rules (("@\\<(sh|grep|mknod|cut)\\>@" all cmd) (search-input-file inputs (string-append "/bin/" cmd))))))) - (add-after 'install 'post-install + (add-after 'install 'patch-elf (lambda _ - ;; ------------------------------ - ;; patchelf (let* ((ld.so (string-append #$(this-package-input "glibc") #$(glibc-dynamic-linker))) (rpath (string-join @@ -203,10 +201,9 @@ KERNEL==\"nvidia_uvm\", RUN+=\"@sh@ -c '@mknod@ -m 666 /dev/nvidia-uvm-tools c $ (when (elf-file? file) (patch-elf file))) (append (find-files #$output ".*\\.so") - (find-files (string-append #$output "/bin"))))) - - ;; ------------------------------ - ;; Create short name symbolic links + (find-files (string-append #$output "/bin"))))))) + (add-after 'patch-elf 'create-short-name-symlinks + (lambda _ (define (get-soname file) (when elf-file? file (let* ((cmd (string-append "patchelf --print-soname " file)) -- cgit v1.2.3