2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper
|
|
|
|
, pkg-config, libX11, libuuid, xz, vtk_7, Cocoa }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "itk";
|
2021-01-05 17:05:55 +00:00
|
|
|
version = "5.1.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "InsightSoftwareConsortium";
|
|
|
|
repo = "ITK";
|
|
|
|
rev = "v${version}";
|
2021-01-05 17:05:55 +00:00
|
|
|
sha256 = "0db91pm1zy40h4qr5zsdfl94znk16w9ysddz5cxbl198iyyqii8f";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMake/ITKSetStandardCompilerFlags.cmake \
|
|
|
|
--replace "-march=corei7" "" \
|
|
|
|
--replace "-mtune=native" ""
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_EXAMPLES=OFF"
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
"-DModule_ITKMINC=ON"
|
|
|
|
"-DModule_ITKIOMINC=ON"
|
|
|
|
"-DModule_ITKIOTransformMINC=ON"
|
|
|
|
"-DModule_ITKVtkGlue=ON"
|
|
|
|
"-DModule_ITKReview=ON"
|
|
|
|
];
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
nativeBuildInputs = [ cmake xz makeWrapper ];
|
2021-02-05 17:12:51 +00:00
|
|
|
buildInputs = [ libX11 libuuid vtk_7 ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2021-02-05 17:12:51 +00:00
|
|
|
wrapProgram "$out/bin/h5c++" --prefix PATH ":" "${pkg-config}/bin"
|
2020-05-15 21:57:56 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Insight Segmentation and Registration Toolkit";
|
2020-05-15 21:57:56 +00:00
|
|
|
homepage = "https://www.itk.org/";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [viric];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|