2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
pythonAtLeast,
|
|
|
|
python,
|
|
|
|
onnx,
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "paddle2onnx";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.2.4";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "wheel";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyShortVersion = "cp${builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion}";
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version format;
|
|
|
|
dist = pyShortVersion;
|
|
|
|
python = pyShortVersion;
|
|
|
|
abi = pyShortVersion;
|
|
|
|
platform = "manylinux_2_12_x86_64.manylinux2010_x86_64";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-2muP4Y1zvqYVxvN6I9wjdMY+YE2d0nRmIwFFI/BsIKE=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
buildPythonPackage {
|
2024-06-05 15:53:02 +00:00
|
|
|
inherit
|
|
|
|
pname
|
|
|
|
version
|
|
|
|
src
|
|
|
|
format
|
|
|
|
;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabled = pythonOlder "3.8" || pythonAtLeast "3.11";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ onnx ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "ONNX Model Exporter for PaddlePaddle";
|
|
|
|
homepage = "https://github.com/PaddlePaddle/Paddle2ONNX";
|
|
|
|
changelog = "https://github.com/PaddlePaddle/Paddle2ONNX/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ happysalada ];
|
|
|
|
};
|
|
|
|
}
|