From a2a6075ea331d328aef8fc05ae78bf11d0ce1c4e Mon Sep 17 00:00:00 2001 From: happysalada Date: Tue, 19 Sep 2023 09:32:35 -0400 Subject: [PATCH] python311Packages.onnx: use c++14 on darwin --- pkgs/development/python-modules/onnx/default.nix | 12 ++++++++---- pkgs/top-level/python-packages.nix | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/onnx/default.nix b/pkgs/development/python-modules/onnx/default.nix index 4d4b587314d..df15ebe77e4 100644 --- a/pkgs/development/python-modules/onnx/default.nix +++ b/pkgs/development/python-modules/onnx/default.nix @@ -66,10 +66,14 @@ 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 \ - --replace 'CMAKE_CXX_STANDARD 11' 'CMAKE_CXX_STANDARD 17' + '' + 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 = '' diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ffefaf6b783..fabb3cbfddc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7543,7 +7543,7 @@ self: super: with self; { abseil-cpp = if stdenv.isLinux then pkgs.abseil-cpp_202301 else - pkgs.abseil-cpp_202301.override { cxxStandard = "17"; }; + pkgs.abseil-cpp_202301.override { cxxStandard = "14"; }; }; onnxconverter-common = callPackage ../development/python-modules/onnxconverter-common {