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.0"; 12 format = "setuptools"; 13 14 disabled = pythonOlder "3.7"; 15 16 src = fetchFromGitHub { 17 owner = "WojciechMula"; 18 repo = pname; 19 rev = "refs/tags/${version}"; 20 hash = "sha256-Ugl7gHyubXpxe4aots2e9stLuQAZEWsrlDuAHdSC0SA="; 21 }; 22 23 nativeCheckInputs = [ 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 changelog = "https://github.com/WojciechMula/pyahocorasick/blob/${version}/CHANGELOG.rst"; 40 license = with licenses; [ bsd3 ]; 41 maintainers = with maintainers; [ fab ]; 42 }; 43}