From da7a28f476bcc778d7ec0f80204f82c227347cbb Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Sun, 19 Oct 2025 12:52:20 -0400 Subject: [PATCH] minc_tools: CMake 4.x compatibility --- pkgs/applications/science/biology/minc-tools/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/applications/science/biology/minc-tools/default.nix b/pkgs/applications/science/biology/minc-tools/default.nix index 31fa46837c2e..a5d60ed8cae6 100644 --- a/pkgs/applications/science/biology/minc-tools/default.nix +++ b/pkgs/applications/science/biology/minc-tools/default.nix @@ -25,6 +25,13 @@ stdenv.mkDerivation { hash = "sha256-YafO5UjeADO/658Xm973JtqldRYkGQ4v8m1oNJoZrbM="; }; + # Fix for CMake > 4 in which the old policy for CMP0026 was removed. + # Note this breaks the tests, but they are not enabled anyway. + # Upstream issue: https://github.com/BIC-MNI/minc-tools/issues/123 + postPatch = '' + substituteInPlace CMakeLists.txt --replace-fail "SET CMP0026 OLD" "SET CMP0026 NEW" + ''; + nativeBuildInputs = [ cmake flex