depot/third_party/nixpkgs/pkgs/development/python-modules/pynvml/default.nix
Default email 5557ff764c Project import generated by Copybara.
GitOrigin-RevId: 988cc958c57ce4350ec248d2d53087777f9e1949
2023-02-22 11:55:15 +01:00

38 lines
832 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, substituteAll
, pythonOlder
, cudatoolkit
, addOpenGLRunpath
}:
buildPythonPackage rec {
pname = "pynvml";
version = "11.5.0";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-0CeyG5WxCIufwngRf59ht8Z/jjOnh+n4P3NfD3GsMtA=";
};
patches = [
(substituteAll {
src = ./0001-locate-libnvidia-ml.so.1-on-NixOS.patch;
inherit (addOpenGLRunpath) driverLink;
})
];
propagatedBuildInputs = [ cudatoolkit ];
doCheck = false; # no tests in PyPi dist
pythonImportsCheck = [ "pynvml" "pynvml.smi" ];
meta = with lib; {
description = "Python bindings for the NVIDIA Management Library";
homepage = "https://www.nvidia.com";
license = licenses.bsd3;
maintainers = [ maintainers.bcdarwin ];
};
}