2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchPypi,
|
|
|
|
buildPythonPackage,
|
|
|
|
substituteAll,
|
|
|
|
addOpenGLRunpath,
|
2022-10-21 18:38:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nvidia-ml-py";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "12.550.52";
|
2022-10-21 18:38:19 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
extension = "tar.gz";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-3+3XFDNccuZaMshun12xzUlSbUTW2McoCdmWlY9zTAc=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2024-04-21 15:54:59 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./0001-locate-libnvidia-ml.so.1-on-NixOS.patch;
|
|
|
|
inherit (addOpenGLRunpath) driverLink;
|
|
|
|
})
|
2022-10-21 18:38:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pynvml" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Python Bindings for the NVIDIA Management Library";
|
|
|
|
homepage = "https://pypi.org/project/nvidia-ml-py";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with lib.maintainers; [ GaetanLepage ];
|
|
|
|
};
|
|
|
|
}
|