gdcm: unvendor some dependencies (openjpeg, zlib, uuid, expat)

This commit is contained in:
Ben Darwin 2023-11-05 22:47:25 -05:00
parent 9c19bc1a55
commit 7a7e3acc8c

View File

@ -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