Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchPypi, 4 buildPythonPackage, 5 substituteAll, 6 addDriverRunpath, 7}: 8 9buildPythonPackage rec { 10 pname = "nvidia-ml-py"; 11 version = "12.555.43"; 12 format = "setuptools"; 13 14 src = fetchPypi { 15 inherit pname version; 16 extension = "tar.gz"; 17 hash = "sha256-6efxLvHsI0uw3CLSvcdi/6+rOUvcRyoHpDd8lbv5Ov4="; 18 }; 19 20 patches = [ 21 (substituteAll { 22 src = ./0001-locate-libnvidia-ml.so.1-on-NixOS.patch; 23 inherit (addDriverRunpath) driverLink; 24 }) 25 ]; 26 27 # no tests 28 doCheck = false; 29 30 pythonImportsCheck = [ "pynvml" ]; 31 32 meta = { 33 description = "Python Bindings for the NVIDIA Management Library"; 34 homepage = "https://pypi.org/project/nvidia-ml-py"; 35 license = lib.licenses.bsd3; 36 platforms = [ "x86_64-linux" ]; 37 maintainers = with lib.maintainers; [ GaetanLepage ]; 38 }; 39}