Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python310Packages.onnx: switch to protobuf 4.x #255077

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pkgs/development/python-modules/onnx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
, pythonOlder
, tabulate
, typing-extensions
, abseil-cpp
}:

let
Expand All @@ -36,6 +37,10 @@ in buildPythonPackage rec {
pybind11
];

buildInputs = [
abseil-cpp
];

propagatedBuildInputs = [
protobuf
numpy
Expand All @@ -61,6 +66,10 @@ in buildPythonPackage rec {
--replace 'include(googletest)' ""
substituteInPlace cmake/unittest.cmake \
--replace 'googletest)' ')'

# remove this override in 1.15 that will enable to set the CMAKE_CXX_STANDARD with cmakeFlags
substituteInPlace CMakeLists.txt \
happysalada marked this conversation as resolved.
Show resolved Hide resolved
--replace 'CMAKE_CXX_STANDARD 11' 'CMAKE_CXX_STANDARD 17'
'';

preConfigure = ''
Expand Down
7 changes: 6 additions & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7510,7 +7510,12 @@ self: super: with self; {
onlykey-solo-python = callPackage ../development/python-modules/onlykey-solo-python { };

onnx = callPackage ../development/python-modules/onnx {
protobuf = protobuf3;
# in linux c++ defaults to 17
# on darwin clang is on an old version so c++ defaults to 11
abseil-cpp = if stdenv.isLinux then
pkgs.abseil-cpp_202301
else
pkgs.abseil-cpp_202301.override { cxxStandard = "17"; };
};

onnxconverter-common = callPackage ../development/python-modules/onnxconverter-common {
Expand Down