diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/science/biology/ants/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/science/biology/ants/default.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/biology/ants/default.nix b/nixpkgs/pkgs/applications/science/biology/ants/default.nix new file mode 100644 index 000000000000..cb88e92fe1cb --- /dev/null +++ b/nixpkgs/pkgs/applications/science/biology/ants/default.nix @@ -0,0 +1,42 @@ +{ 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; + }; +} |