summary refs log tree commit diff
path: root/pkgs/development/libraries/gdcm/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/gdcm/default.nix')
-rw-r--r--pkgs/development/libraries/gdcm/default.nix25
1 files changed, 21 insertions, 4 deletions
diff --git a/pkgs/development/libraries/gdcm/default.nix b/pkgs/development/libraries/gdcm/default.nix
index 76e661dfbd4..3298be5cc3c 100644
--- a/pkgs/development/libraries/gdcm/default.nix
+++ b/pkgs/development/libraries/gdcm/default.nix
@@ -9,7 +9,12 @@
 , libiconv
 , enablePython ? false
 , python ? null
-, swig
+, swig4
+, expat
+, libuuid
+, openjpeg
+, zlib
+, pkg-config
 }:
 
 stdenv.mkDerivation rec {
@@ -27,6 +32,10 @@ stdenv.mkDerivation rec {
     "-DGDCM_BUILD_APPLICATIONS=ON"
     "-DGDCM_BUILD_SHARED_LIBS=ON"
     "-DGDCM_BUILD_TESTING=ON"
+    "-DGDCM_USE_SYSTEM_EXPAT=ON"
+    "-DGDCM_USE_SYSTEM_ZLIB=ON"
+    "-DGDCM_USE_SYSTEM_UUID=ON"
+    "-DGDCM_USE_SYSTEM_OPENJPEG=ON"
     # hack around usual "`RUNTIME_DESTINATION` must not be an absolute path" issue:
     "-DCMAKE_INSTALL_LIBDIR=lib"
     "-DCMAKE_INSTALL_BINDIR=bin"
@@ -38,15 +47,23 @@ stdenv.mkDerivation rec {
     "-DGDCM_INSTALL_PYTHONMODULE_DIR=${placeholder "out"}/${python.sitePackages}"
   ];
 
-  nativeBuildInputs = [ cmake ];
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
 
-  buildInputs = lib.optionals enableVTK [
+  buildInputs = [
+    expat
+    libuuid
+    openjpeg
+    zlib
+  ] ++ lib.optionals enableVTK [
     vtk
   ] ++ lib.optionals stdenv.isDarwin [
     ApplicationServices
     Cocoa
     libiconv
-  ] ++ lib.optionals enablePython [ swig python ];
+  ] ++ lib.optionals enablePython [ swig4 python ];
 
   disabledTests = [
     # require networking: