1 { lib, stdenv, fetchFromGitHub, cmake, boost, glog, leveldb, marisa, opencc,
2 yaml-cpp, gtest, capnproto, pkg-config, plugins ? [ ] }:
5 copySinglePlugin = plug: "cp -r ${plug} plugins/${plug.name}";
8 ${lib.concatMapStringsSep "\n" copySinglePlugin plugins}
12 stdenv.mkDerivation rec {
16 src = fetchFromGitHub {
20 sha256 = "sha256-4gEdltdm9A3FxwyZqgSyUWgQ934glinfKwHF8S05f5I=";
23 nativeBuildInputs = [ cmake pkg-config ];
25 buildInputs = [ boost glog leveldb marisa opencc yaml-cpp gtest capnproto ]
26 ++ plugins; # for propagated build inputs
28 preConfigure = copyPlugins;
31 homepage = "https://rime.im/";
32 description = "Rime Input Method Engine, the core library";
33 license = licenses.bsd3;
34 maintainers = with maintainers; [ vonfry ];
35 platforms = platforms.linux ++ platforms.darwin;