summary refs log tree commit diff
path: root/pkgs/development/libraries/gdcm
diff options
context:
space:
mode:
authorThiago Franco de Moraes <totonixsame@gmail.com>2020-07-05 17:52:33 -0300
committerJon <jonringer@users.noreply.github.com>2020-07-06 09:26:55 -0700
commit956d7b8169ceb7449139dfc059393061a9244954 (patch)
tree73c7fc26394bed6644b39cc90d966f57d8ad04c5 /pkgs/development/libraries/gdcm
parent5befae9c9cd9812b0fe7729a30d76c664a3871b5 (diff)
downloadnixpkgs-956d7b8169ceb7449139dfc059393061a9244954.tar
nixpkgs-956d7b8169ceb7449139dfc059393061a9244954.tar.gz
nixpkgs-956d7b8169ceb7449139dfc059393061a9244954.tar.bz2
nixpkgs-956d7b8169ceb7449139dfc059393061a9244954.tar.lz
nixpkgs-956d7b8169ceb7449139dfc059393061a9244954.tar.xz
nixpkgs-956d7b8169ceb7449139dfc059393061a9244954.tar.zst
nixpkgs-956d7b8169ceb7449139dfc059393061a9244954.zip
python3Package.gdcm: 3.0.6 -> 3.0.7
Diffstat (limited to 'pkgs/development/libraries/gdcm')
-rw-r--r--pkgs/development/libraries/gdcm/default.nix29
1 files changed, 19 insertions, 10 deletions
diff --git a/pkgs/development/libraries/gdcm/default.nix b/pkgs/development/libraries/gdcm/default.nix
index 745c96f5794..a4b5752e887 100644
--- a/pkgs/development/libraries/gdcm/default.nix
+++ b/pkgs/development/libraries/gdcm/default.nix
@@ -1,29 +1,39 @@
-{ stdenv, fetchurl, cmake, vtk_7, darwin }:
+{ stdenv, fetchurl, cmake, vtk_7, darwin
+, enablePython ? false, python ? null,  swig ? null}:
 
 stdenv.mkDerivation rec {
-  version = "3.0.6";
+  version = "3.0.7";
   pname = "gdcm";
 
   src = fetchurl {
     url = "mirror://sourceforge/gdcm/${pname}-${version}.tar.bz2";
-    sha256 = "048ycvhk143cvsf09r7vwmp4sm9ah9bh5pbbrl366m5a4sp7fr89";
+    sha256 = "1mm1190fv059k2vrilh3znm8z1ilygwld1iazdgh5s04mi1qljni";
   };
 
   dontUseCmakeBuildDir = true;
-  preConfigure = ''
-    cmakeDir=$PWD
-    mkdir ../build
-    cd ../build
-  '';
 
   cmakeFlags = [
     "-DGDCM_BUILD_APPLICATIONS=ON"
     "-DGDCM_BUILD_SHARED_LIBS=ON"
     "-DGDCM_USE_VTK=ON"
+  ]
+  ++ stdenv.lib.optional enablePython [
+    "-DGDCM_WRAP_PYTHON:BOOL=ON"
+    "-DGDCM_INSTALL_PYTHONMODULE_DIR=${placeholder "out"}/${python.sitePackages}"
   ];
 
+  preConfigure = ''
+    cmakeDir=$PWD
+    mkdir ../build
+    cd ../build
+  '';
+
   enableParallelBuilding = true;
-  buildInputs = [ cmake vtk_7 ] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices darwin.apple_sdk.frameworks.Cocoa ];
+  buildInputs = [ cmake vtk_7 ]
+    ++ stdenv.lib.optional stdenv.isDarwin [
+      darwin.apple_sdk.frameworks.ApplicationServices
+      darwin.apple_sdk.frameworks.Cocoa
+    ] ++ stdenv.lib.optional enablePython [ swig python ];
   propagatedBuildInputs = [ ];
 
   meta = with stdenv.lib; {
@@ -37,4 +47,3 @@ stdenv.mkDerivation rec {
     platforms = platforms.all;
   };
 }
-