diff --git a/pkgs/development/python-modules/ahocorapy/default.nix b/pkgs/development/python-modules/ahocorapy/default.nix new file mode 100644 index 000000000000..cd4f90e8ae5c --- /dev/null +++ b/pkgs/development/python-modules/ahocorapy/default.nix @@ -0,0 +1,45 @@ +{ + buildPythonPackage, + fetchFromGitHub, + future, + lib, + pytestCheckHook, + setuptools, +}: + +buildPythonPackage rec { + pname = "ahocorapy"; + version = "1.6.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "abusix"; + repo = "ahocorapy"; + tag = version; + hash = "sha256-ynVkDnrZ12dpNPoKfUdw0/X06aORFkmXFMVH9u0Payo="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + future + ]; + + pythonImportsCheck = [ "ahocorapy" ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ + "tests/ahocorapy_test.py" + ]; + + meta = { + changelog = "https://github.com/abusix/ahocorapy/blob/${src.tag}/CHANGELOG"; + description = "Pure python Aho-Corasick library"; + homepage = "https://github.com/abusix/ahocorapy"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 959365d03a30..cc05102e2f8d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -131,6 +131,8 @@ self: super: with self; { aggdraw = callPackage ../development/python-modules/aggdraw { }; + ahocorapy = callPackage ../development/python-modules/ahocorapy { }; + ahocorasick-rs = callPackage ../development/python-modules/ahocorasick-rs { }; aigpy = callPackage ../development/python-modules/aigpy { };