2021-01-11 07:54:33 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cmake,
|
|
|
|
makeWrapper,
|
2018-12-15 03:50:31 +00:00
|
|
|
perlPackages,
|
2024-01-21 18:35:45 +00:00
|
|
|
libminc,
|
|
|
|
ebtks,
|
|
|
|
}:
|
2017-09-25 18:20:56 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "inormalize";
|
2023-02-12 21:21:29 +00:00
|
|
|
version = "unstable-2014-10-21";
|
2017-09-25 18:20:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "BIC-MNI";
|
|
|
|
repo = pname;
|
|
|
|
rev = "79cea9cdfe7b99abfd40afda89ab2253b596ad2f";
|
|
|
|
sha256 = "1ahqv5q0ljvji99a5q8azjkdf6bgp6nr8lwivkqwqs3jm0k5clq7";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./lgmask-interp.patch
|
|
|
|
./nu_correct_norm-interp.patch
|
|
|
|
];
|
|
|
|
|
2024-01-21 22:26:55 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace inormalize.cc \
|
|
|
|
--replace "clamp" "::clamp"
|
|
|
|
'';
|
|
|
|
|
2017-09-25 18:20:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
makeWrapper
|
|
|
|
];
|
2024-01-21 18:35:45 +00:00
|
|
|
buildInputs = [
|
|
|
|
libminc
|
|
|
|
ebtks
|
|
|
|
];
|
2018-12-15 03:50:31 +00:00
|
|
|
propagatedBuildInputs = with perlPackages; [
|
|
|
|
perl
|
|
|
|
GetoptTabular
|
|
|
|
MNI-Perllib
|
|
|
|
];
|
2017-09-25 18:20:56 +00:00
|
|
|
|
2024-01-21 18:35:45 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DLIBMINC_DIR=${libminc}/lib/cmake"
|
|
|
|
"-DEBTKS_DIR=${ebtks}/lib/"
|
|
|
|
];
|
2017-09-25 18:20:56 +00: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; {
|
2017-09-25 18:20:56 +00:00
|
|
|
homepage = "https://github.com/BIC-MNI/${pname}";
|
|
|
|
description = "Program to normalize intensity of MINC files";
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
platforms = platforms.unix;
|
2017-09-26 17:22:46 +00:00
|
|
|
license = licenses.free;
|
2017-09-25 18:20:56 +00:00
|
|
|
};
|
|
|
|
}
|