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