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