mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2025-01-03 20:51:42 +01:00
nongnu: make-nvidia-source: Extend functionality.
* nongnu/packages/nvidia.scm (nvidia-source-unbundle-libraries): New procedure. (make-nvidia-source): Create installer origin internally. Accept a ‘get-cleanup-snippet’ procedure. (nvidia-source): Adjust accordingly. Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
This commit is contained in:
parent
5f7dabe418
commit
4bc11de5dd
1 changed files with 20 additions and 12 deletions
|
@ -72,12 +72,27 @@
|
|||
;;;
|
||||
|
||||
|
||||
;; Extract the driver installer and make it a new origin instance for reusing.
|
||||
(define (make-nvidia-source version installer)
|
||||
(define (nvidia-source-unbundle-libraries version)
|
||||
#t)
|
||||
|
||||
(define* (make-nvidia-source
|
||||
version hash
|
||||
#:optional (get-cleanup-snippet nvidia-source-unbundle-libraries))
|
||||
"Given VERSION and HASH of an NVIDIA driver installer, return an <origin> for
|
||||
its unpacked checkout. GET-CLEANUP-SNIPPET is a procedure that accepts the
|
||||
VERSION as argument and returns a G-expression."
|
||||
(define installer
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://us.download.nvidia.com/XFree86/Linux-x86_64/"
|
||||
version "/NVIDIA-Linux-x86_64-" version ".run"))
|
||||
(sha256 hash)))
|
||||
(origin
|
||||
(method (@@ (guix packages) computed-origin-method))
|
||||
(file-name (string-append "nvidia-driver-" version "-checkout"))
|
||||
(sha256 #f)
|
||||
(snippet (get-cleanup-snippet version))
|
||||
(uri
|
||||
(delay
|
||||
(with-imported-modules '((guix build utils))
|
||||
|
@ -102,16 +117,9 @@
|
|||
#$output)))))))
|
||||
|
||||
(define-public nvidia-source
|
||||
(let ((version nvidia-version))
|
||||
(make-nvidia-source
|
||||
version
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://us.download.nvidia.com/XFree86/Linux-x86_64/"
|
||||
version "/NVIDIA-Linux-x86_64-" version ".run"))
|
||||
(sha256
|
||||
(base32 "0i5zyvlsjnfkpfqhw6pklp0ws8nndyiwxrg4pj04jpwnxf6a38n6"))))))
|
||||
(make-nvidia-source
|
||||
nvidia-version
|
||||
(base32 "0i5zyvlsjnfkpfqhw6pklp0ws8nndyiwxrg4pj04jpwnxf6a38n6")))
|
||||
|
||||
|
||||
;;;
|
||||
|
|
Loading…
Reference in a new issue