Unverified Commit 988d2d98 authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #266772 from bcdarwin/gdcm-unvendor

gdcm: unvendor some dependencies (openjpeg, zlib, uuid, expat)
parents 61cdc02f 7a7e3acc
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -10,6 +10,11 @@
, enablePython ? false
, python ? null
, swig
, 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,9 +47,17 @@ 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