simpleitk: enable SimpleElastix module

Note that building SimpleITK with shared libraries had to be disabled
when building against Elastix (which doesn't support building with
shared libraries for some reason) due to a linker error.
However, the Python package correctly builds the needed shared objects.
This commit is contained in:
Ben Darwin 2023-10-07 18:30:08 -04:00
parent b66c1ca185
commit 9c90eb4e3f
2 changed files with 16 additions and 3 deletions

View file

@ -4,6 +4,7 @@
, cmake
, swig4
, lua
, elastix
, itk
}:
@ -23,6 +24,7 @@ stdenv.mkDerivation (finalAttrs: {
swig4
];
buildInputs = [
elastix
lua
itk
];
@ -30,7 +32,8 @@ stdenv.mkDerivation (finalAttrs: {
# 2.0.0: linker error building examples
cmakeFlags = [
"-DBUILD_EXAMPLES=OFF"
"-DBUILD_SHARED_LIBS=ON"
"-DBUILD_SHARED_LIBS=OFF"
"-DSimpleITK_USE_ELASTIX=ON"
];
meta = with lib; {

View file

@ -4,6 +4,7 @@
, fetchFromGitHub
, cmake
, swig4
, elastix
, itk
, numpy
, simpleitk
@ -20,8 +21,17 @@ buildPythonPackage rec {
make
'';
nativeBuildInputs = [ cmake swig4 scikit-build ];
propagatedBuildInputs = [ itk simpleitk numpy ];
nativeBuildInputs = [
cmake
swig4
scikit-build
];
propagatedBuildInputs = [
elastix
itk
simpleitk
numpy
];
pythonImportsCheck = [ "SimpleITK" ];
}