Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / hyperscan / default.nix
blob342dda967cfee94a6e77c8b562207ec8fea1f8e6
1 { lib
2 , pkgs
3 , buildPythonPackage
4 , fetchFromGitHub
5 , pdm-backend
6 , setuptools
7 , wheel
8 , pcre
9 , pkg-config
10 , pytestCheckHook
11 , pytest-mock
14 buildPythonPackage rec {
15   pname = "hyperscan";
16   version = "0.6.0";
17   pyproject = true;
19   src = fetchFromGitHub {
20     owner = "darvid";
21     repo = "python-hyperscan";
22     rev = "v${version}";
23     hash = "sha256-6PoV9rY9CkXkAMWN2QCnfU4S0OJD/6bzkqFgvEVqNjo=";
24   };
26   buildInputs = [
27     (pkgs.hyperscan.override { withStatic = true; })
28     # we need static pcre to be built, by default only shared library is built
29     (pcre.overrideAttrs { dontDisableStatic = 0; })
30   ];
32   nativeBuildInputs = [
33     pkg-config
34     pdm-backend
35     setuptools
36     wheel
37   ];
39   pythonImportsCheck = [ "hyperscan" ];
41   nativeCheckInputs = [
42     pytestCheckHook
43     pytest-mock
44   ];
46   meta = with lib; {
47     description = "A CPython extension for the Hyperscan regular expression matching library";
48     homepage = "https://github.com/darvid/python-hyperscan";
49     changelog = "https://github.com/darvid/python-hyperscan/blob/${src.rev}/CHANGELOG.md";
50     platforms = [ "x86_64-linux" "x86_64-darwin" ];
51     license = licenses.mit;
52     maintainers = with maintainers; [ mbalatsko ];
53   };