Merge pull request #151282 from Vonfry/librime/support-plugins-by-parameter

librime: add support of plugins
This commit is contained in:
Bobby Rong
2021-12-21 23:24:31 +08:00
committed by GitHub
+13 -3
View File
@@ -1,6 +1,13 @@
{ lib, stdenv, fetchFromGitHub, cmake, boost, glog, leveldb, marisa, opencc,
libyamlcpp, gtest, capnproto, pkg-config }:
libyamlcpp, gtest, capnproto, pkg-config, plugins ? [ ] }:
let
copySinglePlugin = plug: "cp -r ${plug} plugins/${plug.name}";
copyPlugins = ''
${lib.concatMapStringsSep "\n" copySinglePlugin plugins}
chmod +w -R plugins/*
'';
in
stdenv.mkDerivation rec {
pname = "librime";
version = "1.7.3";
@@ -14,13 +21,16 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ boost glog leveldb marisa opencc libyamlcpp gtest capnproto ];
buildInputs = [ boost glog leveldb marisa opencc libyamlcpp gtest capnproto ]
++ plugins; # for propagated build inputs
preConfigure = copyPlugins;
meta = with lib; {
homepage = "https://rime.im/";
description = "Rime Input Method Engine, the core library";
license = licenses.bsd3;
maintainers = with maintainers; [ sifmelcara ];
maintainers = with maintainers; [ vonfry ];
platforms = platforms.linux;
};
}