diff options
author | Ben Darwin <bcdarwin@gmail.com> | 2022-08-14 23:29:02 -0400 |
---|---|---|
committer | Ben Darwin <bcdarwin@gmail.com> | 2022-08-14 23:32:17 -0400 |
commit | 6d4c3b07c2038988a35191410b792fcc37040f0a (patch) | |
tree | ab6429cc0c9327e626fd2fe6fa78c679486e47d3 | |
parent | c5e81898a3a3f5f9737cbd9c1837160fcaea0114 (diff) | |
download | nixpkgs-6d4c3b07c2038988a35191410b792fcc37040f0a.tar nixpkgs-6d4c3b07c2038988a35191410b792fcc37040f0a.tar.gz nixpkgs-6d4c3b07c2038988a35191410b792fcc37040f0a.tar.bz2 nixpkgs-6d4c3b07c2038988a35191410b792fcc37040f0a.tar.lz nixpkgs-6d4c3b07c2038988a35191410b792fcc37040f0a.tar.xz nixpkgs-6d4c3b07c2038988a35191410b792fcc37040f0a.tar.zst nixpkgs-6d4c3b07c2038988a35191410b792fcc37040f0a.zip |
itk: enable additional modules
Enable MGHIO, GenericLabelInterpolator, and AdaptiveDenoising ITK modules, which are required by current versions of ANTs (e.g. 2.3.5 and 2.4.0); see, e.g., https://github.com/ANTsX/ANTs/issues/1353#issuecomment-1117462739, the Gentoo ANTs package, or the ANTs SuperBuild itself. Updating ANTs will, in particular, allow removal of itk4 and vtk_7 from Nixpkgs. Unfortunately, these ANTs releases do not build against the version of ITK (5.2.1) current in tree, so we need to either add another ITK 5.x version or wait until ITK is bumped to 5.3.x (currently still in beta) in Nixpkgs.
-rw-r--r-- | pkgs/development/libraries/itk/default.nix | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/development/libraries/itk/default.nix b/pkgs/development/libraries/itk/default.nix index 08971c4c81c..6816c37b9be 100644 --- a/pkgs/development/libraries/itk/default.nix +++ b/pkgs/development/libraries/itk/default.nix @@ -5,6 +5,20 @@ stdenv.mkDerivation rec { pname = "itk"; version = "5.2.1"; + itkGenericLabelInterpolatorSrc = fetchFromGitHub { + owner = "InsightSoftwareConsortium"; + repo = "ITKGenericLabelInterpolator"; + rev = "2f3768110ffe160c00c533a1450a49a16f4452d9"; + hash = "sha256-Cm3jg14MMnbr/sP+gqR2Rh25xJjoRvpmY/jP/DKH978="; + }; + + itkAdaptiveDenoisingSrc = fetchFromGitHub { + owner = "ntustison"; + repo = "ITKAdaptiveDenoising"; + rev = "24825c8d246e941334f47968553f0ae388851f0c"; + hash = "sha256-deJbza36c0Ohf9oKpO2T4po37pkyI+2wCSeGL4r17Go="; + }; + src = fetchFromGitHub { owner = "InsightSoftwareConsortium"; repo = "ITK"; @@ -16,16 +30,22 @@ stdenv.mkDerivation rec { substituteInPlace CMake/ITKSetStandardCompilerFlags.cmake \ --replace "-march=corei7" "" \ --replace "-mtune=native" "" + ln -sr ${itkGenericLabelInterpolatorSrc} Modules/External/ITKGenericLabelInterpolator + ln -sr ${itkAdaptiveDenoisingSrc} Modules/External/ITKAdaptiveDenoising ''; cmakeFlags = [ "-DBUILD_EXAMPLES=OFF" "-DBUILD_SHARED_LIBS=ON" + "-DITK_FORBID_DOWNLOADS=ON" "-DModule_ITKMINC=ON" "-DModule_ITKIOMINC=ON" "-DModule_ITKIOTransformMINC=ON" "-DModule_ITKVtkGlue=ON" "-DModule_ITKReview=ON" + "-DModule_MGHIO=ON" + "-DModule_AdaptiveDenoising=ON" + "-DModule_GenericLabelInterpolator=ON" ]; nativeBuildInputs = [ cmake xz makeWrapper ]; |