1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 swig,
7 lua,
8 elastix,
9 itk,
10}:
11
12stdenv.mkDerivation (finalAttrs: {
13 pname = "simpleitk";
14 version = "2.5.2";
15
16 src = fetchFromGitHub {
17 owner = "SimpleITK";
18 repo = "SimpleITK";
19 tag = "v${finalAttrs.version}";
20 hash = "sha256-6jEPO8pM5EDVFgeq8hSpJ0pWn2/Iph4Xcs2hs41kxAI=";
21 };
22
23 nativeBuildInputs = [
24 cmake
25 swig
26 ];
27 buildInputs = [
28 elastix
29 lua
30 itk
31 ];
32
33 # 2.0.0: linker error building examples
34 cmakeFlags = [
35 "-DBUILD_EXAMPLES=OFF"
36 "-DBUILD_SHARED_LIBS=OFF"
37 "-DSimpleITK_USE_ELASTIX=ON"
38 ];
39
40 meta = with lib; {
41 homepage = "https://www.simpleitk.org";
42 description = "Simplified interface to ITK";
43 changelog = "https://github.com/SimpleITK/SimpleITK/releases/tag/v${finalAttrs.version}";
44 maintainers = with maintainers; [ bcdarwin ];
45 platforms = platforms.linux;
46 license = licenses.asl20;
47 };
48})