nongnu: nvda: Use gexp.

* nongnu/packages/nvidia.scm (nvda): Use gexp.

Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
This commit is contained in:
Petr Hodina 2022-06-08 05:58:41 +02:00 committed by Jonathan Brielmaier
parent 96292fee38
commit 32c687865d
No known key found for this signature in database
GPG key ID: ECFC83988B4E4B9F

View file

@ -512,26 +512,25 @@ configuration, creating application profiles, gpu monitoring and more.")
(source #f)
(build-system trivial-build-system)
(arguments
'(#:modules ((guix build union))
#:builder (begin
(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 (assoc-ref %build-inputs "mesa") (assoc-ref %build-inputs "nvidia-libs"))
(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)))
#t)))
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
`(("nvidia-libs" ,nvidia-libs)
("mesa" ,mesa)))
(list mesa
nvidia-libs))
(outputs '("out"))))
(define mesa/fake