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