1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 6 # dependencies 7 coloredlogs, 8 numpy, 9 onnx, 10 packaging, 11 psutil, 12 py-cpuinfo, 13 py3nvml, 14 sympy, 15}: 16 17buildPythonPackage rec { 18 pname = "onnxruntime-tools"; 19 version = "1.7.0"; 20 format = "wheel"; 21 22 # the build distribution doesn't work at all, it seems to expect the same structure 23 # as the github source repo. 24 # The github source wasn't immediately obvious how to build for this subpackage. 25 src = fetchPypi { 26 pname = "onnxruntime_tools"; 27 inherit version; 28 format = "wheel"; 29 dist = "py3"; 30 python = "py3"; 31 hash = "sha256-Hf+Ii1xIKsW8Yn8S4QhEX+/LPWAMQ/Y2M5dTFv5hetg="; 32 }; 33 34 dependencies = [ 35 coloredlogs 36 numpy 37 onnx 38 packaging 39 psutil 40 py-cpuinfo 41 py3nvml 42 sympy 43 ]; 44 45 pythonImportsCheck = [ "onnxruntime_tools" ]; 46 47 # no tests 48 doCheck = false; 49 50 meta = { 51 description = "Transformers Model Optimization Tool of ONNXRuntime"; 52 homepage = "https://pypi.org/project/onnxruntime-tools/"; 53 license = with lib.licenses; [ mit ]; 54 maintainers = with lib.maintainers; [ happysalada ]; 55 }; 56}