1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 pytestCheckHook,
7 pythonOlder,
8}:
9
10buildPythonPackage rec {
11 pname = "pyahocorasick";
12 version = "2.1.0";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "WojciechMula";
19 repo = pname;
20 rev = "refs/tags/${version}";
21 hash = "sha256-SCIgu0uEjiSUiIP0WesJG+y+3ZqFBfI5PdgUzviOVrs=";
22 };
23
24 nativeCheckInputs = [ pytestCheckHook ];
25
26 pythonImportsCheck = [ "ahocorasick" ];
27
28 meta = with lib; {
29 description = "Python module implementing Aho-Corasick algorithm";
30 longDescription = ''
31 This Python module is a fast and memory efficient library for exact or
32 approximate multi-pattern string search meaning that you can find multiple
33 key strings occurrences at once in some input text.
34 '';
35 homepage = "https://github.com/WojciechMula/pyahocorasick";
36 changelog = "https://github.com/WojciechMula/pyahocorasick/blob/${version}/CHANGELOG.rst";
37 license = with licenses; [ bsd3 ];
38 maintainers = with maintainers; [ fab ];
39 };
40}