2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
numpy,
|
|
|
|
packaging,
|
|
|
|
protobuf,
|
|
|
|
onnx,
|
|
|
|
unittestCheckHook,
|
|
|
|
onnxruntime,
|
2022-09-30 11:47:45 +00:00
|
|
|
}:
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
buildPythonPackage rec {
|
2022-09-30 11:47:45 +00:00
|
|
|
pname = "onnxconverter-common";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "1.14.0";
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "microsoft";
|
|
|
|
repo = "onnxconverter-common";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-NbHyjLcr/Gq1zRiJW3ZBpEVQGVQGhp7SmfVd5hBIi2o=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
2023-03-15 16:39:30 +00:00
|
|
|
packaging
|
2022-09-30 11:47:45 +00:00
|
|
|
protobuf
|
|
|
|
onnx
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "onnxconverter_common" ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
onnxruntime
|
|
|
|
unittestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
unittestFlagsArray = [
|
|
|
|
"-s"
|
|
|
|
"tests"
|
|
|
|
];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
# Failing tests
|
|
|
|
# https://github.com/microsoft/onnxconverter-common/issues/242
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "ONNX Converter and Optimization Tools";
|
2023-03-15 16:39:30 +00:00
|
|
|
homepage = "https://github.com/microsoft/onnxconverter-common";
|
|
|
|
changelog = "https://github.com/microsoft/onnxconverter-common/releases/tag/v${version}";
|
2022-09-30 11:47:45 +00:00
|
|
|
license = with lib.licenses; [ mit ];
|
|
|
|
};
|
|
|
|
}
|