summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHilton Chain <hako@ultrarare.space>2022-10-01 11:24:11 +0800
committerJonathan Brielmaier <jonathan.brielmaier@web.de>2022-12-18 14:39:58 +0100
commit618c7e26eb8b497fe0642094c012511b4ab9e80a (patch)
tree637fc3e81647fb7d1759c29e2803d71e83684c0d
parent8a4fef778ce1cff63f9907c3f6fccf8024bf2a13 (diff)
nongnu: nvidia-module-open: Use nvidia-module as base.
* nongnu/packages/nvidia.scm (nvidia-module-open): Use nvidia-module as base. Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
-rw-r--r--nongnu/packages/nvidia.scm60
1 files changed, 18 insertions, 42 deletions
diff --git a/nongnu/packages/nvidia.scm b/nongnu/packages/nvidia.scm
index d57ffc8..af9bee0 100644
--- a/nongnu/packages/nvidia.scm
+++ b/nongnu/packages/nvidia.scm
@@ -416,48 +416,24 @@ simultaneous NVML calls from multiple threads.")
(format #f "file:///share/doc/nvidia-driver-~a/LICENSE" version)))))
(define-public nvidia-module-open
- (package
- (name "nvidia-module-open")
- (version nversion)
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/NVIDIA/open-gpu-kernel-modules")
- (commit nversion)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1mkibm0i943ljcy921i63jzc0db6r4pm1ycmwbka9kddcviyb3gk"))))
- (build-system linux-module-build-system)
- (arguments
- (list #:linux linux
- #:source-directory "kernel-open"
- #:tests? #f
- #:make-flags
- #~(list (string-append "CC=" #$(cc-for-target))
- (string-append "SYSSRC=" (assoc-ref %build-inputs
- "linux-module-builder")
- "/lib/modules/build"))
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'fixpath
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* "kernel-open/Kbuild"
- (("/bin/sh") (string-append #$bash-minimal "/bin/sh")))))
- (replace 'build
- (lambda* (#:key make-flags outputs #:allow-other-keys)
- (apply invoke
- `("make" "-j"
- ,@make-flags "modules")))))))
- (inputs (list bash-minimal))
- (home-page "https://github.com/NVIDIA/open-gpu-kernel-modules")
- (synopsis "Nvidia kernel module")
- (description
- "This package provides Nvidia open-gpu-kernel-modules. However,
-they are only for the latest GPU architectures Turing and Ampere. Also they
-still require firmware file @code{gsp.bin} to be loaded as well as closed
-source userspace tools from the corresponding driver release.")
- (license license-gnu:gpl2)))
+ (let ((base nvidia-module))
+ (package/inherit base
+ (name "nvidia-module-open")
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ;; NOTE: Kernels compiled with CONFIG_LTO_CLANG_THIN would cause an
+ ;; error here. See also:
+ ;; <https://github.com/NVIDIA/open-gpu-kernel-modules/issues/214>
+ ;; <https://github.com/llvm/llvm-project/issues/55820>
+ ((#:source-directory _) "kernel-open")))
+ (home-page "https://github.com/NVIDIA/open-gpu-kernel-modules")
+ (synopsis "NVIDIA kernel module")
+ (description
+ "This package provides NVIDIA open-gpu-kernel-modules. However, they
+are only for the latest GPU architectures Turing and Ampere. Also they still
+require firmware file @code{gsp.bin} to be loaded as well as closed source
+userspace tools from the corresponding driver release.")
+ (license license-gnu:gpl2))))
(define-public nvidia-settings
(package