Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 55 lines 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchPypi, 6 rustPlatform, 7 pytestCheckHook, 8 pyahocorasick, 9 hypothesis, 10 typing-extensions, 11 pytest-benchmark, 12}: 13 14buildPythonPackage rec { 15 pname = "ahocorasick-rs"; 16 version = "0.22.2"; 17 18 pyproject = true; 19 20 src = fetchPypi { 21 inherit version; 22 pname = "ahocorasick_rs"; 23 hash = "sha256-h/J6ZCLb+U7A+f6ErAGI1KZrXHsvX23rFl8MXj25dpw="; 24 }; 25 26 cargoDeps = rustPlatform.fetchCargoVendor { 27 inherit pname version src; 28 hash = "sha256-uB3r6+Ewpi4dVke/TsCZltfc+ZABYLOLKuNxw+Jfu/M="; 29 }; 30 31 nativeBuildInputs = with rustPlatform; [ 32 maturinBuildHook 33 cargoSetupHook 34 ]; 35 36 dependencies = lib.optionals (pythonOlder "3.12") [ typing-extensions ]; 37 38 nativeCheckInputs = [ 39 pytest-benchmark 40 pytestCheckHook 41 pyahocorasick 42 hypothesis 43 ]; 44 45 pythonImportsCheck = [ "ahocorasick_rs" ]; 46 47 meta = with lib; { 48 description = "Fast Aho-Corasick algorithm for Python"; 49 homepage = "https://github.com/G-Research/ahocorasick_rs/"; 50 changelog = "https://github.com/G-Research/ahocorasick_rs/blob/${version}/CHANGELOG.md"; 51 license = licenses.asl20; 52 maintainers = with maintainers; [ erictapen ]; 53 }; 54 55}