mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2025-01-05 13:41: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 (nvidia-source-unbundle-libraries version)
|
||||||
(define (make-nvidia-source version installer)
|
#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
|
(origin
|
||||||
(method (@@ (guix packages) computed-origin-method))
|
(method (@@ (guix packages) computed-origin-method))
|
||||||
(file-name (string-append "nvidia-driver-" version "-checkout"))
|
(file-name (string-append "nvidia-driver-" version "-checkout"))
|
||||||
(sha256 #f)
|
(sha256 #f)
|
||||||
|
(snippet (get-cleanup-snippet version))
|
||||||
(uri
|
(uri
|
||||||
(delay
|
(delay
|
||||||
(with-imported-modules '((guix build utils))
|
(with-imported-modules '((guix build utils))
|
||||||
|
@ -102,16 +117,9 @@
|
||||||
#$output)))))))
|
#$output)))))))
|
||||||
|
|
||||||
(define-public nvidia-source
|
(define-public nvidia-source
|
||||||
(let ((version nvidia-version))
|
(make-nvidia-source
|
||||||
(make-nvidia-source
|
nvidia-version
|
||||||
version
|
(base32 "0i5zyvlsjnfkpfqhw6pklp0ws8nndyiwxrg4pj04jpwnxf6a38n6")))
|
||||||
(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"))))))
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
|
Loading…
Reference in a new issue