nongnu: Add python-py3nvml.

* nongnu/packages/nvidia.scm (python-py3nvml): New variable.

Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
This commit is contained in:
Petr Hodina 2022-08-28 16:08:34 +02:00 committed by Jonathan Brielmaier
parent 432b14520f
commit 5bdf006aba
No known key found for this signature in database
GPG key ID: ECFC83988B4E4B9F

View file

@ -45,6 +45,7 @@
#:use-module (gnu packages video)
#:use-module (gnu packages web)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (nongnu packages linux)
#:use-module (ice-9 match)
@ -178,6 +179,33 @@ Management Library")
nvidia-smi.")
(license license-gnu:bsd-3)))
(define-public python-py3nvml
(package
(name "python-py3nvml")
(version "0.2.7")
(source (origin
(method url-fetch)
(uri (pypi-uri "py3nvml" version))
(sha256
(base32
"0wxxky9amy38q7qjsdmmznk1kqdzwd680ps64i76cvlab421vvh9"))))
(build-system python-build-system)
(arguments
(list #:phases #~(modify-phases %standard-phases
(add-after 'unpack 'fix-libnvidia
(lambda _
(substitute* "py3nvml/py3nvml.py"
(("libnvidia-ml.so.1")
(string-append #$(this-package-input
"nvidia-driver")
"/lib/libnvidia-ml.so.1"))))))))
(propagated-inputs (list nvidia-driver python-xmltodict))
(home-page "https://github.com/fbcotter/py3nvml")
(synopsis "Unoffcial Python 3 Bindings for the NVIDIA Management Library")
(description "This package provides unofficial Python 3 Bindings for the
NVIDIA Management Library")
(license license-gnu:bsd-3)))
(define-public nvidia-driver
(package
(name "nvidia-driver")