diff options
author | Linnnus <[email protected]> | 2023-12-10 21:46:01 +0100 |
---|---|---|
committer | Linnnus <[email protected]> | 2023-12-11 09:30:10 +0100 |
commit | a089a0f0d52031c4bed1e79b424755152a6797bf (patch) | |
tree | 3d892402890dd52668653036f343920070e77e00 /pkgs | |
parent | bcc5ce08eebee29bbc366f4d99e9ac47bb0dcac9 (diff) |
home/noweb: Switch to full texlive, add spell checker
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/default.nix | 4 | ||||
-rw-r--r-- | pkgs/yalafi-shell/default.nix | 28 |
2 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix index 5ab245a..0a7fac8 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -11,6 +11,10 @@ pkgs: { watch-while = pkgs.callPackage ./watch-while {}; + # This is not wrapping the YaLafi python library, just a particular example + # from the repo where they spellcheck LaTex files. + yalafi-shell = pkgs.callPackage ./yalafi-shell {}; + # TODO: These should be contained in the 'vimPlugins' attrset. This turns out # to be non-trivial because this module is both consumed in a flake output # context and an overlay context. 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 "$@" + '' |