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