depot/third_party/nixpkgs/pkgs/development/libraries/librime/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

38 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, boost, glog, leveldb, marisa, opencc,
yaml-cpp, gtest, capnproto, pkg-config, librime-lua, librime-octagram,
plugins ? [ librime-lua librime-octagram ] }:
let
copySinglePlugin = plug: "cp -r ${plug} plugins/${plug.name}";
copyPlugins = ''
mkdir -p plugins
${lib.concatMapStringsSep "\n" copySinglePlugin plugins}
chmod +w -R plugins/*
'';
in
stdenv.mkDerivation rec {
pname = "librime";
version = "1.11.2";
src = fetchFromGitHub {
owner = "rime";
repo = pname;
rev = version;
sha256 = "sha256-QHuzpitxSYQ4EcBPY1f0R5zl4UFtefu0bFXA76Iv+j0=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ boost glog leveldb marisa opencc yaml-cpp 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; [ vonfry ];
platforms = platforms.linux ++ platforms.darwin;
};
}