summary refs log tree commit diff
path: root/pkgs/development/libraries/simpleitk/default.nix
blob: 4802683079d1f59d17fad514731a99078f7934e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ stdenv, fetchurl, cmake, git, swig, lua, itk }:

stdenv.mkDerivation rec {
  pname    = "simpleitk";
  version = "1.0.0";
  name  = "${pname}-${version}";

  src = fetchurl {
    url    = "https://sourceforge.net/projects/${pname}/files/SimpleITK/${version}/Source/SimpleITK-${version}.tar.gz";
    sha256 = "0554j0zp314zhs8isfg31fi6gvsl7xq3xjyyxkx1b1mjkn5qx673";
  };

  nativeBuildInputs = [ cmake git swig ];
  buildInputs = [ lua itk ];

  cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_CXX_FLAGS='-Wno-attributes'" ];

  checkPhase = "ctest";

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    homepage = http://www.simpleitk.org;
    description = "Simplified interface to ITK";
    maintainers = with maintainers; [ bcdarwin ];
    platforms = platforms.unix;
    license = licenses.asl20;
  };
}