2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, makeWrapper, flex, bison, perl, TextFormat,
|
|
|
|
libminc, libjpeg, nifticlib, zlib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "minc-tools";
|
2020-10-07 09:15:18 +00:00
|
|
|
version = "unstable-2020-07-25";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "BIC-MNI";
|
|
|
|
repo = pname;
|
2020-10-07 09:15:18 +00:00
|
|
|
rev = "fb0a68a07d281e4e099c5d54df29925240de14c1";
|
|
|
|
sha256 = "0zcv2sdj3k6k0xjqdq8j5bxq8smm48dzai90vwsmz8znmbbm6kvw";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake flex bison makeWrapper ];
|
2020-07-18 16:06:22 +00:00
|
|
|
buildInputs = [ libminc libjpeg nifticlib zlib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ perl TextFormat ];
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake"
|
2020-07-18 16:06:22 +00:00
|
|
|
"-DZNZ_INCLUDE_DIR=${nifticlib}/include/nifti"
|
|
|
|
"-DNIFTI_INCLUDE_DIR=${nifticlib}/include/nifti" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
for prog in minccomplete minchistory mincpik; do
|
|
|
|
wrapProgram $out/bin/$prog --prefix PERL5LIB : $PERL5LIB
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/BIC-MNI/minc-tools";
|
|
|
|
description = "Command-line utilities for working with MINC files";
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.free;
|
|
|
|
};
|
|
|
|
}
|