From e4fbee50a49c59d8df706c657e8c7399f9fe86a5 Mon Sep 17 00:00:00 2001 From: ghpzin Date: Wed, 3 Dec 2025 11:02:34 +0300 Subject: [PATCH] skktools: fix build with gcc15 - add patch from merged upstream PR: https://www.github.com/skk-dev/skktools/pull/30 https://github.com/skk-dev/skktools/commit/fb6a295607dbe2b5171c2c89f8a2f0b82bee9766 Fixes build failure with gcc15: ``` ./skkdic-expr.c:359:13: error: too many arguments to function 'add_content_line'; expected 0, have 3 359 | if (add_content_line(new, content, NULL)) | ^~~~~~~~~~~~~~~~ ~~~ ./skkdic-expr.c:115:12: note: declared here 115 | static int add_content_line(); | ^~~~~~~~~~~~~~~~ ./skkdic-expr.c:576:9: error: too many arguments to function 'subtract_content_line'; expected 0, have 3 576 | subtract_content_line(new, content, NULL); | ^~~~~~~~~~~~~~~~~~~~~ ~~~ ./skkdic-expr.c:116:13: note: declared here 116 | static void subtract_content_line(); | ^~~~~~~~~~~~~~~~~~~~~ ``` --- pkgs/by-name/sk/skktools/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/sk/skktools/package.nix b/pkgs/by-name/sk/skktools/package.nix index 7fb5f1992a84..816b60adbcfe 100644 --- a/pkgs/by-name/sk/skktools/package.nix +++ b/pkgs/by-name/sk/skktools/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, pkg-config, gdbm, glib, @@ -34,6 +35,16 @@ stdenv.mkDerivation rec { # sha256 = "1k9zxqybl1l5h0a8px2awc920qrdyp1qls50h3kfrj3g65d08aq2"; # }; + patches = [ + # Fix build with gcc15 + # https://github.com/skk-dev/skktools/pull/30 + (fetchpatch { + name = "skktools-fix-function-prototype-empty-arguments-gcc15.patch"; + url = "https://github.com/skk-dev/skktools/commit/fb6a295607dbe2b5171c2c89f8a2f0b82bee9766.patch"; + hash = "sha256-wao2kRsDq5WN4JO/YpXhNirsdnA3vZpsY9GDCTPSJKY="; + }) + ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ gdbm