diff options
Diffstat (limited to 'pkgs/tools/inputmethods')
5 files changed, 57 insertions, 60 deletions
diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix index 202886e4e8e1..5311d20ffa32 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix @@ -1,19 +1,19 @@ { lib -, mkDerivation +, stdenv , fetchFromGitHub , cmake , extra-cmake-modules , fcitx5 -, qtx11extras -, libxcb -, libXdmcp , qtbase -, qt6 +, qtwayland +, wrapQtAppsHook , wayland }: - -mkDerivation rec { - pname = "fcitx5-qt"; +let + majorVersion = lib.versions.major qtbase.version; +in +stdenv.mkDerivation rec { + pname = "fcitx5-qt${majorVersion}"; version = "5.1.4"; src = fetchFromGitHub { @@ -23,30 +23,28 @@ mkDerivation rec { sha256 = "sha256-bVH2US/uEZGERslnAh/fyUbzR9fK1UfG4J+mOmrIE8Y="; }; - preConfigure = '' - substituteInPlace qt5/platforminputcontext/CMakeLists.txt \ - --replace \$"{CMAKE_INSTALL_QT5PLUGINDIR}" $out/${qtbase.qtPluginPrefix} - substituteInPlace qt6/platforminputcontext/CMakeLists.txt \ - --replace \$"{CMAKE_INSTALL_QT6PLUGINDIR}" $out/${qt6.qtbase.qtPluginPrefix} + postPatch = '' + substituteInPlace qt${majorVersion}/platforminputcontext/CMakeLists.txt \ + --replace \$"{CMAKE_INSTALL_QT${majorVersion}PLUGINDIR}" $out/${qtbase.qtPluginPrefix} ''; cmakeFlags = [ - # adding qt6 to buildInputs would result in error: detected mismatched Qt dependencies - "-DCMAKE_PREFIX_PATH=${qt6.qtbase};${qt6.qtwayland}" - "-DENABLE_QT4=0" - "-DENABLE_QT6=1" + "-DENABLE_QT4=OFF" + "-DENABLE_QT5=OFF" + "-DENABLE_QT6=OFF" + "-DENABLE_QT${majorVersion}=ON" ]; nativeBuildInputs = [ cmake extra-cmake-modules + wrapQtAppsHook ]; buildInputs = [ + qtbase + qtwayland fcitx5 - qtx11extras - libxcb - libXdmcp wayland ]; diff --git a/pkgs/tools/inputmethods/fcitx5/with-addons.nix b/pkgs/tools/inputmethods/fcitx5/with-addons.nix index 75fac87b6285..614074595f51 100644 --- a/pkgs/tools/inputmethods/fcitx5/with-addons.nix +++ b/pkgs/tools/inputmethods/fcitx5/with-addons.nix @@ -4,7 +4,8 @@ , fcitx5 , withConfigtool ? true , fcitx5-configtool -, fcitx5-qt +, libsForQt5 +, qt6Packages , fcitx5-gtk , addons ? [ ] }: @@ -14,7 +15,8 @@ symlinkJoin { paths = [ fcitx5 - fcitx5-qt + libsForQt5.fcitx5-qt + qt6Packages.fcitx5-qt fcitx5-gtk ] ++ lib.optionals withConfigtool [ fcitx5-configtool diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix index ab71af957481..0107e8755880 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix @@ -13,11 +13,11 @@ stdenv.mkDerivation rec { pname = "ibus-anthy"; - version = "1.5.15"; + version = "1.5.16"; src = fetchurl { url = "https://github.com/ibus/ibus-anthy/releases/download/${version}/${pname}-${version}.tar.gz"; - sha256 = "sha256-WMTm1YNqSsnjOqnoTljE3rZ62pjztUSyRAxXgyN+2Ys="; + sha256 = "sha256-FVIiFLWK2ISsydmx2hPxXbfc12w7GKiFCQRuXsYT0a4="; }; buildInputs = [ diff --git a/pkgs/tools/inputmethods/ibus/build-without-dbus-launch.patch b/pkgs/tools/inputmethods/ibus/build-without-dbus-launch.patch index cb587ccf47d8..cff6787667fa 100644 --- a/pkgs/tools/inputmethods/ibus/build-without-dbus-launch.patch +++ b/pkgs/tools/inputmethods/ibus/build-without-dbus-launch.patch @@ -1,19 +1,24 @@ diff --git a/data/dconf/make-dconf-override-db.sh b/data/dconf/make-dconf-override-db.sh -index 601c1c3f..fcb7305d 100755 +index 32cb1530..375baa41 100755 --- a/data/dconf/make-dconf-override-db.sh +++ b/data/dconf/make-dconf-override-db.sh -@@ -12,10 +12,6 @@ export XDG_CACHE_HOME="$TMPDIR/cache" +@@ -12,15 +12,6 @@ export XDG_CACHE_HOME="$TMPDIR/cache" export GSETTINGS_SCHEMA_DIR="$TMPDIR/schemas" mkdir -p $XDG_CONFIG_HOME $XDG_CACHE_HOME $GSETTINGS_SCHEMA_DIR -eval `dbus-launch --sh-syntax` - --trap 'rm -rf $TMPDIR; kill $DBUS_SESSION_BUS_PID' ERR +-trap cleanup EXIT +- +-cleanup() { +- test $? -eq 0 && exit +- rm -rf $TMPDIR; kill $DBUS_SESSION_BUS_PID +-} - # in case that schema is not installed on the system glib-compile-schemas --targetdir "$GSETTINGS_SCHEMA_DIR" "$PWD" -@@ -52,5 +48,3 @@ if [ -d $TMPDIR/cache/gvfs ] ; then +@@ -57,5 +48,3 @@ if [ -d $TMPDIR/cache/gvfs ] ; then umount $TMPDIR/cache/gvfs fi rm -rf $TMPDIR diff --git a/pkgs/tools/inputmethods/ibus/default.nix b/pkgs/tools/inputmethods/ibus/default.nix index 417b1be605d5..5de2fc67d020 100644 --- a/pkgs/tools/inputmethods/ibus/default.nix +++ b/pkgs/tools/inputmethods/ibus/default.nix @@ -1,7 +1,7 @@ -{ lib, stdenv +{ lib +, stdenv , substituteAll , fetchFromGitHub -, fetchpatch , autoreconfHook , gettext , makeWrapper @@ -17,6 +17,7 @@ , gtk3 , gtk4 , gtk-doc +, libdbusmenu-gtk3 , runCommand , isocodes , cldr-annotations @@ -26,7 +27,7 @@ , json-glib , libnotify ? null , enableUI ? true -, withWayland ? false +, withWayland ? true , libxkbcommon , wayland , buildPackages @@ -46,23 +47,24 @@ let }; # make-dconf-override-db.sh needs to execute dbus-launch in the sandbox, # it will fail to read /etc/dbus-1/session.conf unless we add this flag - dbus-launch = runCommand "sandbox-dbus-launch" { - nativeBuildInputs = [ makeWrapper ]; - } '' - makeWrapper ${dbus}/bin/dbus-launch $out/bin/dbus-launch \ - --add-flags --config-file=${dbus}/share/dbus-1/session.conf + dbus-launch = runCommand "sandbox-dbus-launch" + { + nativeBuildInputs = [ makeWrapper ]; + } '' + makeWrapper ${dbus}/bin/dbus-launch $out/bin/dbus-launch \ + --add-flags --config-file=${dbus}/share/dbus-1/session.conf ''; in stdenv.mkDerivation rec { pname = "ibus"; - version = "1.5.28"; + version = "1.5.29"; src = fetchFromGitHub { owner = "ibus"; repo = "ibus"; rev = version; - sha256 = "sha256-zjV+QkhVkrHFs9Vt1FpbvmS4nRHxwKaKU3mQkSgyLaQ="; + sha256 = "sha256-d4EUIg0v8rfHdvzG5USc6GLY6QHtQpIJp1PrPaaBxxE="; }; patches = [ @@ -72,27 +74,17 @@ stdenv.mkDerivation rec { pythonSitePackages = python3.sitePackages; }) ./build-without-dbus-launch.patch - # unicode and emoji input are broken before 1.5.29 - # https://github.com/NixOS/nixpkgs/issues/226526 - (fetchpatch { - url = "https://github.com/ibus/ibus/commit/7c8abbe89403c2fcb08e3fda42049a97187e53ab.patch"; - hash = "sha256-59HzAdLq8ahrF7K+tFGLjTodwIiTkJGEkFe8quqIkhU="; - }) - # fix SIGABRT in X11 https://github.com/ibus/ibus/issues/2484 - (fetchpatch { - url = "https://github.com/ibus/ibus/commit/8f706d160631f1ffdbfa16543a38b9d5f91c16ad.patch"; - hash = "sha256-YzS9TmUWW0OmheDeCeU00kFK2U2QEmKYMSRJAbu14ec="; - }) - # fix missing key releases in Wine https://github.com/ibus/ibus/issues/2480 - (fetchpatch { - url = "https://github.com/ibus/ibus/commit/497f0c74230a65309e22ce5569060ce48310406b.patch"; - hash = "sha256-PAZcUxmzjChs1/K8hXgOcytyS4LYoNL1dtU6X5Tx8ic="; - }) ]; outputs = [ "out" "dev" "installedTests" ]; postPatch = '' + # Maintainer does not want to create separate tarballs for final release candidate and release versions, + # so we need to set `ibus_released` to `1` in `configure.ac`. Otherwise, anyone running `ibus version` gets + # a version with an inaccurate `-rcX` suffix. + # https://github.com/ibus/ibus/issues/2584 + substituteInPlace configure.ac --replace "m4_define([ibus_released], [0])" "m4_define([ibus_released], [1])" + patchShebangs --build data/dconf/make-dconf-override-db.sh cp ${buildPackages.gtk-doc}/share/gtk-doc/data/gtk-doc.make . substituteInPlace bus/services/org.freedesktop.IBus.session.GNOME.service.in --replace "ExecStart=sh" "ExecStart=${runtimeShell}" @@ -102,6 +94,11 @@ stdenv.mkDerivation rec { preAutoreconf = "touch ChangeLog"; configureFlags = [ + # The `AX_PROG_{CC,CXX}_FOR_BUILD` autoconf macros can pick up unwrapped GCC binaries, + # so we set `{CC,CXX}_FOR_BUILD` to override that behavior. + # https://github.com/NixOS/nixpkgs/issues/21751 + "CC_FOR_BUILD=${stdenv.cc}/bin/cc" + "CXX_FOR_BUILD=${stdenv.cc}/bin/c++" "--disable-memconf" (lib.enableFeature (dconf != null) "dconf") (lib.enableFeature (libnotify != null) "libnotify") @@ -115,12 +112,6 @@ stdenv.mkDerivation rec { "--with-ucd-dir=${unicode-character-database}/share/unicode" ]; - # missing make dependency - # https://github.com/NixOS/nixpkgs/pull/218120#issuecomment-1514027173 - preBuild = '' - make -C src ibusenumtypes.h - ''; - makeFlags = [ "test_execsdir=${placeholder "installedTests"}/libexec/installed-tests/ibus" "test_sourcesdir=${placeholder "installedTests"}/share/installed-tests/ibus" @@ -154,6 +145,7 @@ stdenv.mkDerivation rec { isocodes json-glib libnotify + libdbusmenu-gtk3 ] ++ lib.optionals withWayland [ libxkbcommon wayland |