2023-02-02 18:25:31 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper, itk, vtk, Cocoa }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-02-02 18:25:31 +00:00
|
|
|
pname = "ANTs";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "2.4.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ANTsX";
|
|
|
|
repo = "ANTs";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-S4HYhsqof27UXEYjKvbod8N7PkZDmwLdwcEAvJD0W5g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake makeWrapper ];
|
2023-02-02 18:25:31 +00:00
|
|
|
buildInputs = [ itk vtk ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [ "-DANTS_SUPERBUILD=FALSE" "-DUSE_VTK=TRUE" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for file in $out/bin/*; do
|
|
|
|
wrapProgram $file --set ANTSPATH "$out/bin"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|