From a089a0f0d52031c4bed1e79b424755152a6797bf Mon Sep 17 00:00:00 2001 From: Linnnus Date: Sun, 10 Dec 2023 21:46:01 +0100 Subject: home/noweb: Switch to full texlive, add spell checker --- pkgs/yalafi-shell/default.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pkgs/yalafi-shell/default.nix (limited to 'pkgs/yalafi-shell') diff --git a/pkgs/yalafi-shell/default.nix b/pkgs/yalafi-shell/default.nix new file mode 100644 index 0000000..b8092ba --- /dev/null +++ b/pkgs/yalafi-shell/default.nix @@ -0,0 +1,28 @@ +{ + python3, + fetchFromGitHub, + writeShellScriptBin, + languagetool, +}: let + yalafi = python3.pkgs.buildPythonPackage rec { + pname = "YaLafi"; + version = "1.4.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "torik42"; + repo = pname; + rev = version; + hash = "sha256-t+iVko04J4j0ULo7AJFhcf/iNVop91GGrpt/ggpQJZo="; + }; + + nativeBuildInputs = [ + python3.pkgs.setuptools-scm + ]; + }; + + python3-with-yalafi = python3.withPackages (ps: [yalafi]); +in + writeShellScriptBin "yalafi-shell" '' + ${python3-with-yalafi.interpreter} -m yalafi.shell --lt-command "${languagetool}"/bin/languagetool-commandline "$@" + '' -- cgit v1.2.3