From f0cae1e3c684960a590f6cc5feb2285c467f9f76 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 16 Dec 2024 22:11:51 -0500 Subject: [PATCH] itk: fix contradictory ITK_USE_SYSTEM_EIGEN cmake flags --- pkgs/development/libraries/itk/generic.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/itk/generic.nix b/pkgs/development/libraries/itk/generic.nix index b569c84e4ed61..383baaabc1940 100644 --- a/pkgs/development/libraries/itk/generic.nix +++ b/pkgs/development/libraries/itk/generic.nix @@ -115,8 +115,7 @@ stdenv.mkDerivation { "-DBUILD_SHARED_LIBS=ON" "-DITK_FORBID_DOWNLOADS=ON" "-DITK_USE_SYSTEM_LIBRARIES=ON" # finds common libraries e.g. hdf5, libpng, libtiff, zlib, but not GDCM, NIFTI, MINC, etc. - "-DITK_USE_SYSTEM_EIGEN=ON" - "-DITK_USE_SYSTEM_EIGEN=OFF" + (lib.cmakeBool "ITK_USE_SYSTEM_EIGEN" (lib.versionAtLeast version "5.4")) "-DITK_USE_SYSTEM_GOOGLETEST=OFF" # ANTs build failure due to https://github.com/ANTsX/ANTs/issues/1489 "-DITK_USE_SYSTEM_GDCM=ON" "-DITK_USE_SYSTEM_MINC=ON" @@ -152,10 +151,10 @@ stdenv.mkDerivation { buildInputs = [ - eigen libX11 libuuid ] + ++ lib.optionals (lib.versionAtLeast version "5.4") [ eigen ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ] ++ lib.optionals enablePython [ python ] ++ lib.optionals withVtk [ vtk ];