Skip to content

Commit

Permalink
python3Packages.onnxconverter-common: init at 1.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
FRidh committed Sep 28, 2022
1 parent d2356bf commit 18f7d4c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
48 changes: 48 additions & 0 deletions pkgs/development/python-modules/onnxconverter-common/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6388,6 +6388,8 @@ in {

onnx = callPackage ../development/python-modules/onnx { };

onnxconverter-common = callPackage ../development/python-modules/onnxconverter-common { };

onnxruntime = (toPythonModule (pkgs.onnxruntime.override {
python3Packages = self;
pythonSupport = true;
Expand Down

0 comments on commit 18f7d4c

Please sign in to comment.