Unverified Commit 2ff895cd authored by Vladimír Čunát's avatar Vladimír Čunát Committed by GitHub
Browse files

minc_tools, minc_widgets: CMake 4 compatibility (#453566)

parents d58f0b6b 490b6fc7
Loading
Loading
Loading
Loading
+14 −7
Original line number Diff line number Diff line
@@ -16,15 +16,22 @@

stdenv.mkDerivation {
  pname = "minc-tools";
  version = "2.3.06-unstable-2023-08-12";
  version = "2.3.06-unstable-2024-11-28";

  src = fetchFromGitHub {
    owner = "BIC-MNI";
    repo = "minc-tools";
    rev = "c86a767dbb63aaa05ee981306fa09f6133bde427";
    hash = "sha256-PLNcuDU0ht1PcjloDhrPzpOpE42gbhPP3rfHtP7WnM4=";
    rev = "a72077d92266f9ea4c49b6dd3efd5766b81a104c";
    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
@@ -58,12 +65,12 @@ stdenv.mkDerivation {
    done
  '';

  meta = with lib; {
  meta = {
    homepage = "https://github.com/BIC-MNI/minc-tools";
    description = "Command-line utilities for working with MINC files";
    maintainers = with maintainers; [ bcdarwin ];
    platforms = platforms.unix;
    license = licenses.free;
    maintainers = with lib.maintainers; [ bcdarwin ];
    platforms = lib.platforms.unix;
    license = lib.licenses.free;
    broken = stdenv.hostPlatform.isDarwin;
  };
}
+13 −4
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  cmake,
  makeWrapper,
  perlPackages,
@@ -22,6 +23,14 @@ stdenv.mkDerivation {
    sha256 = "1b9g6lf37wpp211ikaji4rf74rl9xcmrlyqcw1zq3z12ji9y33bm";
  };

  patches = [
    (fetchpatch {
      name = "cmake4-fix.patch";
      url = "https://github.com/BIC-MNI/minc-widgets/commit/9f5bc1996d2f9b4702efdb010834e2c7f1e3fbf1.patch";
      hash = "sha256-qqMKbxQS+HTRQaOP2DH/m8Z3DqoCMGLFp1AEKaQ6l5s=";
    })
  ];

  nativeBuildInputs = [
    cmake
    makeWrapper
@@ -50,11 +59,11 @@ stdenv.mkDerivation {
    done
  '';

  meta = with lib; {
  meta = {
    homepage = "https://github.com/BIC-MNI/minc-widgets";
    description = "Collection of Perl and shell scripts for processing MINC files";
    maintainers = with maintainers; [ bcdarwin ];
    platforms = platforms.unix;
    license = licenses.free;
    maintainers = with lib.maintainers; [ bcdarwin ];
    platforms = lib.platforms.unix;
    license = lib.licenses.free;
  };
}