ants: set $ANTSPATH variable in shell scripts

This commit is contained in:
Ben Darwin 2017-03-19 18:54:37 -04:00
parent f02ac9588f
commit fbc9a4d7dc

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, itk, vtk }:
{ stdenv, fetchFromGitHub, cmake, makeWrapper, itk, vtk }:
stdenv.mkDerivation rec {
_name = "ANTs";
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
sha256 = "0gyys1lf69bl3569cskxc8r5llwcr0dsyzvlby5skhfpsyw0dh8r";
};
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs = [ itk vtk ];
cmakeFlags = [ "-DANTS_SUPERBUILD=FALSE" "-DUSE_VTK=TRUE" ];
@ -20,6 +20,12 @@ stdenv.mkDerivation rec {
checkPhase = "ctest";
doCheck = false;
postInstall = ''
for file in $out/bin/*; do
wrapProgram $file --set ANTSPATH "$out/bin"
done
'';
meta = with stdenv.lib; {
homepage = https://github.com/stnava/ANTs;
description = "Advanced normalization toolkit for medical image registration and other processing";