From 5d4ec2e8e2611f861f2e49d1d9d2a9c2f01d8ffe Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Tue, 29 Sep 2026 03:20:37 -0700 Subject: [PATCH] openvino: forbid compiler references This is a dependency of firefox, which forbids compiler references, so we hoist the same disallowedRequisites requirement here to catch regressions earlier. Thanks to K900 for the CMake option that avoids embedding build options, as was happening in the previous SCons build. Now that SCons is no longer needed, we can remove it entirely from the build. Co-authored-by: K900 --- pkgs/by-name/op/openvino/package.nix | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/pkgs/by-name/op/openvino/package.nix b/pkgs/by-name/op/openvino/package.nix index 5b97a543359d..7cbea42f8597 100644 --- a/pkgs/by-name/op/openvino/package.nix +++ b/pkgs/by-name/op/openvino/package.nix @@ -5,7 +5,6 @@ cudaSupport ? opencv.cudaSupport or false, # build - scons, addDriverRunpath, autoPatchelfHook, cmake, @@ -37,9 +36,6 @@ let getLib ; - # prevent scons from leaking in the default python version - scons' = scons.override { inherit python3Packages; }; - python = python3Packages.python.withPackages ( ps: with ps; [ cython @@ -83,7 +79,6 @@ stdenv.mkDerivation (finalAttrs: { patchelf pkg-config python - scons' ] ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc @@ -98,21 +93,6 @@ stdenv.mkDerivation (finalAttrs: { ./gcc-16-fix.patch ]; - # Fix arm computelib ar/ranlib toolchain paths for LTO awareness - postPatch = '' - substituteInPlace src/plugins/intel_cpu/thirdparty/ComputeLibrary/SConstruct \ - --replace-fail \ - "env['AR'] = toolchain_prefix + \"ar\"" \ - "env['AR'] = \"${lib.getExe' stdenv.cc.cc "gcc-ar"}\"" \ - --replace-fail \ - "env['RANLIB'] = toolchain_prefix + \"ranlib\"" \ - "env['RANLIB'] = \"${lib.getExe' stdenv.cc.cc "gcc-ranlib"}\"" - ''; - - dontUseSconsCheck = true; - dontUseSconsBuild = true; - dontUseSconsInstall = true; - cmakeFlags = [ "-Wno-dev" "-DCMAKE_MODULE_PATH:PATH=${placeholder "out"}/lib/cmake" @@ -159,6 +139,7 @@ stdenv.mkDerivation (finalAttrs: { (cmakeBool "ENABLE_SYSTEM_PUGIXML" true) (cmakeBool "ENABLE_SYSTEM_SNAPPY" true) (cmakeBool "ENABLE_SYSTEM_TBB" true) + (cmakeBool "ENABLE_ARM_COMPUTE_CMAKE" true) ]; # src/graph/src/plugins/intel_gpu/src/graph/include/reorder_inst.h:24:8: error: type 'struct typed_program_node' violates the C++ One Definition Rule [-Werror=odr] @@ -193,6 +174,10 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "exec_prefix=\''${prefix}/" "exec_prefix=" ''; + disallowedRequisites = [ + stdenv.cc.cc + ]; + meta = { changelog = "https://github.com/openvinotoolkit/openvino/releases/tag/${finalAttrs.src.tag}"; description = "Open-source toolkit for optimizing and deploying AI inference";