Skip to content

Commit

Permalink
gdcm: 3.0.8 -> 3.0.9 (#122654)
Browse files Browse the repository at this point in the history
* 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 <sandro.jaeckel@gmail.com>
  • Loading branch information
tfmoraes and SuperSandro2000 authored Jun 22, 2021
1 parent 1bbdca3 commit b27eaa1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
51 changes: 28 additions & 23 deletions pkgs/development/libraries/gdcm/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -44,6 +49,6 @@ stdenv.mkDerivation rec {
'';
homepage = "http://gdcm.sourceforge.net/";
license = with licenses; [ bsd3 asl20 ];
platforms = platforms.all;
maintainers = with maintainers; [ tfmoraes ];
};
}
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};

Expand Down

0 comments on commit b27eaa1

Please sign in to comment.