Skip to content

Commit

Permalink
python3Packages.hyperscan: init at 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mbalatsko authored and Yt committed Oct 2, 2023
1 parent 053e4b0 commit 0533f4e
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
54 changes: 54 additions & 0 deletions pkgs/development/python-modules/hyperscan/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ lib
, pkgs
, buildPythonPackage
, fetchFromGitHub
, pdm-backend
, setuptools
, wheel
, pcre
, pkg-config
, pytestCheckHook
, pytest-mock
}:

buildPythonPackage rec {
pname = "hyperscan";
version = "0.6.0";
pyproject = true;

src = fetchFromGitHub {
owner = "darvid";
repo = "python-hyperscan";
rev = "v${version}";
hash = "sha256-6PoV9rY9CkXkAMWN2QCnfU4S0OJD/6bzkqFgvEVqNjo=";
};

buildInputs = [
(pkgs.hyperscan.override { withStatic = true; })
# we need static pcre to be built, by default only shared library is built
(pcre.overrideAttrs { dontDisableStatic = 0; })
];

nativeBuildInputs = [
pkg-config
pdm-backend
setuptools
wheel
];

pythonImportsCheck = [ "hyperscan" ];

nativeCheckInputs = [
pytestCheckHook
pytest-mock
];

meta = with lib; {
description = "A CPython extension for the Hyperscan regular expression matching library";
homepage = "https://github.com/darvid/python-hyperscan";
changelog = "https://github.com/darvid/python-hyperscan/blob/${src.rev}/CHANGELOG.md";
platforms = [ "x86_64-linux" "x86_64-darwin" ];
license = licenses.mit;
maintainers = with maintainers; [ mbalatsko ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5114,6 +5114,8 @@ self: super: with self; {

hyperframe = callPackage ../development/python-modules/hyperframe { };

hyperscan = callPackage ../development/python-modules/hyperscan { };

hyperion-py = callPackage ../development/python-modules/hyperion-py { };

hyperlink = callPackage ../development/python-modules/hyperlink { };
Expand Down

0 comments on commit 0533f4e

Please sign in to comment.