From 8b3aa4bbafd5f2f4a55149c6e6e24166aa773adc Mon Sep 17 00:00:00 2001 From: daspk04 Date: Sat, 5 Apr 2025 18:22:35 +0700 Subject: [PATCH] otb: 10.0-unstable-2025-02-13 -> 10.0-unstable-2025-04-03 --- pkgs/by-name/ot/otb/package.nix | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/ot/otb/package.nix b/pkgs/by-name/ot/otb/package.nix index 8b66d8e8614e..b30b092ae6c6 100644 --- a/pkgs/by-name/ot/otb/package.nix +++ b/pkgs/by-name/ot/otb/package.nix @@ -27,6 +27,7 @@ tinyxml, # otb modules + enableFFTW ? false, enableFeatureExtraction ? true, enableHyperspectral ? true, enableLearning ? true, @@ -50,10 +51,16 @@ let # filter out gdcm, libminc from list of ITK deps as it's not needed for OTB itkVersion = "5.3.0"; itkMajorMinorVersion = lib.versions.majorMinor itkVersion; - itkDepsToRemove = [ - "gdcm" - "libminc" - ]; + itkDepsToRemove = + [ + "gdcm" + "libminc" + ] + ++ optionals (!enableFFTW) [ + # remove fftw to avoid GPL contamination + # https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2454#note_112821 + "fftw" + ]; itkIsInDepsToRemove = dep: builtins.any (d: d == dep.name) itkDepsToRemove; # remove after https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2451 @@ -196,8 +203,8 @@ let propagatedBuildInputs = lib.lists.filter (pkg: !(itkIsInDepsToRemove pkg)) oldArgs.propagatedBuildInputs or [ ] - ++ [ - # the only missing dependency for OTB from itk propagated list + ++ lib.optionals enableFFTW [ + # the only missing dependency for OTB from itk propagated list if FFTW option is enabled fftwFloat ]; @@ -208,13 +215,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "otb"; - version = "10.0-unstable-2025-02-13"; + version = "10.0-unstable-2025-04-03"; src = fetchFromGitHub { owner = "orfeotoolbox"; repo = "otb"; - rev = "34c96ef53bb94985a1358d5c3de1a5ac6dfecf18"; - hash = "sha256-QCLuUryVi+r8sQGxvrh9G91uLxuRju6l3LxVJO3VzXM="; + rev = "93649b68f54975a1a48a0acd49f2602a55fc8032"; + hash = "sha256-S6yhV//qlKdWWcT9J1p64WuVS0QNepIYTr/t4JvyEwE="; }; patches = [ @@ -254,6 +261,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "OTBGroup_ThirdParty" enableThirdParty) (lib.cmakeBool "OTB_WRAP_PYTHON" enablePython) (lib.cmakeBool "BUILD_TESTING" finalAttrs.doInstallCheck) + (lib.cmakeBool "OTB_USE_FFTW" enableFFTW) ]; propagatedBuildInputs = @@ -267,7 +275,6 @@ stdenv.mkDerivation (finalAttrs: { muparserx opencv otb-itk - otb-shark perl tinyxml ]