mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2024-11-22 00:18:07 +01:00
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 <jonathan.brielmaier@web.de>
This commit is contained in:
parent
3c0e54efbf
commit
09b37c490e
1 changed files with 4 additions and 7 deletions
|
@ -171,10 +171,8 @@ KERNEL==\"nvidia_uvm\", RUN+=\"@sh@ -c '@mknod@ -m 666 /dev/nvidia-uvm-tools c $
|
||||||
(substitute* rules
|
(substitute* rules
|
||||||
(("@\\<(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 'patch-elf
|
||||||
(lambda _
|
(lambda _
|
||||||
;; ------------------------------
|
|
||||||
;; patchelf
|
|
||||||
(let* ((ld.so (string-append #$(this-package-input "glibc")
|
(let* ((ld.so (string-append #$(this-package-input "glibc")
|
||||||
#$(glibc-dynamic-linker)))
|
#$(glibc-dynamic-linker)))
|
||||||
(rpath (string-join
|
(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)
|
(when (elf-file? file)
|
||||||
(patch-elf file)))
|
(patch-elf file)))
|
||||||
(append (find-files #$output ".*\\.so")
|
(append (find-files #$output ".*\\.so")
|
||||||
(find-files (string-append #$output "/bin")))))
|
(find-files (string-append #$output "/bin")))))))
|
||||||
|
(add-after 'patch-elf 'create-short-name-symlinks
|
||||||
;; ------------------------------
|
(lambda _
|
||||||
;; Create short name symbolic links
|
|
||||||
(define (get-soname file)
|
(define (get-soname file)
|
||||||
(when elf-file? file
|
(when elf-file? file
|
||||||
(let* ((cmd (string-append "patchelf --print-soname " file))
|
(let* ((cmd (string-append "patchelf --print-soname " file))
|
||||||
|
|
Loading…
Reference in a new issue