From ab51a89504f0372d06b2308d9f7d46f044173446 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 28 Jan 2026 21:07:47 +0000 Subject: [PATCH] bitlbee-mastodon: fix `gcc-15` build Without the change the build fails on `master` as https://hydra.nixos.org/build/319885265: mastodon-lib.c:2096:28: error: 'bool' cannot be used here 2096 | static char *yes_or_no(int bool) | ^~~~ --- pkgs/by-name/bi/bitlbee-mastodon/gcc-15.patch | 17 +++++++++++++++++ pkgs/by-name/bi/bitlbee-mastodon/package.nix | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/by-name/bi/bitlbee-mastodon/gcc-15.patch diff --git a/pkgs/by-name/bi/bitlbee-mastodon/gcc-15.patch b/pkgs/by-name/bi/bitlbee-mastodon/gcc-15.patch new file mode 100644 index 000000000000..d6d502ac70fb --- /dev/null +++ b/pkgs/by-name/bi/bitlbee-mastodon/gcc-15.patch @@ -0,0 +1,17 @@ +https://github.com/kensanata/bitlbee-mastodon/pull/61 + +FIx gcc-15 build (`bool` collision). +--- a/src/mastodon-lib.c ++++ b/src/mastodon-lib.c +@@ -2093,9 +2093,9 @@ static char *indent(int n) + /** + * Return a static yes or no string. No deallocation needed. + */ +-static char *yes_or_no(int bool) ++static char *yes_or_no(int b) + { +- return bool ? "yes" : "no"; ++ return b ? "yes" : "no"; + } + + /** diff --git a/pkgs/by-name/bi/bitlbee-mastodon/package.nix b/pkgs/by-name/bi/bitlbee-mastodon/package.nix index 10d6b239e2cb..6e8b8c7e7984 100644 --- a/pkgs/by-name/bi/bitlbee-mastodon/package.nix +++ b/pkgs/by-name/bi/bitlbee-mastodon/package.nix @@ -17,6 +17,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-8vmq/YstuBYUxe00P4NrxD/eMYI++R9uvn1sCcMTr7I="; }; + patches = [ + # gcc-15 build fix: https://github.com/kensanata/bitlbee-mastodon/pull/61 + ./gcc-15.patch + ]; + nativeBuildInputs = [ autoreconfHook pkg-config