27 # See GNA_VERSION in cmake/dependencies.cmake
28 gna_version = "03.05.00.1906";
30 url = "https://storage.openvinotoolkit.org/dependencies/gna/gna_${gna_version}.zip";
31 hash = "sha256-SlvobZwCaw4Qr6wqV/x8mddisw49UGq7OjOA+8/icm4=";
34 tbbbind_version = "2_5";
36 url = "https://storage.openvinotoolkit.org/dependencies/thirdparty/linux/tbbbind_${tbbbind_version}_static_lin_v3.tgz";
37 hash = "sha256-053rJiwGmBteLS48WT6fyb5izk/rkd1OZI6SdTZZprM=";
41 stdenv.mkDerivation rec {
45 src = fetchFromGitHub {
46 owner = "openvinotoolkit";
48 rev = "refs/tags/${version}";
49 fetchSubmodules = true;
50 hash = "sha256-z88SgAZ0UX9X7BhBA7/NU/UhVLltb6ANKolruU8YiZQ=";
65 (python.withPackages (ps: with ps; [
76 inherit (lib) version;
81 mkdir -p temp/gna_${gna_version}
84 autoPatchelf gna_${gna_version}
85 echo "${gna.url}" > gna_${gna_version}/ie_dependency.info
88 mkdir -p temp/tbbbind_${tbbbind_version}
89 pushd temp/tbbbind_${tbbbind_version}
91 echo "${tbbbind.url}" > ie_dependency.info
95 dontUseCmakeBuildDir = true;
98 "-DCMAKE_PREFIX_PATH:PATH=${placeholder "out"}"
99 "-DCMAKE_MODULE_PATH:PATH=${placeholder "out"}/lib/cmake"
100 "-DENABLE_LTO:BOOL=ON"
102 "-DENABLE_SYSTEM_PROTOBUF:BOOL=OFF"
103 "-DProtobuf_LIBRARIES=${protobuf}/lib/libprotobuf${stdenv.hostPlatform.extensions.sharedLibrary}"
105 "-DENABLE_SYSTEM_TBB:BOOL=ON"
107 "-DENABLE_OPENCV:BOOL=ON"
108 "-DOpenCV_DIR=${opencv}/lib/cmake/opencv4/"
110 "-DENABLE_SYSTEM_PUGIXML:BOOL=ON"
112 "-DENABLE_ONEDNN_FOR_GPU:BOOL=OFF"
114 "-DENABLE_INTEL_GNA:BOOL=ON"
116 "-DENABLE_PYTHON:BOOL=ON"
118 "-DENABLE_CPPLINT:BOOL=OFF"
119 "-DBUILD_TESTING:BOOL=OFF"
120 "-DENABLE_SAMPLES:BOOL=OFF"
123 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-Wno-narrowing";
125 autoPatchelfIgnoreMissingDeps = [
126 "libngraph_backend.so"
138 enableParallelBuilding = true;
141 pushd $out/python/python${lib.versions.majorMinor python.version}
150 find $out -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do
151 addOpenGLRunpath "$lib"
156 description = "OpenVINO™ Toolkit repository";
158 This toolkit allows developers to deploy pre-trained deep learning models through a high-level C++ Inference Engine API integrated with application logic.
160 This open source version includes several components: namely Model Optimizer, nGraph and Inference Engine, as well as CPU, GPU, MYRIAD,
161 multi device and heterogeneous plugins to accelerate deep learning inferencing on Intel® CPUs and Intel® Processor Graphics.
162 It supports pre-trained models from the Open Model Zoo, along with 100+ open source and public models in popular formats such as Caffe*, TensorFlow*, MXNet* and ONNX*.
164 homepage = "https://docs.openvinotoolkit.org/";
165 license = with licenses; [ asl20 ];
166 platforms = platforms.all;
167 broken = (stdenv.isLinux && stdenv.isAarch64) # requires scons, then fails with *** Source directory cannot be under variant directory.
168 || stdenv.isDarwin; # Cannot find macos sdk
169 maintainers = with maintainers; [ tfmoraes ];