linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / science / biology / mirtk / default.nix
blob0d23489696f1ee2f5093fd8744463c6c56d88d92
1 { lib, stdenv, gtest, fetchFromGitHub, cmake, boost, eigen, python, vtk, zlib, tbb }:
3 stdenv.mkDerivation rec {
4   version = "2.0.0";
5   pname = "mirtk";
7   src = fetchFromGitHub {
8     owner = "BioMedIA";
9     repo = "MIRTK";
10     rev = "v${version}";
11     sha256 = "0i2v97m66ir5myvi5b123r7zcagwy551b73s984gk7lksl5yiqxk";
12     fetchSubmodules = true;
13   };
15   cmakeFlags = [
16     "-DWITH_VTK=ON"
17     "-DBUILD_ALL_MODULES=ON"
18     "-DWITH_TBB=ON"
19   ];
21   doCheck = true;
23   checkPhase = ''
24     ctest -E '(Polynomial|ConvolutionFunction|Downsampling|EdgeTable|InterpolateExtrapolateImage)'
25   '';
26   # testPolynomial - segfaults for some reason
27   # testConvolutionFunction, testDownsampling - main not called correctly
28   # testEdgeTable, testInterpolateExtrapolateImageFunction - setup fails
30   postInstall = ''
31     install -Dm644 -t "$out/share/bash-completion/completions/mirtk" share/completion/bash/mirtk
32   '';
34   nativeBuildInputs = [ cmake gtest ];
35   buildInputs = [ boost eigen python vtk zlib tbb ];
37   meta = with lib; {
38     homepage = "https://github.com/BioMedIA/MIRTK";
39     description = "Medical image registration library and tools";
40     maintainers = with maintainers; [ bcdarwin ];
41     platforms = platforms.linux;
42     license = licenses.asl20;
43   };