2021-07-04 02:40:35 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gdk-pixbuf
|
|
|
|
, glib
|
|
|
|
, ibus
|
|
|
|
, libnotify
|
|
|
|
, librime
|
|
|
|
, pkg-config
|
|
|
|
, rime-data
|
|
|
|
}:
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ibus-rime";
|
2021-07-04 02:40:35 +00:00
|
|
|
version = "1.5.0";
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rime";
|
|
|
|
repo = "ibus-rime";
|
|
|
|
rev = version;
|
2021-07-04 02:40:35 +00:00
|
|
|
sha256 = "0gdxg6ia0i31jn3cvh1nrsjga1j31hf8a2zfgg8rzn25chrfr319";
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
buildInputs = [ gdk-pixbuf glib ibus libnotify librime rime-data ];
|
2020-12-03 08:41:04 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
cmakeFlags = [ "-DRIME_DATA_DIR=${rime-data}/share/rime-data" ];
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
prePatch = ''
|
2021-07-04 02:40:35 +00:00
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace 'DESTINATION "''${RIME_DATA_DIR}"' \
|
|
|
|
'DESTINATION "''${CMAKE_INSTALL_DATADIR}/rime-data"'
|
2020-12-03 08:41:04 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-03 08:41:04 +00:00
|
|
|
isIbusEngine = true;
|
|
|
|
description = "Rime input method engine for IBus";
|
|
|
|
homepage = "https://rime.im/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ pengmeiyu ];
|
|
|
|
};
|
|
|
|
}
|