blob: b5eb2652ac8c9a1c0ceffbd1531cb24fe2b98282 (
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.0";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "ahocorasick_rs";
hash = "sha256-lzRwODlJlymMSih3CqNIeR+HrUbgVhroM1JuHFfW848=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
name = "${pname}-${version}";
hash = "sha256-Oslf85uI3pO9br7s1J9Y9I/UZ5KDOvJZ/30BMudVBZ0=";
};
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 ];
};
}
|