Change:
{ lib <del> , addOpenGLRunpath , autoPatchelfHook </del> , stdenv , fetchFromGitHub , fetchpatch <ins> , fetchurl , substituteAll # build , addOpenGLRunpath , autoPatchelfHook </ins> , cmake , git <ins> , libarchive , pkg-config , python , shellcheck # runtime , libusb1 , libxml2 , opencv </ins> , protobuf <ins> , pugixml </ins> , tbb <del> , opencv , unzip , shellcheck , srcOnly , python , enablePython ? false </del> }: let <ins> # See FIRMWARE_PACKAGE_VERSION in src/plugins/intel_myriad/myriad_dependencies.cmake myriad_firmware_version = "20221129_35"; myriad_usb_firmware = fetchurl { url = "https://storage.openvinotoolkit.org/dependencies/myriad/firmware_usb-ma2x8x_${myriad_firmware_version}.zip"; hash = "sha256-HKNWbSlMjSafOgrS9WmenbsmeaJKRVssw0NhIwPYZ70="; }; myriad_pcie_firmware = fetchurl { url = "https://storage.openvinotoolkit.org/dependencies/myriad/firmware_pcie-ma2x8x_${myriad_firmware_version}.zip"; hash = "sha256-VmfrAoKQ++ySIgAxWQul+Hd0p7Y4sTF44Nz4RHpO6Mo="; }; </ins> <del> onnx_src = srcOnly { name = "onnx-patched"; src = fetchFromGitHub { owner = "onnx"; repo = "onnx"; rev = "v1.8.1"; sha256 = "+1zNnZ4lAyVYRptfk0PV7koIX9FqcfD1Ah33qj/G2rA="; }; patches = [ # Fix build with protobuf 3.18+ # Remove with onnx 1.9 release (fetchpatch { url = "https://github.com/onnx/onnx/commit/d3bc82770474761571f950347560d62a35d519d7.patch"; sha256 = "0vdsrklkzhdjaj8wdsl4icn93q3961g8dx35zvff0nhpr08wjb7y"; }) ]; </del> <ins> # See GNA_VERSION in cmake/dependencies.cmake gna_version = "03.00.00.1910"; gna = fetchurl { url = "https://storage.openvinotoolkit.org/dependencies/gna/gna_${gna_version}.zip"; hash = "sha256-iU3bwK40WfBFE7hTsMq8MokN1Oo3IooCK2oyEBvbt/g="; </ins> }; <ins> tbbbind_version = "2_5"; tbbbind = fetchurl { url = "https://download.01.org/opencv/master/openvinotoolkit/thirdparty/linux/tbbbind_${tbbbind_version}_static_lin_v2.tgz"; hash = "sha256-hl54lMWEAiM8rw0bKIBW4OarK/fJ0AydxgVhxIS8kPQ="; }; </ins> in stdenv.mkDerivation rec { pname = "openvino"; <del> version = "2021.2"; </del> <ins> version = "2022.3.0"; </ins> src = fetchFromGitHub { owner = "openvinotoolkit"; repo = "openvino"; <del> rev = version; sha256 = "pv4WTfY1U5GbA9Yj07UOLQifvVH3oDfWptxxYW5IwVQ="; </del> <ins> rev = "refs/tags/${version}"; </ins> fetchSubmodules = true; <ins> hash = "sha256-Ie58zTNatiYZZQJ8kJh/+HlSetQjhAtf2Us83z1jGv4="; </ins> }; <ins> outputs = [ "out" "python" ]; nativeBuildInputs = [ addOpenGLRunpath autoPatchelfHook cmake git libarchive pkg-config (python.withPackages (ps: with ps; [ cython pybind11 setuptools ])) shellcheck ]; patches = [ (substituteAll { src = ./cmake.patch; inherit (lib) version; }) ]; postPatch = '' mkdir -p temp/vpu/firmware/{pcie,usb}-ma2x8x pushd temp/vpu/firmware bsdtar -xf ${myriad_pcie_firmware} -C pcie-ma2x8x echo "${myriad_pcie_firmware.url}" > pcie-ma2x8x/ie_dependency.info bsdtar -xf ${myriad_usb_firmware} -C usb-ma2x8x echo "${myriad_usb_firmware.url}" > usb-ma2x8x/ie_dependency.info popd mkdir -p temp/gna_${gna_version} pushd temp/ bsdtar -xf ${gna} autoPatchelf gna_${gna_version} echo "${gna.url}" > gna_${gna_version}/ie_dependency.info popd mkdir -p temp/tbbbind_${tbbbind_version} pushd temp/tbbbind_${tbbbind_version} bsdtar -xf ${tbbbind} echo "${tbbbind.url}" > ie_dependency.info popd ''; </ins> dontUseCmakeBuildDir = true; cmakeFlags = [ <del> "-DNGRAPH_USE_SYSTEM_PROTOBUF:BOOL=ON" "-DFETCHCONTENT_FULLY_DISCONNECTED:BOOL=ON" "-DFETCHCONTENT_SOURCE_DIR_EXT_ONNX:STRING=${onnx_src}" "-DENABLE_VPU:BOOL=OFF" "-DTBB_DIR:STRING=${tbb}" </del> <ins> "-DCMAKE_PREFIX_PATH:PATH=${placeholder "out"}" "-DCMAKE_MODULE_PATH:PATH=${placeholder "out"}/lib/cmake" "-DENABLE_LTO:BOOL=ON" # protobuf "-DENABLE_SYSTEM_PROTOBUF:BOOL=OFF" "-DProtobuf_LIBRARIES=${protobuf}/lib/libprotobuf${stdenv.hostPlatform.extensions.sharedLibrary}" # tbb "-DENABLE_SYSTEM_TBB:BOOL=ON" # opencv </ins> "-DENABLE_OPENCV:BOOL=ON" <del> "-DOPENCV:STRING=${opencv}" "-DENABLE_GNA:BOOL=OFF" "-DENABLE_SPEECH_DEMO:BOOL=OFF" </del> <ins> "-DOpenCV_DIR=${opencv}/lib/cmake/opencv4/" # pugixml "-DENABLE_SYSTEM_PUGIXML:BOOL=ON" # onednn "-DENABLE_ONEDNN_FOR_GPU:BOOL=OFF" # intel gna "-DENABLE_INTEL_GNA:BOOL=ON" # python "-DENABLE_PYTHON:BOOL=ON" # tests "-DENABLE_CPPLINT:BOOL=OFF" </ins> "-DBUILD_TESTING:BOOL=OFF" <del> "-DENABLE_CLDNN_TESTS:BOOL=OFF" "-DNGRAPH_INTERPRETER_ENABLE:BOOL=ON" "-DNGRAPH_TEST_UTIL_ENABLE:BOOL=OFF" "-DNGRAPH_UNIT_TEST_ENABLE:BOOL=OFF" </del> "-DENABLE_SAMPLES:BOOL=OFF" <del> "-DENABLE_CPPLINT:BOOL=OFF" ] ++ lib.optionals enablePython [ "-DENABLE_PYTHON:BOOL=ON" </del> ]; <del> preConfigure = '' # To make install openvino inside /lib instead of /python substituteInPlace inference-engine/ie_bridges/python/CMakeLists.txt  --replace 'DESTINATION python/''${PYTHON_VERSION}/openvino' 'DESTINATION lib/''${PYTHON_VERSION}/site-packages/openvino'  --replace 'DESTINATION python/''${PYTHON_VERSION}' 'DESTINATION lib/''${PYTHON_VERSION}/site-packages/openvino' substituteInPlace inference-engine/ie_bridges/python/src/openvino/inference_engine/CMakeLists.txt  --replace 'python/''${PYTHON_VERSION}/openvino/inference_engine' 'lib/''${PYTHON_VERSION}/site-packages/openvino/inference_engine' # Used to download OpenCV based on Linux Distro and make it use system OpenCV substituteInPlace inference-engine/cmake/dependencies.cmake  --replace 'include(linux_name)' ' '  --replace 'if (ENABLE_OPENCV)' 'if (ENABLE_OPENCV AND NOT DEFINED OPENCV)' cmakeDir=$PWD mkdir ../build cd ../build ''; autoPatchelfIgnoreMissingDeps = [ "libngraph_backend.so" ]; nativeBuildInputs = [ cmake autoPatchelfHook addOpenGLRunpath unzip </del> <ins> autoPatchelfIgnoreMissingDeps = [ "libngraph_backend.so" </ins> ]; buildInputs = [ <del> git protobuf </del> <ins> libusb1 libxml2 </ins> opencv <del> python </del> <ins> protobuf pugixml </ins> tbb <del> shellcheck ] ++ lib.optionals enablePython (with python.pkgs; [ cython pybind11 ]); </del> <ins> ]; enableParallelBuilding = true; postInstall = '' pushd $out/python/python${lib.versions.majorMinor python.version} mkdir -p $python mv ./* $python/ popd rm -r $out/python ''; </ins> postFixup = '' # Link to OpenCL

Discussion:
When trying to get openvino in a shell, something fails to build with a linker error similar to shell nixpkgs#openvino OpenVINO builds successfully and it's provided in a shell. The nix build log is attached. Please run and paste the result.
Web-viewable logs on hydra:
Would also be nice to have a more recent version that could work with frigate.
The original error meant that tbb was built with gcc 11, while openvino was built using gcc 10.