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 <me@0upti.me>
This commit is contained in:
Ryan Burns
2026-09-29 03:20:37 -07:00
parent 8494274999
commit 5d4ec2e8e2

View File

@@ -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";