From 50b2ac3d09394e7c38dd7e358a099eef2f784a0f Mon Sep 17 00:00:00 2001 From: rczb Date: Sun, 11 Jan 2026 14:33:42 +0800 Subject: [PATCH] rime-latex: init at 0-unstable-2025-04-04 --- pkgs/by-name/ri/rime-latex/package.nix | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pkgs/by-name/ri/rime-latex/package.nix diff --git a/pkgs/by-name/ri/rime-latex/package.nix b/pkgs/by-name/ri/rime-latex/package.nix new file mode 100644 index 000000000000..3f9ac9a86cdb --- /dev/null +++ b/pkgs/by-name/ri/rime-latex/package.nix @@ -0,0 +1,52 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + nix-update-script, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "rime-latex"; + version = "0-unstable-2025-04-04"; + + src = fetchFromGitHub { + owner = "shenlebantongying"; + repo = "rime_latex"; + rev = "858f2abc645f0e459e468e98122470ce20b16b30"; + hash = "sha256-i8Rgze+tQhbE+nl+JSj09ILXeUvf6MOS9Eqsuqis1n0="; + }; + + installPhase = '' + runHook preInstall + + rm -rf README.md .git* LICENSE .script + + mkdir -p $out/share + cp -r . $out/share/rime-data + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Typing LaTeX math symbols in RIME"; + longDescription = '' + Typing LaTeX math symbols in RIME. + + Add those lines to `default.custom.yaml`: + + ```yaml + patch: + schema_list: + - schema: latex + ``` + + Press `\` key then input latex symbol's name: `\lambda` will automatically become `λ`. + ''; + homepage = "https://github.com/shenlebantongying/rime_latex"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ rc-zb ]; + platforms = lib.platforms.all; + }; +})