From c97f91a5a25b7706c4622438878852cdf92ff767 Mon Sep 17 00:00:00 2001 From: alyaeanyx Date: Sat, 17 May 2025 18:29:57 +0200 Subject: [PATCH] tilda: fix build Upstream manually sets the standard to c99 in configure.ac, which makes the popen and pclose invocations in src/tilda-lock-files.c produce implicit function declaration errors. --- pkgs/by-name/ti/tilda/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/ti/tilda/package.nix b/pkgs/by-name/ti/tilda/package.nix index ac9ad26a3a83..5a8e141290e2 100644 --- a/pkgs/by-name/ti/tilda/package.nix +++ b/pkgs/by-name/ti/tilda/package.nix @@ -42,6 +42,12 @@ stdenv.mkDerivation (finalAttrs: { # ugly hack for xgettext to work during build env.LD_LIBRARY_PATH = "${lib.getLib expat}/lib"; + # with -std=c99, the build fails due to implicit function declaration errors + # for the popen() and pclose() calls in src/tilda-lock-files.c + postPatch = '' + substituteInPlace configure.ac --replace-fail -std=c99 -std=gnu99 + ''; + # The config locking scheme relies on the binary being called "tilda" # (`pgrep -C tilda`), so a simple `wrapProgram` won't suffice: postInstall = ''