depot/third_party/nixpkgs/pkgs/applications/science/biology/ants/default.nix
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

54 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, makeBinaryWrapper
, itk
, vtk
, Cocoa
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ANTs";
version = "2.5.1";
src = fetchFromGitHub {
owner = "ANTsX";
repo = "ANTs";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-q252KC6SKUN5JaQWAcsVmDprVkLXDvkYzNhC7yHJNpk=";
};
nativeBuildInputs = [
cmake
makeBinaryWrapper
];
buildInputs = [
itk
vtk
] ++ lib.optionals stdenv.isDarwin [
Cocoa
];
cmakeFlags = [
"-DANTS_SUPERBUILD=FALSE"
"-DUSE_VTK=TRUE"
];
postInstall = ''
for file in $out/bin/*; do
wrapProgram $file --set PATH "$out/bin"
done
'';
meta = {
changelog = "https://github.com/ANTsX/ANTs/releases/tag/v${finalAttrs.version}";
description = "Advanced normalization toolkit for medical image registration and other processing";
homepage = "https://github.com/ANTsX/ANTs";
license = lib.licenses.asl20;
mainProgram = "antsRegistration";
maintainers = with lib.maintainers; [ bcdarwin ];
platforms = lib.platforms.unix;
};
})