1 { lib, stdenv, fetchurl, cmake, vtk_7, darwin
2 , enablePython ? false, python ? null, swig ? null}:
4 stdenv.mkDerivation rec {
9 url = "mirror://sourceforge/gdcm/${pname}-${version}.tar.bz2";
10 sha256 = "1q9p0r7wszn51yak9wdp61fd9i0wj3f8ja2frmhk7d1gxic7j1rk";
13 dontUseCmakeBuildDir = true;
16 "-DGDCM_BUILD_APPLICATIONS=ON"
17 "-DGDCM_BUILD_SHARED_LIBS=ON"
20 ++ lib.optional enablePython [
21 "-DGDCM_WRAP_PYTHON:BOOL=ON"
22 "-DGDCM_INSTALL_PYTHONMODULE_DIR=${placeholder "out"}/${python.sitePackages}"
31 nativeBuildInputs = [ cmake ];
32 buildInputs = [ vtk_7 ]
33 ++ lib.optional stdenv.isDarwin [
34 darwin.apple_sdk.frameworks.ApplicationServices
35 darwin.apple_sdk.frameworks.Cocoa
36 ] ++ lib.optional enablePython [ swig python ];
37 propagatedBuildInputs = [ ];
40 description = "The grassroots cross-platform DICOM implementation";
42 Grassroots DICOM (GDCM) is an implementation of the DICOM standard designed to be open source so that researchers may access clinical data directly.
43 GDCM includes a file format definition and a network communications protocol, both of which should be extended to provide a full set of tools for a researcher or small medical imaging vendor to interface with an existing medical database.
45 homepage = "http://gdcm.sourceforge.net/";
46 license = with licenses; [ bsd3 asl20 ];
47 platforms = platforms.all;