11 stdenv.mkDerivation (finalAttrs: {
16 name = "cmtk-source.tar.gz";
17 url = "https://www.nitrc.org/frs/download.php/13188/CMTK-${finalAttrs.version}-Source.tar.gz//?i_agree=1&download_now=1";
18 hash = "sha256-iE164NCOSOypZLLZfZy9RTyrS+YnY9ECqfb4QhlsMS4=";
22 substituteInPlace apps/vtkxform.cxx --replace-fail \
23 "float xyzFloat[3] = { xyz[0], xyz[1], xyz[2] };" \
24 "float xyzFloat[3] = { (float)xyz[0], (float)xyz[1], (float)xyz[2] };"
27 nativeBuildInputs = [ cmake ];
33 ] ++ lib.optionals stdenv.cc.isClang [
38 (lib.cmakeFeature "CMAKE_CXX_STANDARD" "14")
39 ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
40 (lib.cmakeFeature "CMAKE_CXX_FLAGS" "-Dfinite=isfinite")
44 description = "Computational Morphometry Toolkit";
47 A software toolkit for computational morphometry of
48 biomedical images, CMTK comprises a set of command line tools and a
49 back-end general-purpose library for processing and I/O
51 maintainers = with maintainers; [ tbenst ];
52 platforms = platforms.all;
53 license = licenses.gpl3Plus;
54 homepage = "https://www.nitrc.org/projects/cmtk/";