5c370c0b2a
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
38 lines
821 B
Nix
38 lines
821 B
Nix
{ lib
|
|
, fetchPypi
|
|
, buildPythonPackage
|
|
, substituteAll
|
|
, addOpenGLRunpath
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "nvidia-ml-py";
|
|
version = "12.550.52";
|
|
format = "setuptools";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
extension = "tar.gz";
|
|
hash = "sha256-3+3XFDNccuZaMshun12xzUlSbUTW2McoCdmWlY9zTAc=";
|
|
};
|
|
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./0001-locate-libnvidia-ml.so.1-on-NixOS.patch;
|
|
inherit (addOpenGLRunpath) driverLink;
|
|
})
|
|
];
|
|
|
|
# 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 ];
|
|
};
|
|
}
|