summaryrefslogtreecommitdiff
path: root/pkgs/yalafi-shell/default.nix
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2023-12-10 21:46:01 +0100
committerLinnnus <[email protected]>2023-12-11 09:30:10 +0100
commita089a0f0d52031c4bed1e79b424755152a6797bf (patch)
tree3d892402890dd52668653036f343920070e77e00 /pkgs/yalafi-shell/default.nix
parentbcc5ce08eebee29bbc366f4d99e9ac47bb0dcac9 (diff)
home/noweb: Switch to full texlive, add spell checker
Diffstat (limited to 'pkgs/yalafi-shell/default.nix')
-rw-r--r--pkgs/yalafi-shell/default.nix28
1 files changed, 28 insertions, 0 deletions
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 "$@"
+ ''