From ace318f71a1a3533130fbe1a133590b83674feea Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sat, 4 Jan 2025 21:39:12 +0200 Subject: [PATCH 1/5] 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 ffd3955a3181..8bf61a3f41b7 100644 --- a/pkgs/tools/inputmethods/uim/default.nix +++ b/pkgs/tools/inputmethods/uim/default.nix @@ -2,7 +2,6 @@ lib, stdenv, fetchFromGitHub, - fetchpatch, shared-mime-info, autoconf, automake, @@ -54,15 +53,15 @@ assert withFFI -> libffi != null; assert withMisc -> libeb != null; 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 = @@ -120,18 +119,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 = From 7746c557e021f62a5a2534a5898697b2562a6a40 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 5 Jan 2025 15:17:20 +0200 Subject: [PATCH 2/5] uim: switch to finalAttrs pattern --- pkgs/tools/inputmethods/uim/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/inputmethods/uim/default.nix b/pkgs/tools/inputmethods/uim/default.nix index 8bf61a3f41b7..0dafc37ab4e5 100644 --- a/pkgs/tools/inputmethods/uim/default.nix +++ b/pkgs/tools/inputmethods/uim/default.nix @@ -52,14 +52,14 @@ assert withNetworking -> curl != null && openssl != null; assert withFFI -> libffi != null; assert withMisc -> libeb != null; -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { version = "1.8.9"; pname = "uim"; src = fetchFromGitHub { owner = "uim"; repo = "uim"; - rev = version; + rev = finalAttrs.version; fetchSubmodules = true; hash = "sha256-OqbtuoV9xPg51BhboP4EtTZA2psd8sUk3l3RfvYtv3w="; }; @@ -165,14 +165,14 @@ stdenv.mkDerivation rec { dontUseCmakeConfigure = true; - meta = with lib; { - homepage = src.meta.homepage; + meta = { + inherit (finalAttrs.src.meta) homepage; description = "Multilingual input method framework"; - license = licenses.bsd3; - platforms = platforms.unix; - maintainers = with maintainers; [ + license = lib.licenses.bsd3; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ ericsagnes oxij ]; }; -} +}) From d391ef6798fd4383ef22602a33df4c0b4efd1b92 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 5 Jan 2025 15:22:54 +0200 Subject: [PATCH 3/5] uim: 1.8.9 -> 1.8.9-unstable-2024-12-09 Co-Authored-By: Emily --- pkgs/tools/inputmethods/uim/data-hook.patch | 70 +++++++++++---------- pkgs/tools/inputmethods/uim/default.nix | 10 +-- 2 files changed, 42 insertions(+), 38 deletions(-) diff --git a/pkgs/tools/inputmethods/uim/data-hook.patch b/pkgs/tools/inputmethods/uim/data-hook.patch index be80962527ba..9ae83b4f291b 100644 --- a/pkgs/tools/inputmethods/uim/data-hook.patch +++ b/pkgs/tools/inputmethods/uim/data-hook.patch @@ -1,38 +1,40 @@ ---- a/gtk2/immodule/Makefile.in 2015-11-24 16:21:08.967087208 +0900 -+++ b/gtk2/immodule/Makefile.in 2015-11-24 16:22:53.316095150 +0900 -@@ -928,7 +928,6 @@ +diff --git a/gtk2/immodule/Makefile.am b/gtk2/immodule/Makefile.am +index d219a5a4b0..331e127122 100644 +--- a/gtk2/immodule/Makefile.am ++++ b/gtk2/immodule/Makefile.am +@@ -37,6 +37,7 @@ + GTK_RC_GET_IMMODULE_FILE = $(top_builddir)/gtk2/immodule/gtk-rc-get-immodule-file + QUERY_COMMAND = gtk-query-immodules-2.0 - install-data-am: install-moduleLTLIBRARIES - @$(NORMAL_INSTALL) -- $(MAKE) $(AM_MAKEFLAGS) install-data-hook - install-dvi: install-dvi-am ++if FALSE + install-data-hook: gtk-rc-get-immodule-file + if test -z $(DESTDIR); then \ + if test $(libdir) = $(GTK_LIBDIR); then \ +@@ -82,6 +83,7 @@ + fi \ + fi \ + fi ++endif + else + install-data-hook: - install-dvi-am: -@@ -993,7 +992,7 @@ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ -- install-data-hook install-dvi install-dvi-am install-exec \ -+ install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-moduleLTLIBRARIES \ - install-pdf install-pdf-am install-ps install-ps-am \ ---- a/gtk3/immodule/Makefile.in 2015-11-24 16:21:08.971087209 +0900 -+++ b/gtk3/immodule/Makefile.in 2015-11-24 16:23:28.251097832 +0900 -@@ -896,7 +896,6 @@ +diff --git a/gtk3/immodule/Makefile.am b/gtk3/immodule/Makefile.am +index de58b88916..d519b03b1d 100644 +--- a/gtk3/immodule/Makefile.am ++++ b/gtk3/immodule/Makefile.am +@@ -39,6 +39,7 @@ - install-data-am: install-moduleLTLIBRARIES - @$(NORMAL_INSTALL) -- $(MAKE) $(AM_MAKEFLAGS) install-data-hook - install-dvi: install-dvi-am + QUERY_COMMAND = gtk-query-immodules-3.0 + ++if FALSE + install-data-hook: + if test -z $(DESTDIR); then \ + if test $(libdir) = $(GTK3_LIBDIR); then \ +@@ -74,6 +75,7 @@ + fi \ + fi \ + fi ++endif + else + install-data-hook: - install-dvi-am: -@@ -959,7 +958,7 @@ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ -- install-data install-data-am install-data-hook install-dvi \ -+ install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-moduleLTLIBRARIES install-pdf install-pdf-am \ diff --git a/pkgs/tools/inputmethods/uim/default.nix b/pkgs/tools/inputmethods/uim/default.nix index 0dafc37ab4e5..7f7c6e596c98 100644 --- a/pkgs/tools/inputmethods/uim/default.nix +++ b/pkgs/tools/inputmethods/uim/default.nix @@ -53,15 +53,17 @@ assert withFFI -> libffi != null; assert withMisc -> libeb != null; stdenv.mkDerivation (finalAttrs: { - version = "1.8.9"; + # Includes multiple GCC 14 related fixes, and other bugs. Last 1.8.9 release + # was in August 2022 - too long ago. + version = "1.8.9-unstable-2024-12-09"; pname = "uim"; src = fetchFromGitHub { owner = "uim"; repo = "uim"; - rev = finalAttrs.version; + rev = "b6803aa7ea433f92855284ec832aeff957c63904"; fetchSubmodules = true; - hash = "sha256-OqbtuoV9xPg51BhboP4EtTZA2psd8sUk3l3RfvYtv3w="; + hash = "sha256-7Ng9IPF6xN1Zb9uEacq7SUhpJc1jWzneVSbbjyqL6g4="; }; nativeBuildInputs = @@ -103,7 +105,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional withFFI libffi ++ lib.optional withMisc libeb; - prePatch = '' + postPatch = '' patchShebangs *.sh */*.sh */*/*.sh # configure sigscheme in maintainer mode or else some function tables won't get autogenerated From 45d1190f0885e6173f5a0e5f217f44ada241e605 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 5 Jan 2025 15:41:44 +0200 Subject: [PATCH 4/5] uim: use --replace-fail for substitution in postPatch --- pkgs/tools/inputmethods/uim/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/inputmethods/uim/default.nix b/pkgs/tools/inputmethods/uim/default.nix index 7f7c6e596c98..0ed18e738a30 100644 --- a/pkgs/tools/inputmethods/uim/default.nix +++ b/pkgs/tools/inputmethods/uim/default.nix @@ -110,8 +110,9 @@ stdenv.mkDerivation (finalAttrs: { # configure sigscheme in maintainer mode or else some function tables won't get autogenerated substituteInPlace configure.ac \ - --replace "--with-master-pkg=uim --enable-conf=uim" \ - "--enable-maintainer-mode --with-master-pkg=uim --enable-conf=uim" + --replace-fail \ + "--with-master-pkg=uim --enable-conf=uim" \ + "--enable-maintainer-mode --with-master-pkg=uim --enable-conf=uim" # generate ./configure files (cd sigscheme/libgcroots; ./autogen.sh) From ce82a3b448115bf134554806b9eab8cb197b1e26 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 5 Jan 2025 15:47:20 +0200 Subject: [PATCH 5/5] mlterm: fix build with GCC 14 --- .../terminal-emulators/mlterm/default.nix | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkgs/applications/terminal-emulators/mlterm/default.nix b/pkgs/applications/terminal-emulators/mlterm/default.nix index 5413ee142692..28ceeb21b834 100644 --- a/pkgs/applications/terminal-emulators/mlterm/default.nix +++ b/pkgs/applications/terminal-emulators/mlterm/default.nix @@ -2,6 +2,7 @@ stdenv, lib, fetchFromGitHub, + fetchpatch, pkg-config, autoconf, makeDesktopItem, @@ -110,6 +111,25 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "sha256-gfs5cdwUUwSBWwJJSaxrQGWJvLkI27RMlk5QvDALEDg="; }; + patches = [ + (fetchpatch { + name = "mlterm-configure-implicit-function-declaration.patch"; + url = "https://github.com/arakiken/mlterm/commit/1a9ee97e4574c5892bf12090b812b0538dcdf8f2.patch"; + hash = "sha256-Kk+x5LAq+beZWE8yj5WfdS82ConLSgxNquzQd5mvOA4="; + }) + + (fetchpatch { + name = "mlterm-wayland-implicit-function-declaration.patch"; + url = "https://github.com/arakiken/mlterm/commit/20ab931d5055dc5835154a75ca672fade478549f.patch"; + hash = "sha256-rDmQ0e3dQD7UAGTX4ljOrDqTTddBqvnnRFnqDjRLAss="; + }) + + (fetchpatch { + url = "https://salsa.debian.org/debian/mlterm/-/raw/d9b1555e9220985e0c89a6ff5a0d58f7b18cc123/debian/patches/fix-incompat-pointer-types.patch"; + hash = "sha256-EcI15FjQfcN8pcE1MqsBfaHQ4j+gyoeesN/WoHb7WnU="; + }) + ]; + nativeBuildInputs = [ pkg-config