diff --git a/pkgs/by-name/hm/hm/package.nix b/pkgs/by-name/hm/hm/package.nix index 600a07b375e5..ac584e7939ae 100644 --- a/pkgs/by-name/hm/hm/package.nix +++ b/pkgs/by-name/hm/hm/package.nix @@ -20,6 +20,18 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-zWBwrnCNKi2sIopdu2XQj/7IoTsJQzlcIFNNKM0glDQ="; }; + patches = [ + # GCC 16 has better analysis of unused variables than previous versions. + # Since HM builds with -Werror by default, this causes a build failure, so + # we fetch the commit that fixed this issue upstream until it makes it into + # a release. + (fetchpatch { + name = "gcc16-unused-variable.patch"; + url = "https://vcgit.hhi.fraunhofer.de/jvet/HM/-/commit/884d704b9d04ac1728b2c6049174e47eb04987d2.patch"; + hash = "sha256-UqZf7XFTEOpfE0Uyyrq+ydScR9GzMgR+JQVeZGFjc1c="; + }) + ]; + postPatch = '' substituteInPlace CMakeLists.txt \ --replace-fail "-msse4.1" ""