From d83549d3fd145cf240f1b1ed325ef6e96028e702 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Wed, 27 May 2026 19:19:41 +0000 Subject: [PATCH] openvino: fix install layout with OV_CPACK_* variables --- pkgs/by-name/op/openvino/package.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/by-name/op/openvino/package.nix b/pkgs/by-name/op/openvino/package.nix index 801f928048cf..70cf64898fde 100644 --- a/pkgs/by-name/op/openvino/package.nix +++ b/pkgs/by-name/op/openvino/package.nix @@ -34,6 +34,7 @@ let inherit (lib) cmakeBool + cmakeFeature getLib ; @@ -98,6 +99,19 @@ stdenv.mkDerivation (finalAttrs: { "-DProtobuf_LIBRARIES=${getLib protobuf}/lib/libprotobuf${stdenv.hostPlatform.extensions.sharedLibrary}" "-DPython_EXECUTABLE=${python.interpreter}" + # OV_CPACK_* variables are normally set by packaging macros that only run + # when CPACK_GENERATOR matches a known type to upstream. + # Without one, all vars remain undefined and install() destinations are empty, + # putting files in $out/ root or producing absolute paths. Set them directly + # here so the build produces a standard layout. + (cmakeFeature "OV_CPACK_LIBRARYDIR" "lib") + (cmakeFeature "OV_CPACK_RUNTIMEDIR" "lib") + (cmakeFeature "OV_CPACK_ARCHIVEDIR" "lib") + (cmakeFeature "OV_CPACK_INCLUDEDIR" "include") + (cmakeFeature "OV_CPACK_OPENVINO_CMAKEDIR" "lib/cmake/OpenVINO") + (cmakeFeature "OV_CPACK_PYTHONDIR" "python") + (cmakeFeature "OV_CPACK_PLUGINSDIR" "lib") + (cmakeBool "CMAKE_VERBOSE_MAKEFILE" true) (cmakeBool "NCC_SYLE" false) (cmakeBool "BUILD_TESTING" false)