diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gdcm')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/gdcm/default.nix | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gdcm/default.nix b/nixpkgs/pkgs/development/libraries/gdcm/default.nix index 75ce95e0e46b..86d80a529d59 100644 --- a/nixpkgs/pkgs/development/libraries/gdcm/default.nix +++ b/nixpkgs/pkgs/development/libraries/gdcm/default.nix @@ -1,40 +1,45 @@ -{ lib, stdenv, fetchurl, cmake, vtk_7, darwin -, enablePython ? false, python ? null, swig ? null}: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, enableVTK ? true +, vtk +, ApplicationServices +, Cocoa +, enablePython ? false +, python +, swig +}: stdenv.mkDerivation rec { - version = "3.0.8"; pname = "gdcm"; + version = "3.0.9"; - src = fetchurl { - url = "mirror://sourceforge/gdcm/${pname}-${version}.tar.bz2"; - sha256 = "1q9p0r7wszn51yak9wdp61fd9i0wj3f8ja2frmhk7d1gxic7j1rk"; + src = fetchFromGitHub { + owner = "malaterre"; + repo = "GDCM"; + rev = "v${version}"; + sha256 = "sha256-wqrM8lxJM8VL+1QEdu6Gr1XWT1j9pT6gGd3yn1yokIY="; }; - dontUseCmakeBuildDir = true; - cmakeFlags = [ "-DGDCM_BUILD_APPLICATIONS=ON" "-DGDCM_BUILD_SHARED_LIBS=ON" + ] ++ lib.optionals enableVTK [ "-DGDCM_USE_VTK=ON" - ] - ++ lib.optional enablePython [ + ] ++ lib.optionals enablePython [ "-DGDCM_WRAP_PYTHON:BOOL=ON" "-DGDCM_INSTALL_PYTHONMODULE_DIR=${placeholder "out"}/${python.sitePackages}" ]; - preConfigure = '' - cmakeDir=$PWD - mkdir ../build - cd ../build - ''; - nativeBuildInputs = [ cmake ]; - buildInputs = [ vtk_7 ] - ++ lib.optional stdenv.isDarwin [ - darwin.apple_sdk.frameworks.ApplicationServices - darwin.apple_sdk.frameworks.Cocoa - ] ++ lib.optional enablePython [ swig python ]; - propagatedBuildInputs = [ ]; + + buildInputs = lib.optionals enableVTK [ + vtk + ] ++ lib.optionals stdenv.isDarwin [ + ApplicationServices + Cocoa + ] ++ lib.optionals enablePython [ swig python ]; meta = with lib; { description = "The grassroots cross-platform DICOM implementation"; @@ -44,6 +49,6 @@ stdenv.mkDerivation rec { ''; homepage = "http://gdcm.sourceforge.net/"; license = with licenses; [ bsd3 asl20 ]; - platforms = platforms.all; + maintainers = with maintainers; [ tfmoraes ]; }; } |