mirtk: 2.0.0 -> unstable-2022-07-22

This commit is contained in:
Ben Darwin 2023-09-06 13:40:16 -04:00
parent 38a5ede5c3
commit 0db4dea3b9

View file

@ -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";