mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2024-11-25 09:58:09 +01:00
nongnu: Add nvidia-exec.
* nongnu/packages/nvidia.scm (nvidia-exec): New variable. Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
This commit is contained in:
parent
caea0868d3
commit
d738f3c7fd
1 changed files with 45 additions and 0 deletions
|
@ -45,10 +45,12 @@
|
|||
#:use-module (gnu packages gtk)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages m4)
|
||||
#:use-module (gnu packages lsof)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages video)
|
||||
#:use-module (gnu packages web)
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (nongnu packages linux)
|
||||
#:use-module (ice-9 match)
|
||||
|
@ -284,6 +286,49 @@ Further xorg should be configured by adding:
|
|||
(drivers '(\"nvidia\"))} to @code{xorg-configuration}.")
|
||||
(license (license:nonfree (format #f "file:///share/doc/nvidia-driver-~a/LICENSE" version)))))
|
||||
|
||||
(define-public nvidia-exec
|
||||
(package
|
||||
(name "nvidia-exec")
|
||||
(version "0.1.0")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/pedro00dk/nvidia-exec")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"079alqgz3drv5mvx059fzhj3f20rnljl7r4yihfd5qq7djgmvv0v"))))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
(list #:install-plan #~`(("nvx" "bin/"))
|
||||
#:modules #~((guix build copy-build-system)
|
||||
(guix build utils)
|
||||
(srfi srfi-1))
|
||||
#:phases #~(modify-phases %standard-phases
|
||||
(add-after 'install 'wrap-nvx
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(wrap-program (string-append #$output "/bin/nvx")
|
||||
`("PATH" ":" prefix
|
||||
,(fold (lambda (input paths)
|
||||
(let* ((in (assoc-ref
|
||||
inputs input))
|
||||
(bin (string-append
|
||||
in "/bin")))
|
||||
(append (filter
|
||||
file-exists?
|
||||
(list bin))
|
||||
paths)))
|
||||
'()
|
||||
'("jq" "lshw" "lsof")))))))))
|
||||
(inputs (list bash-minimal jq lshw lsof))
|
||||
(home-page "https://github.com/pedro00dk/nvidia-exec")
|
||||
(synopsis "GPU switching without login out for Nvidia Optimus laptops")
|
||||
(description
|
||||
"This package provides GPU switching without login out for Nvidia Optimus
|
||||
laptops.")
|
||||
(license license-gnu:gpl3+)))
|
||||
|
||||
(define-public nvidia-libs
|
||||
(package
|
||||
(name "nvidia-libs")
|
||||
|
|
Loading…
Reference in a new issue