diff options
Diffstat (limited to 'pkgs/development/python-modules/sacremoses')
-rw-r--r-- | pkgs/development/python-modules/sacremoses/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/sacremoses/default.nix b/pkgs/development/python-modules/sacremoses/default.nix new file mode 100644 index 00000000000..ef0fcb57dc9 --- /dev/null +++ b/pkgs/development/python-modules/sacremoses/default.nix @@ -0,0 +1,37 @@ +{ buildPythonPackage +, stdenv +, fetchFromGitHub +, click +, six +, tqdm +, joblib +, pytest +}: + +buildPythonPackage rec { + pname = "sacremoses"; + version = "0.0.35"; + + src = fetchFromGitHub { + owner = "alvations"; + repo = pname; + rev = "${version}"; + sha256 = "1gzr56w8yx82mn08wax5m0xyg15ym4ri5l80gmagp8r53443j770"; + }; + + propagatedBuildInputs = [ click six tqdm joblib ]; + + checkInputs = [ pytest ]; + # ignore tests which call to remote host + checkPhase = '' + pytest -k 'not truecase' + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/alvations/sacremoses"; + description = "Python port of Moses tokenizer, truecaser and normalizer"; + license = licenses.lgpl21Plus; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ pashashocky ]; + }; +} |