diff --git a/pkgs/development/libraries/itk/generic.nix b/pkgs/development/libraries/itk/generic.nix index e2db993707e2..652fce4a6797 100644 --- a/pkgs/development/libraries/itk/generic.nix +++ b/pkgs/development/libraries/itk/generic.nix @@ -1,6 +1,6 @@ { version, rev, sourceSha256 }: -{ lib, stdenv, fetchFromGitHub, cmake +{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake , expat, fftw, gdcm, hdf5-cpp, libjpeg, libminc, libtiff, libpng , libX11, libuuid, xz, vtk, zlib, Cocoa }: @@ -38,6 +38,14 @@ stdenv.mkDerivation { sha256 = sourceSha256; }; + patches = [ + (fetchpatch { + name = "fix-gcc13-build"; + url = "https://github.com/InsightSoftwareConsortium/ITK/commit/9a719a0d2f5f489eeb9351b0ef913c3693147a4f.patch"; + hash = "sha256-dDyqYOzo91afR8W7k2N64X6l7t6Ws1C9iuRkWHUe0fg="; + }) + ]; + postPatch = '' substituteInPlace CMake/ITKSetStandardCompilerFlags.cmake \ --replace "-march=corei7" "" \