From d800feb8a3d9ba1663b99ccfb2de1d620ce23f8b Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Thu, 12 May 2022 09:45:35 +0200 Subject: [PATCH] gnu: Add nvidia-gpu-linux-module. * gnu/packages/linux.scm (nvidia-gpu-linux-module): New variable. diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 9bb2314ebd..ebeb59dcea 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1345,6 +1345,56 @@ (define-public librem-ec-acpi-linux-module and the notification, WiFi, and Bluetooth LED.") (license license:gpl2))) +(define-public nvidia-gpu-linux-module + (package + (name "nvidia-gpu-linux-module") + (version "515.43.04") + (home-page "https://github.com/NVIDIA/open-gpu-kernel-modules") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1byk8rah79h0diwvdx4nggc71f7y6fhjadjavpc3kqlrspjjpc6m")))) + (build-system linux-module-build-system) + (arguments + (list #:tests? + #f ;no tests + #:make-flags + #~(list (string-append "CC=" + #$(cc-for-target))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-modules-prefix + (lambda* _ + (substitute* "kernel-open/Makefile" + (("\\$\\(shell uname -r\\)") #$(package-version + linux-libre)) + (("/lib/modules/") (string-append #$output + "/lib/modules/"))))) + (replace 'build + (lambda* (#:key (make-flags '()) + (parallel-build? #t) #:allow-other-keys) + (mkdir-p "build") + (mkdir-p (string-append #$output "/lib/modules/" + #$(package-version linux-libre) + "/build")) + (apply invoke "make" + (string-append "-C" + (getenv "PWD") "/source") + `(,@(if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) ,@make-flags))))))) + (native-inputs (list inetutils)) ;hostname + (synopsis "Linux kernel module for NVIDIA GPU") + (description + "This package provides Linux kernel module for NVIDIA GPUs based on Turing +and newer models.") + (license (list license:gpl2+ license:expat)))) + (define-public rtl8821ce-linux-module (let ((commit "dce62b9bbb7c76339b514153fcebb3a19bafdcc7") (revision "5")) -- 2.34.0