diff options
Diffstat (limited to 'pkgs/development/python-modules/onnxconverter-common/default.nix')
-rw-r--r-- | pkgs/development/python-modules/onnxconverter-common/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/onnxconverter-common/default.nix b/pkgs/development/python-modules/onnxconverter-common/default.nix new file mode 100644 index 00000000000..89fefb38dee --- /dev/null +++ b/pkgs/development/python-modules/onnxconverter-common/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, packaging +, protobuf +, onnx +, unittestCheckHook +, onnxruntime +}: + +buildPythonPackage { + pname = "onnxconverter-common"; + version = "1.12.2"; # Upstream no longer seems to push tags + + format = "setuptools"; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "onnxconverter-common"; + rev = "814cdf494d987900d30b16971c0e8334aaca9ae6"; + hash = "sha256-XA/kl8aT1wLthl1bMihtv/1ELOW1sGO/It5XfJtD+sY="; + }; + + propagatedBuildInputs = [ + numpy + packaging # undeclared dependency + protobuf + onnx + ]; + + checkInputs = [ + onnxruntime + unittestCheckHook + ]; + + unittestFlagsArray = [ "-s" "tests" ]; + + # Failing tests + # https://github.com/microsoft/onnxconverter-common/issues/242 + doCheck = false; + + meta = { + description = "ONNX Converter and Optimization Tools"; + maintainers = with lib.maintainers; [ fridh ]; + license = with lib.licenses; [ mit ]; + }; +} |