ibus-engines.rime: 1.4.0 -> 1.5.0

This commit is contained in:
Peng Mei Yu
2021-06-28 09:20:29 +08:00
parent 851848fcbc
commit 53f682ab15
@@ -1,36 +1,36 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, gdk-pixbuf, glib, ibus, libnotify
, librime, brise }:
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gdk-pixbuf
, glib
, ibus
, libnotify
, librime
, pkg-config
, rime-data
}:
stdenv.mkDerivation rec {
pname = "ibus-rime";
version = "1.4.0";
version = "1.5.0";
src = fetchFromGitHub {
owner = "rime";
repo = "ibus-rime";
rev = version;
sha256 = "0zbajz7i18vrqwdyclzywvsjg6qzaih64jhi3pkxp7mbw8jc5vhy";
sha256 = "0gdxg6ia0i31jn3cvh1nrsjga1j31hf8a2zfgg8rzn25chrfr319";
};
buildInputs = [ gdk-pixbuf glib ibus libnotify librime brise ];
buildInputs = [ gdk-pixbuf glib ibus libnotify librime rime-data ];
nativeBuildInputs = [ cmake pkg-config ];
makeFlags = [ "PREFIX=$(out)" ];
dontUseCmakeConfigure = true;
cmakeFlags = [ "-DRIME_DATA_DIR=${rime-data}/share/rime-data" ];
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
substituteInPlace CMakeLists.txt \
--replace 'DESTINATION "''${RIME_DATA_DIR}"' \
'DESTINATION "''${CMAKE_INSTALL_DATADIR}/rime-data"'
'';
meta = with lib; {