From 7d7822699bb80d883e3a9f8ed4d91b1602441a79 Mon Sep 17 00:00:00 2001 From: Atemu Date: Sat, 4 Jan 2025 20:10:28 +0100 Subject: [PATCH 1/4] uim: use gcc13 gcc14 would throw: ``` libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../uim -I../replace -I../uim -g -O2 -pedantic -pipe -Wall -Wchar-subscripts -Wmissing-declarations -Wredundant-decls -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wno-long-long -Wno-overlength-strings -DNDEBUG -c bsd-snprintf.c -fPIC -DPIC -o .libs/bsd-snprintf.o bsd-snprintf.c: In function 'dopr': bsd-snprintf.c:104:38: error: assignment to expression with array type 104 | # define VA_COPY(dest, src) (dest) = (src) | ^ bsd-snprintf.c:186:9: note: in expansion of macro 'VA_COPY' 186 | VA_COPY(args, args_in); | ^~~~~~~ ``` and I don't have the motivation to debug autohell crap. --- pkgs/tools/inputmethods/uim/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/inputmethods/uim/default.nix b/pkgs/tools/inputmethods/uim/default.nix index ffd3955a3181..e8ebb749c097 100644 --- a/pkgs/tools/inputmethods/uim/default.nix +++ b/pkgs/tools/inputmethods/uim/default.nix @@ -1,6 +1,7 @@ -{ +args@{ lib, stdenv, + gcc13Stdenv, fetchFromGitHub, fetchpatch, shared-mime-info, @@ -53,6 +54,10 @@ assert withNetworking -> curl != null && openssl != null; assert withFFI -> libffi != null; assert withMisc -> libeb != null; +let + stdenv = if args.stdenv.cc.isGNU then args.gcc13Stdenv else args.stdenv; +in + stdenv.mkDerivation rec { version = "1.8.8"; pname = "uim"; From 72a3f36080cc001c1454801492d4acb85f68a231 Mon Sep 17 00:00:00 2001 From: Atemu Date: Sat, 4 Jan 2025 20:13:26 +0100 Subject: [PATCH 2/4] uim: enableParallelBuilding = false Most of the time is wasted in autohell scripts anyays and it doesn't work: the build fails to relink some objects. Explicitly disable parallel building. --- pkgs/tools/inputmethods/uim/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/inputmethods/uim/default.nix b/pkgs/tools/inputmethods/uim/default.nix index e8ebb749c097..c7d73bd0e266 100644 --- a/pkgs/tools/inputmethods/uim/default.nix +++ b/pkgs/tools/inputmethods/uim/default.nix @@ -181,6 +181,8 @@ stdenv.mkDerivation rec { export XDG_DATA_DIRS="${shared-mime-info}/share" ''; + enableParallelBuilding = false; + dontUseCmakeConfigure = true; meta = with lib; { From f106f7099527e16b9bb8221106340f012c2e6986 Mon Sep 17 00:00:00 2001 From: Atemu Date: Sat, 4 Jan 2025 20:23:16 +0100 Subject: [PATCH 3/4] mlterm: use gcc13 It fails to compile in a way that is probably only comprehensible to exactly one person on earth which is upstream. --- pkgs/applications/terminal-emulators/mlterm/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/terminal-emulators/mlterm/default.nix b/pkgs/applications/terminal-emulators/mlterm/default.nix index 5413ee142692..95d63d772459 100644 --- a/pkgs/applications/terminal-emulators/mlterm/default.nix +++ b/pkgs/applications/terminal-emulators/mlterm/default.nix @@ -1,5 +1,6 @@ -{ +args@{ stdenv, + gcc13Stdenv, lib, fetchFromGitHub, pkg-config, @@ -98,6 +99,7 @@ let commaSepList = lib.concatStringsSep "," (builtins.attrNames (lib.filterAttrs (n: v: v) attrset)); in lib.withFeatureAs (commaSepList != "") featureName commaSepList; + stdenv = if args.stdenv.cc.isGNU then args.gcc13Stdenv else args.stdenv; in stdenv.mkDerivation (finalAttrs: { pname = "mlterm"; From 75f5ce8906b8711379574cd84c8ef669d4d4269a Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sat, 4 Jan 2025 21:39:12 +0200 Subject: [PATCH 4/4] uim: 1.8.8 -> 1.8.9 --- pkgs/tools/inputmethods/uim/default.nix | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/pkgs/tools/inputmethods/uim/default.nix b/pkgs/tools/inputmethods/uim/default.nix index c7d73bd0e266..94fac0cb443f 100644 --- a/pkgs/tools/inputmethods/uim/default.nix +++ b/pkgs/tools/inputmethods/uim/default.nix @@ -3,7 +3,6 @@ args@{ stdenv, gcc13Stdenv, fetchFromGitHub, - fetchpatch, shared-mime-info, autoconf, automake, @@ -59,15 +58,15 @@ let in stdenv.mkDerivation rec { - version = "1.8.8"; + version = "1.8.9"; pname = "uim"; src = fetchFromGitHub { owner = "uim"; repo = "uim"; - rev = "2c0958c9c505a87e70e344c2192e2e5123c71ea5"; + rev = version; fetchSubmodules = true; - sha256 = "1hkjxi5r49gcna37m3jvykny5hz9ram4y8a3q7lw4qzr52mz9pdp"; + hash = "sha256-OqbtuoV9xPg51BhboP4EtTZA2psd8sUk3l3RfvYtv3w="; }; nativeBuildInputs = @@ -125,18 +124,6 @@ stdenv.mkDerivation rec { patches = [ ./data-hook.patch - - # Pull upstream fix for -fno-common toolchains - # https://github.com/uim/libgcroots/pull/4 - (fetchpatch { - name = "libgcroots-fno-common.patch"; - url = "https://github.com/uim/libgcroots/commit/7e39241344ad0663409e836560ae6b5eb231e1fc.patch"; - sha256 = "0iifcl5lk8bvl0cflm47gkymg88aiwzj0gxh2aj3mqlyhvyx78nz"; - # Patch comes from git submodule. Relocate as: - # a/include/private/gc_priv.h -> a/sigscheme/libgcroots/include/private/gc_priv.h - stripLen = 1; - extraPrefix = "sigscheme/libgcroots/"; - }) ]; configureFlags =