1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/science/biology/ants/default.nix
Ben Darwin 5e716bf469 vtk: 7.1.1 -> 8.2.0
- also create vtk_7 as several packages don't build with 8.x:
  - itk5: vtkVersion.h header not found at compile time
  - ants: version in tree (2.2.0) is incompatible with 8.2
  - itk4: ants depends on both vtk and itk4, so use vtk_7
  - gdcm: vtk header issue
  - python3Packages.vtk: Python C API compilation error with Python 3.8

- upgrade vtkWithQt4 -> vtkWithQt5
2020-05-11 17:54:29 -04:00

43 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, fetchpatch, cmake, makeWrapper, itk4, vtk_7 }:
stdenv.mkDerivation rec {
pname = "ANTs";
version = "2.2.0";
src = fetchFromGitHub {
owner = "ANTsX";
repo = "ANTs";
rev = "37ad4e20be3a5ecd26c2e4e41b49e778a0246c3d";
sha256 = "1hrdwv3m9xh3yf7l0rm2ggxc2xzckfb8srs88g485ibfszx7i03q";
};
patches = [
# Fix build with gcc8
(fetchpatch {
url = "https://github.com/ANTsX/ANTs/commit/89af9b2694715bf8204993e032fa132f80cf37bd.patch";
sha256 = "1glkrwa1jmxxbmzihycxr576azjqby31jwpj165qc54c91pn0ams";
})
];
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs = [ itk4 vtk_7 ];
cmakeFlags = [ "-DANTS_SUPERBUILD=FALSE" "-DUSE_VTK=TRUE" ];
enableParallelBuilding = true;
postInstall = ''
for file in $out/bin/*; do
wrapProgram $file --set ANTSPATH "$out/bin"
done
'';
meta = with stdenv.lib; {
homepage = "https://github.com/ANTsX/ANTs";
description = "Advanced normalization toolkit for medical image registration and other processing";
maintainers = with maintainers; [ bcdarwin ];
platforms = platforms.unix;
license = licenses.bsd3;
};
}