about summary refs log tree commit diff
path: root/pkgs/development/libraries/openvino
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/openvino')
-rw-r--r--pkgs/development/libraries/openvino/default.nix26
1 files changed, 16 insertions, 10 deletions
diff --git a/pkgs/development/libraries/openvino/default.nix b/pkgs/development/libraries/openvino/default.nix
index a4ce0fe60c1e7..14ad6c166e551 100644
--- a/pkgs/development/libraries/openvino/default.nix
+++ b/pkgs/development/libraries/openvino/default.nix
@@ -5,6 +5,7 @@
 , cudaSupport ? opencv.cudaSupport or false
 
 # build
+, scons
 , addOpenGLRunpath
 , autoPatchelfHook
 , cmake
@@ -17,6 +18,7 @@
 
 # runtime
 , flatbuffers
+, level-zero
 , libusb1
 , libxml2
 , ocl-icd
@@ -24,7 +26,7 @@
 , protobuf
 , pugixml
 , snappy
-, tbb
+, tbb_2021_5
 , cudaPackages
 }:
 
@@ -35,6 +37,9 @@ let
 
   stdenv = gcc12Stdenv;
 
+  # prevent scons from leaking in the default python version
+  scons' = scons.override { python3 = python3Packages.python; };
+
   tbbbind_version = "2_5";
   tbbbind = fetchurl {
     url = "https://storage.openvinotoolkit.org/dependencies/thirdparty/linux/tbbbind_${tbbbind_version}_static_lin_v4.tgz";
@@ -53,14 +58,14 @@ in
 
 stdenv.mkDerivation rec {
   pname = "openvino";
-  version = "2024.0.0";
+  version = "2024.2.0";
 
   src = fetchFromGitHub {
     owner = "openvinotoolkit";
     repo = "openvino";
     rev = "refs/tags/${version}";
     fetchSubmodules = true;
-    hash = "sha256-Xsrmc1EynkjgPgiQ+ESyVJRJT9Afqyob0/uH+Is4TYA=";
+    hash = "sha256-HiKKvmqgbwW625An+Su0EOHqVrP18yvG2aOzrS0jWr4=";
   };
 
   outputs = [
@@ -77,6 +82,7 @@ stdenv.mkDerivation rec {
     patchelf
     pkg-config
     python
+    scons'
     shellcheck
   ] ++ lib.optionals cudaSupport [
     cudaPackages.cuda_nvcc
@@ -90,7 +96,9 @@ stdenv.mkDerivation rec {
     popd
   '';
 
-  dontUseCmakeBuildDir = true;
+  dontUseSconsCheck = true;
+  dontUseSconsBuild = true;
+  dontUseSconsInstall = true;
 
   cmakeFlags = [
     "-Wno-dev"
@@ -108,7 +116,7 @@ stdenv.mkDerivation rec {
     (cmakeBool "ENABLE_SAMPLES" false)
 
     # features
-    (cmakeBool "ENABLE_INTEL_CPU" true)
+    (cmakeBool "ENABLE_INTEL_CPU" stdenv.isx86_64)
     (cmakeBool "ENABLE_JS" false)
     (cmakeBool "ENABLE_LTO" true)
     (cmakeBool "ENABLE_ONEDNN_FOR_GPU" false)
@@ -124,21 +132,20 @@ stdenv.mkDerivation rec {
     (cmakeBool "ENABLE_SYSTEM_TBB" true)
   ];
 
-  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-Wno-narrowing";
-
   autoPatchelfIgnoreMissingDeps = [
     "libngraph_backend.so"
   ];
 
   buildInputs = [
     flatbuffers
+    level-zero
     libusb1
     libxml2
     ocl-icd
     opencv.cxxdev
     pugixml
     snappy
-    tbb
+    tbb_2021_5
   ] ++ lib.optionals cudaSupport [
     cudaPackages.cuda_cudart
   ];
@@ -170,8 +177,7 @@ stdenv.mkDerivation rec {
     homepage = "https://docs.openvinotoolkit.org/";
     license = with licenses; [ asl20 ];
     platforms = platforms.all;
-    broken = (stdenv.isLinux && stdenv.isAarch64) # requires scons, then fails with *** Source directory cannot be under variant directory.
-      || stdenv.isDarwin; # Cannot find macos sdk
+    broken = stdenv.isDarwin; # Cannot find macos sdk
     maintainers = with maintainers; [ tfmoraes ];
   };
 }