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