From ea6976156af61078e1862d0311ffdc9845d50578 Mon Sep 17 00:00:00 2001 From: Peng Mei Yu Date: Wed, 13 May 2020 18:13:53 +0800 Subject: [PATCH 1/2] maintainers: Add pengmeiyu --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 1967e7bee86f..8f01887a9a24 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6759,6 +6759,12 @@ githubId = 8641; name = "Pierre Carrier"; }; + pengmeiyu = { + email = "pengmyu@gmail.com"; + github = "pmeiyu"; + githubId = 8529551; + name = "Peng Mei Yu"; + }; penguwin = { email = "penguwin@penguwin.eu"; github = "penguwin"; From a23830fb970fad0f1c19f5225fe8f8450e4ca410 Mon Sep 17 00:00:00 2001 From: Peng Mei Yu Date: Wed, 13 May 2020 18:20:46 +0800 Subject: [PATCH 2/2] ibus-engines.rime: init at 1.4.0 --- .../ibus-engines/ibus-rime/default.nix | 44 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix new file mode 100644 index 000000000000..03a801abbeb0 --- /dev/null +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchFromGitHub, cmake, pkg-config, gdk-pixbuf, glib, ibus, libnotify +, librime, brise }: + +stdenv.mkDerivation rec { + pname = "ibus-rime"; + version = "1.4.0"; + + src = fetchFromGitHub { + owner = "rime"; + repo = "ibus-rime"; + rev = version; + sha256 = "0zbajz7i18vrqwdyclzywvsjg6qzaih64jhi3pkxp7mbw8jc5vhy"; + }; + + buildInputs = [ gdk-pixbuf glib ibus libnotify librime brise ]; + nativeBuildInputs = [ cmake pkg-config ]; + + makeFlags = [ "PREFIX=$(out)" ]; + dontUseCmakeConfigure = true; + + prePatch = '' + substituteInPlace Makefile \ + --replace 'cmake' 'cmake -DRIME_DATA_DIR=${brise}/share/rime-data' + + substituteInPlace rime_config.h \ + --replace '/usr' $out + + substituteInPlace rime_config.h \ + --replace 'IBUS_RIME_SHARED_DATA_DIR IBUS_RIME_INSTALL_PREFIX' \ + 'IBUS_RIME_SHARED_DATA_DIR "${brise}"' + + substituteInPlace rime.xml \ + --replace '/usr' $out + ''; + + meta = with stdenv.lib; { + isIbusEngine = true; + description = "Rime input method engine for IBus"; + homepage = "https://rime.im/"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ pengmeiyu ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7c7d2fbb6241..a62078421aaa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3035,6 +3035,8 @@ in protobuf = pkgs.protobuf3_8.overrideDerivation (oldAttrs: { stdenv = clangStdenv; }); }; + rime = callPackage ../tools/inputmethods/ibus-engines/ibus-rime { }; + table = callPackage ../tools/inputmethods/ibus-engines/ibus-table { }; table-chinese = callPackage ../tools/inputmethods/ibus-engines/ibus-table-chinese {