diff options
author | Hilton Chain <hako@ultrarare.space> | 2022-10-21 12:50:49 +0800 |
---|---|---|
committer | Jonathan Brielmaier <jonathan.brielmaier@web.de> | 2022-12-18 14:12:42 +0100 |
commit | fb5a3d0e976fe7d5f6dc8ebdc6e3d118c63bb23b (patch) | |
tree | 1a1db6ba13d049fbb63fc55473f4ece9d193fefb | |
parent | 6874c66ddc5be64ea546b36389daeaa0f89e15bd (diff) |
nongnu: nvda: Avoid hardcoding inputs.
* nongnu/packages/nvidia.scm (nvda)[arguments]: Avoid hardcoding inputs and
locate them via relative paths instead.
[description]: Adjust style.
Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
-rw-r--r-- | nongnu/packages/nvidia.scm | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/nongnu/packages/nvidia.scm b/nongnu/packages/nvidia.scm index 734284a..f7b41fd 100644 --- a/nongnu/packages/nvidia.scm +++ b/nongnu/packages/nvidia.scm @@ -630,24 +630,27 @@ configuration, creating application profiles, gpu monitoring and more.") (build-system trivial-build-system) (arguments (list #:modules '((guix build union)) - #:builder #~(begin - (use-modules (guix build union) - (srfi srfi-1) - (ice-9 regex)) - (union-build (assoc-ref %outputs "out") - (list #$mesa #$nvidia-libs) - #:resolve-collision (lambda (files) (let ((file - (if (string-match "nvidia-libs" (first files)) - (first files) - (last files)))) - (format #t "chosen ~a ~%" file) - file)))))) - (description "These are the libraries of the evil Nvidia driver, -packaged in such a way that you can use the transformation option -@code{--with-graft=mesa=nvda} to use the nvidia driver with a package that requires mesa.") - (inputs - (list mesa - nvidia-libs)) + #:builder + #~(begin + (use-modules (guix build union) + (srfi srfi-1) + (ice-9 regex)) + (union-build #$output + (list #$(this-package-input "mesa") + #$(this-package-input "nvidia-libs")) + #:resolve-collision + (lambda (files) + (let ((file (if (string-match "nvidia-libs" + (first files)) + (first files) + (last files)))) + (format #t "chosen ~a ~%" file) + file)))))) + (description + "These are the libraries of the evil NVIDIA driver, packaged in such a +way that you can use the transformation option @code{--with-graft=mesa=nvda} +to use the NVIDIA driver with a package that requires mesa.") + (inputs (list mesa nvidia-libs)) (outputs '("out")))) (define mesa/fake |