nixpkgs/pkgs/development/libraries/itk/default.nix

45 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper
, pkg-config, libX11, libuuid, xz, vtk_7, Cocoa }:
stdenv.mkDerivation rec {
pname = "itk";
2021-01-01 17:59:14 +00:00
version = "5.1.2";
src = fetchFromGitHub {
owner = "InsightSoftwareConsortium";
repo = "ITK";
rev = "v${version}";
2021-01-01 17:59:14 +00:00
sha256 = "0db91pm1zy40h4qr5zsdfl94znk16w9ysddz5cxbl198iyyqii8f";
};
postPatch = ''
substituteInPlace CMake/ITKSetStandardCompilerFlags.cmake \
--replace "-march=corei7" "" \
--replace "-mtune=native" ""
'';
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
];
2020-04-27 17:28:48 +00:00
nativeBuildInputs = [ cmake xz makeWrapper ];
buildInputs = [ libX11 libuuid vtk_7 ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
2020-04-27 17:28:48 +00:00
postInstall = ''
wrapProgram "$out/bin/h5c++" --prefix PATH ":" "${pkg-config}/bin"
2020-04-27 17:28:48 +00:00
'';
meta = {
description = "Insight Segmentation and Registration Toolkit";
2020-04-27 17:28:48 +00:00
homepage = "https://www.itk.org/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [viric];
};
}