depot/third_party/nixpkgs/pkgs/development/python-modules/paddle2onnx/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

44 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pythonOlder,
pythonAtLeast,
python,
onnx,
}:
let
pname = "paddle2onnx";
version = "1.2.0";
format = "wheel";
pyShortVersion = "cp${builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion}";
src = fetchPypi {
inherit pname version format;
dist = pyShortVersion;
python = pyShortVersion;
abi = pyShortVersion;
platform = "manylinux_2_12_x86_64.manylinux2010_x86_64";
hash = "sha256-18eStagm7V4D87fiPoigAyXxVGoo//8UENutSqNfUBI=";
};
in
buildPythonPackage {
inherit
pname
version
src
format
;
disabled = pythonOlder "3.8" || pythonAtLeast "3.11";
propagatedBuildInputs = [ onnx ];
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 ];
};
}