From b27eaa18b47b77fbbf9f3bd7a17046b2d64b637b Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Tue, 22 Jun 2021 06:18:18 -0300 Subject: [PATCH] gdcm: 3.0.8 -> 3.0.9 (#122654) * gdcm: 3.0.8 -> 3.0.9 - make use of VTK optional (enabled by default) - use vtk instead of vtk_7 - fetching source code from GitHub (sourceforge doesn't have the last version). - nixpkgs-fmt * Update pkgs/development/libraries/gdcm/default.nix * Update pkgs/development/libraries/gdcm/default.nix Co-authored-by: Sandro --- pkgs/development/libraries/gdcm/default.nix | 51 +++++++++++---------- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/pkgs/development/libraries/gdcm/default.nix b/pkgs/development/libraries/gdcm/default.nix index 75ce95e0e46bb..86d80a529d59f 100644 --- a/pkgs/development/libraries/gdcm/default.nix +++ b/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 ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9cbd058bb58f0..94bdde6df0934 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15107,7 +15107,9 @@ in gdal_2 = callPackage ../development/libraries/gdal/2.4.nix { }; - gdcm = callPackage ../development/libraries/gdcm { }; + gdcm = callPackage ../development/libraries/gdcm { + inherit (darwin.apple_sdk.frameworks) ApplicationServices Cocoa; + }; ggz_base_libs = callPackage ../development/libraries/ggz_base_libs {};