e06a8c8987
https://github.com/G-Research/ahocorasick_rs/blob/034e3f67e12198c08137bb9fb3153cb01cf5da31/pyproject.toml#L9-L10
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
rustPlatform,
|
|
typing-extensions,
|
|
pytestCheckHook,
|
|
pyahocorasick,
|
|
hypothesis,
|
|
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.fetchCargoTarball {
|
|
inherit src;
|
|
name = "${pname}-${version}";
|
|
hash = "sha256-CIt/ChNcoqKln6PgeTGp9pfmIWlJj+c5SCPtBhsnT6U=";
|
|
};
|
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
maturinBuildHook
|
|
cargoSetupHook
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
|
|
}
|