diff options
Diffstat (limited to 'pkgs/yalafi-shell')
-rw-r--r-- | pkgs/yalafi-shell/default.nix | 28 |
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 "$@" + '' |