nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit df0d04d5dcc802846d1a1fd96f3000840593ad12
parent bac4d92548cda81196e76c990454896ba129d830
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Thu,  6 May 2021 22:41:59 +0300

Add wiktextract

Diffstat:
Mpkgs/default.nix | 3+++
Apkgs/development/python-modules/lru-dict/default.nix | 23+++++++++++++++++++++++
Apkgs/development/python-modules/wikitextprocessor/default.nix | 25+++++++++++++++++++++++++
Apkgs/dict/wiktextract/default.nix | 25+++++++++++++++++++++++++
4 files changed, 76 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -100,12 +100,14 @@ lib.makeScope newScope ( geotiler = callPackage ./development/python-modules/geotiler { }; gpxelevations = callPackage ./development/python-modules/gpxelevations { }; jsonseq = callPackage ./development/python-modules/jsonseq { }; + lru-dict = callPackage ./development/python-modules/lru-dict { }; mercantile = callPackage ./development/python-modules/mercantile { }; mikatools = callPackage ./development/python-modules/mikatools { }; pyephem = callPackage ./development/python-modules/pyephem { }; pymbtiles = callPackage ./development/python-modules/pymbtiles { }; python-hfst = callPackage ./development/python-modules/python-hfst { }; s2sphere = callPackage ./development/python-modules/s2sphere { }; + wikitextprocessor = callPackage ./development/python-modules/wikitextprocessor { }; ### TOOLS @@ -142,6 +144,7 @@ lib.makeScope newScope ( redict = libsForQt5.callPackage ./dict/redict { }; stardict-tools = callPackage ./dict/stardict-tools { }; tatoebatools = callPackage ./dict/tatoebatools { }; + wiktextract = callPackage ./dict/wiktextract { }; zdict = callPackage ./dict/zdict { }; ### EMBOX diff --git a/pkgs/development/python-modules/lru-dict/default.nix b/pkgs/development/python-modules/lru-dict/default.nix @@ -0,0 +1,23 @@ +{ lib, python3Packages, fetchFromGitHub }: + +python3Packages.buildPythonApplication rec { + pname = "lru-dict"; + version = "1.1.5"; + + src = fetchFromGitHub { + owner = "amitdev"; + repo = pname; + rev = "v${version}"; + hash = "sha256-+6E5vqjNjKXDfkx/rklsSIvP+JfsTtukCXp7NKxVUrY="; + }; + + checkInputs = with python3Packages; [ pytestCheckHook ]; + + meta = with lib; { + description = "A fast and memory efficient LRU cache for Python"; + inherit (src.meta) homepage; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/python-modules/wikitextprocessor/default.nix b/pkgs/development/python-modules/wikitextprocessor/default.nix @@ -0,0 +1,25 @@ +{ lib, python3Packages, fetchFromGitHub, lru-dict }: + +python3Packages.buildPythonApplication rec { + pname = "wikitextprocessor"; + version = "0.4.94"; + + src = fetchFromGitHub { + owner = "tatuylonen"; + repo = pname; + rev = "v${version}"; + hash = "sha256-eRtTgi519j5rHJL4xMN91gCMlpwgVhWNEIKqBfdkQGo="; + }; + + propagatedBuildInputs = with python3Packages; [ lupa dateparser lru-dict ]; + + checkInputs = with python3Packages; [ pytestCheckHook ]; + + meta = with lib; { + description = "Parser and expander for Wikipedia, Wiktionary etc. dump files, with Lua execution support"; + inherit (src.meta) homepage; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/dict/wiktextract/default.nix b/pkgs/dict/wiktextract/default.nix @@ -0,0 +1,25 @@ +{ lib, python3Packages, fetchFromGitHub, wikitextprocessor }: + +python3Packages.buildPythonApplication rec { + pname = "wiktextract"; + version = "1.99.5"; + + src = fetchFromGitHub { + owner = "tatuylonen"; + repo = pname; + rev = "v${version}"; + hash = "sha256-am926XGY2XlJXVqVQyfWvFhiOkanuSXpq07ckPChnpU="; + }; + + propagatedBuildInputs = with python3Packages; [ python-Levenshtein setuptools wikitextprocessor ]; + + checkInputs = with python3Packages; [ pytestCheckHook ]; + + meta = with lib; { + description = "Wiktionary dump file parser and multilingual data extractor"; + inherit (src.meta) homepage; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +}