1{
2 lib,
3 stdenv,
4 fetchPypi,
5 buildPythonPackage,
6 rustPlatform,
7 libiconv,
8}:
9
10buildPythonPackage rec {
11 pname = "regress";
12 version = "2025.5.1";
13
14 format = "pyproject";
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-uzcrdupqUJNRKPBl7KT+ZknsRG8Oz51zrAzRm2isrcc=";
19 };
20
21 nativeBuildInputs = with rustPlatform; [
22 cargoSetupHook
23 maturinBuildHook
24 ];
25
26 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
27
28 cargoDeps = rustPlatform.fetchCargoVendor {
29 inherit pname version src;
30 hash = "sha256-zl4iyJqmXHpc+1A4xYd8qSbE81OFxq46ECl6xJ/yD+4=";
31 };
32
33 meta = with lib; {
34 description = "Python bindings to the Rust regress crate, exposing ECMA regular expressions";
35 homepage = "https://github.com/Julian/regress";
36 license = licenses.mit;
37 maintainers = [ maintainers.matthiasbeyer ];
38 };
39}