python311Packages.onnx: fix build on darwin

This commit is contained in:
Weijia Wang
2023-11-05 16:20:00 +01:00
parent b746e1269b
commit d8fe893a0b
2 changed files with 2 additions and 11 deletions
@@ -66,14 +66,10 @@ in buildPythonPackage rec {
--replace 'include(googletest)' ""
substituteInPlace cmake/unittest.cmake \
--replace 'googletest)' ')'
'' + lib.optionalString stdenv.isLinux ''
'' + ''
# remove this override in 1.15 that will enable to set the CMAKE_CXX_STANDARD with cmakeFlags
substituteInPlace CMakeLists.txt \
--replace 'CMAKE_CXX_STANDARD 11' 'CMAKE_CXX_STANDARD 17'
'' + lib.optionalString stdenv.isDarwin ''
# remove this override in 1.15 that will enable to set the CMAKE_CXX_STANDARD with cmakeFlags
substituteInPlace CMakeLists.txt \
--replace 'CMAKE_CXX_STANDARD 11' 'CMAKE_CXX_STANDARD 14'
'';
preConfigure = ''
+1 -6
View File
@@ -8384,12 +8384,7 @@ self: super: with self; {
onlykey-solo-python = callPackage ../development/python-modules/onlykey-solo-python { };
onnx = callPackage ../development/python-modules/onnx {
# 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 = "14"; };
abseil-cpp = pkgs.abseil-cpp_202301;
};
onnxconverter-common = callPackage ../development/python-modules/onnxconverter-common {