From 51b9d7ebc86018d1372fdd87eb3e278f14a90154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Sun, 25 May 2025 12:32:14 +0000 Subject: [PATCH] libe57format: Disable LTO to fix linker error in downstream builds that use `.a` file. See https://github.com/asmaloney/libE57Format/pull/313#issuecomment-2907797367 --- pkgs/by-name/li/libe57format/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/li/libe57format/package.nix b/pkgs/by-name/li/libe57format/package.nix index bf391abd82d83..e442fa7a90561 100644 --- a/pkgs/by-name/li/libe57format/package.nix +++ b/pkgs/by-name/li/libe57format/package.nix @@ -51,6 +51,10 @@ stdenv.mkDerivation (finalAttrs: { ]; cmakeFlags = [ + # Without this, LTO will be enabled, which seems to cause + # errors when consumers try to link the `.a` file, see: + # https://github.com/asmaloney/libE57Format/pull/313#issuecomment-2907797367 + "-DE57_RELEASE_LTO=OFF" # See https://github.com/asmaloney/libE57Format/blob/9372bdea8db2cc0c032a08f6d655a53833d484b8/test/README.md ( if finalAttrs.finalPackage.doCheck then