2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper,
|
2020-04-24 23:36:52 +00:00
|
|
|
perlPackages,
|
|
|
|
libminc, EBTKS }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "N3";
|
2020-10-07 09:15:18 +00:00
|
|
|
version = "unstable-2018-08-09";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "BIC-MNI";
|
|
|
|
repo = pname;
|
2020-10-07 09:15:18 +00:00
|
|
|
rev = "010fc2ac58ce1d67b8e6a863fac0809d3203cb9b";
|
|
|
|
sha256 = "06hci7gzhy8p34ggvx7gah2k9yxpwhgmq1cgw8pcd1r82g4rg6kd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake makeWrapper ];
|
|
|
|
buildInputs = [ libminc EBTKS ];
|
|
|
|
propagatedBuildInputs = with perlPackages; [ perl MNI-Perllib GetoptTabular ];
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" "-DEBTKS_DIR=${EBTKS}/lib/" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
for p in $out/bin/*; do
|
|
|
|
wrapProgram $p --prefix PERL5LIB : $PERL5LIB
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-07 09:15:18 +00:00
|
|
|
homepage = "https://github.com/BIC-MNI/N3";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "MRI non-uniformity correction for MINC files";
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.free;
|
|
|
|
};
|
|
|
|
}
|