From a30bedbc214b7bcdcd462e03017f36e2828a7844 Mon Sep 17 00:00:00 2001 From: daspk04 Date: Sun, 19 Oct 2025 16:56:27 +0700 Subject: [PATCH] otb: fix minimum cmake version error * Update the cmake version to 3.10 for ITK third-party related module --- pkgs/by-name/ot/otb/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/ot/otb/package.nix b/pkgs/by-name/ot/otb/package.nix index b2fb21c6f830..4de37605c62c 100644 --- a/pkgs/by-name/ot/otb/package.nix +++ b/pkgs/by-name/ot/otb/package.nix @@ -95,6 +95,11 @@ let }) ]; + postPatch = '' + substituteInPlace Modules/ThirdParty/KWSys/src/KWSys/CMakeLists.txt \ + --replace-fail 'cmake_minimum_required(VERSION 3.1 FATAL_ERROR)' 'cmake_minimum_required(VERSION 3.10)' + ''; + # fix the CMake config files for ITK which contains double slashes postInstall = (oldArgs.postInstall or "") + '' sed -i 's|''${ITK_INSTALL_PREFIX}//nix/store|/nix/store|g' $out/lib/cmake/ITK-${itkMajorMinorVersion}/ITKConfig.cmake