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 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 ffd3955a3181..0ed18e738a30 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, @@ -53,16 +52,18 @@ assert withNetworking -> curl != null && openssl != null; assert withFFI -> libffi != null; assert withMisc -> libeb != null; -stdenv.mkDerivation rec { - version = "1.8.8"; +stdenv.mkDerivation (finalAttrs: { + # 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 = "2c0958c9c505a87e70e344c2192e2e5123c71ea5"; + rev = "b6803aa7ea433f92855284ec832aeff957c63904"; fetchSubmodules = true; - sha256 = "1hkjxi5r49gcna37m3jvykny5hz9ram4y8a3q7lw4qzr52mz9pdp"; + hash = "sha256-7Ng9IPF6xN1Zb9uEacq7SUhpJc1jWzneVSbbjyqL6g4="; }; nativeBuildInputs = @@ -104,13 +105,14 @@ stdenv.mkDerivation rec { ++ 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 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) @@ -120,18 +122,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 = @@ -178,14 +168,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 ]; }; -} +})