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