From 0db4dea3b9e0cd5c48073986a057f05e58b8745a Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Wed, 6 Sep 2023 13:40:16 -0400 Subject: [PATCH] mirtk: 2.0.0 -> unstable-2022-07-22 --- .../science/biology/mirtk/default.nix | 52 ++++++++++++++----- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/science/biology/mirtk/default.nix b/pkgs/development/libraries/science/biology/mirtk/default.nix index de419dc3d575..b6adf67cbe82 100644 --- a/pkgs/development/libraries/science/biology/mirtk/default.nix +++ b/pkgs/development/libraries/science/biology/mirtk/default.nix @@ -1,14 +1,27 @@ -{ lib, stdenv, gtest, fetchFromGitHub, cmake, boost, eigen, python3, vtk_8, zlib, tbb }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, python3 +, boost +, eigen +, libGLU +, fltk +, itk +, vtk +, zlib +, tbb +}: stdenv.mkDerivation rec { - version = "2.0.0"; pname = "mirtk"; + version = "unstable-2022-07-22"; src = fetchFromGitHub { owner = "BioMedIA"; repo = "MIRTK"; - rev = "v${version}"; - sha256 = "0i2v97m66ir5myvi5b123r7zcagwy551b73s984gk7lksl5yiqxk"; + rev = "973ce2fe3f9508dec68892dbf97cca39067aa3d6"; + hash = "sha256-vKgkDrbyGOcbaYlxys1duC8ZNG0Y2nqh3TtSQ06Ox0Q="; fetchSubmodules = true; }; @@ -16,23 +29,36 @@ stdenv.mkDerivation rec { "-DWITH_VTK=ON" "-DBUILD_ALL_MODULES=ON" "-DWITH_TBB=ON" + "-DWITH_ITK=ON" + "-DWITH_GIFTICLIB=ON" + "-DWITH_NIFTILIB=ON" ]; - doCheck = true; - - checkPhase = '' - ctest -E '(Polynomial|ConvolutionFunction|Downsampling|EdgeTable|InterpolateExtrapolateImage)' + # tries to download data during configuration + postPatch = '' + substituteInPlace Packages/DrawEM/CMakeLists.txt --replace "include(Atlases.cmake)" "" ''; - # testPolynomial - segfaults for some reason - # testConvolutionFunction, testDownsampling - main not called correctly - # testEdgeTable, testInterpolateExtrapolateImageFunction - setup fails + + # tests don't seem to be maintained and gtest fails to link with BUILD_TESTING=ON; + # unclear if specific to Nixpkgs + doCheck = false; postInstall = '' install -Dm644 -t "$out/share/bash-completion/completions/mirtk" share/completion/bash/mirtk ''; - nativeBuildInputs = [ cmake gtest ]; - buildInputs = [ boost eigen python3 vtk_8 zlib tbb ]; + nativeBuildInputs = [ cmake ]; + buildInputs = [ + boost + eigen + fltk + itk + libGLU.dev + python3 + tbb + vtk + zlib + ]; meta = with lib; { homepage = "https://github.com/BioMedIA/MIRTK";