about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gdcm
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-06-30 13:44:37 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-30 13:44:37 +0000
commit16f676d6bbd4f930b0017ccb20cebe5a29e17545 (patch)
tree0d554b4f16bdef502035b743457fc29ffcc5e7f7 /nixpkgs/pkgs/development/libraries/gdcm
parente7caacc4c122b7641bb66a4c2595289347a4996c (diff)
parent3a8d7958a610cd3fec3a6f424480f91a1b259185 (diff)
downloadnixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.gz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.bz2
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.lz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.xz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.zst
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.zip
Merge commit '3a8d7958a610cd3fec3a6f424480f91a1b259185'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gdcm')
-rw-r--r--nixpkgs/pkgs/development/libraries/gdcm/default.nix51
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 ];
   };
 }