Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, numpy
5, packaging
6, protobuf
7, onnx
8, unittestCheckHook
9, onnxruntime
10}:
11
12buildPythonPackage {
13 pname = "onnxconverter-common";
14 version = "1.12.2"; # Upstream no longer seems to push tags
15
16 format = "setuptools";
17
18 src = fetchFromGitHub {
19 owner = "microsoft";
20 repo = "onnxconverter-common";
21 rev = "814cdf494d987900d30b16971c0e8334aaca9ae6";
22 hash = "sha256-XA/kl8aT1wLthl1bMihtv/1ELOW1sGO/It5XfJtD+sY=";
23 };
24
25 propagatedBuildInputs = [
26 numpy
27 packaging # undeclared dependency
28 protobuf
29 onnx
30 ];
31
32 checkInputs = [
33 onnxruntime
34 unittestCheckHook
35 ];
36
37 unittestFlagsArray = [ "-s" "tests" ];
38
39 # Failing tests
40 # https://github.com/microsoft/onnxconverter-common/issues/242
41 doCheck = false;
42
43 meta = {
44 description = "ONNX Converter and Optimization Tools";
45 maintainers = with lib.maintainers; [ fridh ];
46 license = with lib.licenses; [ mit ];
47 };
48}