about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/onnxruntime/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/onnxruntime/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/onnxruntime/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/libraries/onnxruntime/default.nix b/nixpkgs/pkgs/development/libraries/onnxruntime/default.nix
index 4a9ee61f5614..7a8b8570f62c 100644
--- a/nixpkgs/pkgs/development/libraries/onnxruntime/default.nix
+++ b/nixpkgs/pkgs/development/libraries/onnxruntime/default.nix
@@ -17,7 +17,7 @@
 , microsoft-gsl
 , iconv
 , gtest
-, protobuf3_21
+, protobuf_21
 , pythonSupport ? true
 }:
 
@@ -92,7 +92,7 @@ stdenv.mkDerivation rec {
     cmake
     pkg-config
     python3Packages.python
-    protobuf3_21
+    protobuf_21
   ] ++ lib.optionals pythonSupport (with python3Packages; [
     setuptools
     wheel
@@ -154,6 +154,13 @@ stdenv.mkDerivation rec {
     "-Donnxruntime_ENABLE_PYTHON=ON"
   ];
 
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = toString [
+      "-Wno-error=deprecated-declarations"
+      "-Wno-error=unused-but-set-variable"
+    ];
+  };
+
   doCheck = true;
 
   postPatch = ''
@@ -177,7 +184,7 @@ stdenv.mkDerivation rec {
   '';
 
   passthru = {
-    protobuf = protobuf3_21;
+    protobuf = protobuf_21;
     tests = lib.optionalAttrs pythonSupport {
       python = python3Packages.onnxruntime;
     };