mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2025-01-08 23:21:44 +01:00
nongnu: nvidia: Use explicit versions and hashes.
* nongnu/packages/nvidia.scm (nvidia-source,nvidia-settings-source): Add hash argument. (nvidia-driver,nvidia-settings)[version,source]: Use explicit versions and hashes. (nvda): Don't inherit from nvidia-driver (for updater). (nvidia-version, %nvidia-driver-hashes,%nvidia-settings-hashes): Delete variables. Signed-off-by: Hilton Chain <hako@ultrarare.space>
This commit is contained in:
parent
8a6a4a3982
commit
3d54c63d35
1 changed files with 15 additions and 22 deletions
|
@ -65,20 +65,11 @@
|
||||||
;; GSYNC control for Vulkan direct-to-display applications.
|
;; GSYNC control for Vulkan direct-to-display applications.
|
||||||
"^VKDirectGSYNC(Compatible)?Allowed$"))
|
"^VKDirectGSYNC(Compatible)?Allowed$"))
|
||||||
|
|
||||||
(define-public nvidia-version "550.120")
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; NVIDIA driver checkouts
|
;;; NVIDIA driver checkouts
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
|
|
||||||
(define %nvidia-driver-hashes
|
|
||||||
'(("550.120" . "15sn0g3mzh4i8l4amqsdw3d0s1rpriwa13h94xvcxk2k8wkjh6c0")))
|
|
||||||
|
|
||||||
(define %nvidia-settings-hashes
|
|
||||||
'(("550.120" . "1d8rxpk2z9apkvm7vsr7j93rfizh8bgm4h6rlha3m2j818zwixvw")))
|
|
||||||
|
|
||||||
(define nvidia-driver-snippet
|
(define nvidia-driver-snippet
|
||||||
;; Note: delay to cope with cyclic module imports at the top level.
|
;; Note: delay to cope with cyclic module imports at the top level.
|
||||||
(delay
|
(delay
|
||||||
|
@ -117,7 +108,7 @@
|
||||||
(rename-file
|
(rename-file
|
||||||
(string-append "extractdir/" this-file ".tar.zst") this-file)))))
|
(string-append "extractdir/" this-file ".tar.zst") this-file)))))
|
||||||
|
|
||||||
(define (nvidia-source version)
|
(define (nvidia-source version hash)
|
||||||
"Given VERSION of an NVIDIA driver installer, return an <origin> for
|
"Given VERSION of an NVIDIA driver installer, return an <origin> for
|
||||||
its unpacked checkout."
|
its unpacked checkout."
|
||||||
(origin
|
(origin
|
||||||
|
@ -126,8 +117,7 @@ its unpacked checkout."
|
||||||
"https://us.download.nvidia.com/XFree86/Linux-x86_64/"
|
"https://us.download.nvidia.com/XFree86/Linux-x86_64/"
|
||||||
version "/NVIDIA-Linux-x86_64-" version ".run"))
|
version "/NVIDIA-Linux-x86_64-" version ".run"))
|
||||||
(file-name (string-append "NVIDIA-Linux-x86_64-" version))
|
(file-name (string-append "NVIDIA-Linux-x86_64-" version))
|
||||||
(sha256
|
(sha256 (base32 hash))
|
||||||
(base32 (assoc-ref %nvidia-driver-hashes version)))
|
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet (force nvidia-driver-snippet))))
|
(snippet (force nvidia-driver-snippet))))
|
||||||
|
|
||||||
|
@ -229,8 +219,9 @@ ACTION==\"unbind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\
|
||||||
(define-public nvidia-driver
|
(define-public nvidia-driver
|
||||||
(package
|
(package
|
||||||
(name "nvidia-driver")
|
(name "nvidia-driver")
|
||||||
(version nvidia-version)
|
(version "550.120")
|
||||||
(source (nvidia-source version))
|
(source (nvidia-source
|
||||||
|
version "15sn0g3mzh4i8l4amqsdw3d0s1rpriwa13h94xvcxk2k8wkjh6c0"))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:modules '((guix build copy-build-system)
|
(list #:modules '((guix build copy-build-system)
|
||||||
|
@ -487,8 +478,8 @@ To enable GSP mode manually, add @code{\"NVreg_EnableGpuFirmware=1\"} to
|
||||||
(define-public nvidia-module
|
(define-public nvidia-module
|
||||||
(package
|
(package
|
||||||
(name "nvidia-module")
|
(name "nvidia-module")
|
||||||
(version nvidia-version)
|
(version (package-version nvidia-driver))
|
||||||
(source (nvidia-source version))
|
(source (package-source nvidia-driver))
|
||||||
(build-system linux-module-build-system)
|
(build-system linux-module-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:linux linux-lts
|
(list #:linux linux-lts
|
||||||
|
@ -567,7 +558,7 @@ add @code{nvidia_drm.modeset=1} to @code{kernel-arguments} as well.")
|
||||||
;;; ‘nvidia-settings’ packages
|
;;; ‘nvidia-settings’ packages
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define (nvidia-settings-source name version)
|
(define (nvidia-settings-source name version hash)
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
|
@ -576,13 +567,14 @@ add @code{nvidia_drm.modeset=1} to @code{kernel-arguments} as well.")
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet '(delete-file-recursively "src/jansson"))
|
(snippet '(delete-file-recursively "src/jansson"))
|
||||||
(sha256 (base32 (assoc-ref %nvidia-settings-hashes version)))))
|
(sha256 (base32 hash))))
|
||||||
|
|
||||||
(define-public nvidia-settings
|
(define-public nvidia-settings
|
||||||
(package
|
(package
|
||||||
(name "nvidia-settings")
|
(name "nvidia-settings")
|
||||||
(version nvidia-version)
|
(version "550.120")
|
||||||
(source (nvidia-settings-source name version))
|
(source (nvidia-settings-source
|
||||||
|
name version "1d8rxpk2z9apkvm7vsr7j93rfizh8bgm4h6rlha3m2j818zwixvw"))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:tests? #f ;no test suite
|
(list #:tests? #f ;no test suite
|
||||||
|
@ -697,7 +689,6 @@ configuration, creating application profiles, gpu monitoring and more.")
|
||||||
;; required for grafting
|
;; required for grafting
|
||||||
(define-public nvda
|
(define-public nvda
|
||||||
(package
|
(package
|
||||||
(inherit nvidia-driver)
|
|
||||||
(name "nvda")
|
(name "nvda")
|
||||||
(version (string-pad-right
|
(version (string-pad-right
|
||||||
(package-version nvidia-driver)
|
(package-version nvidia-driver)
|
||||||
|
@ -756,7 +747,9 @@ variables @code{__GLX_VENDOR_LIBRARY_NAME=nvidia} and
|
||||||
(package-propagated-inputs mesa-for-nvda)
|
(package-propagated-inputs mesa-for-nvda)
|
||||||
(package-propagated-inputs nvidia-driver)))
|
(package-propagated-inputs nvidia-driver)))
|
||||||
(inputs (list mesa-for-nvda nvidia-driver))
|
(inputs (list mesa-for-nvda nvidia-driver))
|
||||||
(outputs '("out"))))
|
(outputs '("out"))
|
||||||
|
(license (package-license nvidia-driver))
|
||||||
|
(home-page (package-home-page nvidia-driver))))
|
||||||
|
|
||||||
(define mesa/fake
|
(define mesa/fake
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Reference in a new issue