{ lib, stdenv, fetchPypi, buildPythonPackage, rustPlatform, libiconv, }: buildPythonPackage rec { pname = "regress"; version = "2025.5.1"; format = "pyproject"; src = fetchPypi { inherit pname version; hash = "sha256-uzcrdupqUJNRKPBl7KT+ZknsRG8Oz51zrAzRm2isrcc="; }; nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ]; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; cargoDeps = rustPlatform.fetchCargoVendor { inherit pname version src; hash = "sha256-zl4iyJqmXHpc+1A4xYd8qSbE81OFxq46ECl6xJ/yD+4="; }; meta = with lib; { description = "Python bindings to the Rust regress crate, exposing ECMA regular expressions"; homepage = "https://github.com/Julian/regress"; license = licenses.mit; maintainers = [ maintainers.matthiasbeyer ]; }; }