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