nongnu: python-py3nvml: Revise package style.

* nongnu/packages/nvidia.scm (python-py3nvml)
[arguments] <#:phases>: Use search-input-file.
[synopsis, description]: Revise.
This commit is contained in:
Hilton Chain 2026-01-12 20:45:22 +08:00
parent a22595749c
commit 9b811605fb
No known key found for this signature in database
GPG key ID: ACC66D09CA528292

View file

@ -1145,18 +1145,21 @@ functions.")
"test_grabgpus2"
"test_grabgpus3")
" and not "))
#:phases #~(modify-phases %standard-phases
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-libnvidia
(lambda _
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "py3nvml/py3nvml.py"
(("libnvidia-ml.so.1")
(string-append #$(this-package-input
"nvidia-driver")
"/lib/libnvidia-ml.so.1"))))))))
(("libnvidia-ml.so.1" file)
(search-input-file inputs (in-vicinity "lib" file)))))))))
(native-inputs (list python-numpy python-pytest python-setuptools))
(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")
(synopsis "Python bindings to NVIDIA Management Library")
(description
"This package provides unofficial Python bindings to @acronym{NVML, NVIDIA
Management Library}.
See @code{python-nvidia-ml-py} package for the official bindings provided by
NVIDIA.")
(license license-gnu:bsd-3)))