nixpkgs/pkgs/by-name/op/opencc/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.3 KiB
Nix
Raw Normal View History

2024-04-27 02:00:24 +00:00
{
lib,
stdenv,
fetchFromGitHub,
cmake,
python3,
2024-04-27 02:03:27 +00:00
opencc,
rapidjson,
2024-09-23 16:51:36 +00:00
gitUpdater,
2024-04-27 02:00:24 +00:00
}:
2016-11-08 18:29:43 +00:00
2020-02-08 22:12:17 +00:00
stdenv.mkDerivation rec {
pname = "opencc";
2024-10-17 07:02:25 +00:00
version = "1.1.9";
2020-02-08 22:12:17 +00:00
src = fetchFromGitHub {
owner = "BYVoid";
repo = "OpenCC";
rev = "ver.${version}";
2024-10-17 07:02:25 +00:00
sha256 = "sha256-JBTegQs9ALp4LdKKYMNp9GYEgqR9O8IkX6LqatvaTic=";
2016-11-08 18:29:43 +00:00
};
2024-04-27 02:03:27 +00:00
nativeBuildInputs =
[
cmake
python3
]
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
opencc # opencc_dict
];
2016-11-08 18:29:43 +00:00
buildInputs = [
rapidjson
];
# TODO use more system dependencies
cmakeFlags = [
(lib.cmakeBool "USE_SYSTEM_RAPIDJSON" true)
];
2024-09-23 16:51:36 +00:00
passthru = {
updateScript = gitUpdater { rev-prefix = "ver."; };
};
meta = with lib; {
2020-02-08 22:12:17 +00:00
homepage = "https://github.com/BYVoid/OpenCC";
2016-11-08 18:29:43 +00:00
license = licenses.asl20;
description = "Project for conversion between Traditional and Simplified Chinese";
longDescription = ''
Open Chinese Convert (OpenCC) is an opensource project for conversion between
Traditional Chinese and Simplified Chinese, supporting character-level conversion,
phrase-level conversion, variant conversion and regional idioms among Mainland China,
Taiwan and Hong kong.
'';
2020-02-08 22:12:17 +00:00
maintainers = with maintainers; [ sifmelcara ];
platforms = with platforms; linux ++ darwin;
2016-11-08 18:29:43 +00:00
};
}