2023-08-10 07:59:29 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, bzip2
|
|
|
|
, cmake
|
|
|
|
, fetchurl
|
|
|
|
, fftw
|
|
|
|
, llvmPackages
|
|
|
|
, zlib
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "cmtk";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "3.3.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
name = "cmtk-source.tar.gz";
|
2023-08-10 07:59:29 +00:00
|
|
|
url = "https://www.nitrc.org/frs/download.php/13188/CMTK-${finalAttrs.version}-Source.tar.gz//?i_agree=1&download_now=1";
|
|
|
|
hash = "sha256-iE164NCOSOypZLLZfZy9RTyrS+YnY9ECqfb4QhlsMS4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
buildInputs = [
|
|
|
|
bzip2
|
|
|
|
fftw
|
|
|
|
zlib
|
|
|
|
] ++ lib.optionals stdenv.cc.isClang [
|
|
|
|
llvmPackages.openmp
|
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
2023-08-10 07:59:29 +00:00
|
|
|
(lib.optionalString stdenv.cc.isGNU "-std=c++11")
|
|
|
|
(lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing")
|
|
|
|
(lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dfinite=isfinite")
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-08-10 07:59:29 +00:00
|
|
|
description = "Computational Morphometry Toolkit";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cmtk";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''A software toolkit for computational morphometry of
|
|
|
|
biomedical images, CMTK comprises a set of command line tools and a
|
|
|
|
back-end general-purpose library for processing and I/O'';
|
|
|
|
maintainers = with maintainers; [ tbenst ];
|
|
|
|
platforms = platforms.all;
|
2023-08-10 07:59:29 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://www.nitrc.org/projects/cmtk/";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-08-10 07:59:29 +00:00
|
|
|
})
|