2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config, libX11, libuuid, xz, vtk_7, Cocoa }:
|
2010-03-01 23:31:35 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 15:08:04 +00:00
|
|
|
pname = "itk";
|
2021-01-01 17:59:14 +00:00
|
|
|
version = "5.1.2";
|
2010-03-01 23:31:35 +00:00
|
|
|
|
2019-08-13 15:08:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "InsightSoftwareConsortium";
|
|
|
|
repo = "ITK";
|
|
|
|
rev = "v${version}";
|
2021-01-01 17:59:14 +00:00
|
|
|
sha256 = "0db91pm1zy40h4qr5zsdfl94znk16w9ysddz5cxbl198iyyqii8f";
|
2010-03-01 23:31:35 +00:00
|
|
|
};
|
|
|
|
|
2020-10-15 23:12:18 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMake/ITKSetStandardCompilerFlags.cmake \
|
|
|
|
--replace "-march=corei7" "" \
|
|
|
|
--replace "-mtune=native" ""
|
|
|
|
'';
|
|
|
|
|
2014-03-15 00:18:17 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_EXAMPLES=OFF"
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
2017-09-26 21:59:53 +00:00
|
|
|
"-DModule_ITKMINC=ON"
|
2017-03-02 01:55:42 +00:00
|
|
|
"-DModule_ITKIOMINC=ON"
|
2017-09-26 21:59:53 +00:00
|
|
|
"-DModule_ITKIOTransformMINC=ON"
|
2017-03-02 01:55:42 +00:00
|
|
|
"-DModule_ITKVtkGlue=ON"
|
|
|
|
"-DModule_ITKReview=ON"
|
2014-03-14 22:28:49 +00:00
|
|
|
];
|
2010-03-01 23:31:35 +00:00
|
|
|
|
2020-04-27 17:28:48 +00:00
|
|
|
nativeBuildInputs = [ cmake xz makeWrapper ];
|
2021-01-21 17:00:13 +00:00
|
|
|
buildInputs = [ libX11 libuuid vtk_7 ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
|
2020-04-27 17:28:48 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2021-01-19 06:50:56 +00:00
|
|
|
wrapProgram "$out/bin/h5c++" --prefix PATH ":" "${pkg-config}/bin"
|
2020-04-27 17:28:48 +00:00
|
|
|
'';
|
2010-03-01 23:31:35 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Insight Segmentation and Registration Toolkit";
|
2020-04-27 17:28:48 +00:00
|
|
|
homepage = "https://www.itk.org/";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [viric];
|
2010-03-01 23:31:35 +00:00
|
|
|
};
|
|
|
|
}
|