Files
Daniel Woffinden a84ad3b71b python3Packages.regex: rework
- fetch from github instead of pypi
- eschew `rec` and `with` (https://nix.dev/guides/best-practices.html)
2025-10-23 20:58:25 +01:00

42 lines
772 B
Nix

{
buildPythonPackage,
fetchFromGitHub,
lib,
python,
setuptools,
}:
let
version = "2025.9.18";
in
buildPythonPackage {
pname = "regex";
inherit version;
pyproject = true;
src = fetchFromGitHub {
owner = "mrabarnett";
repo = "mrab-regex";
tag = version;
hash = "sha256-s/jaRbQffd1DmGribk8gwTraKEhWfvFZboWXUduhM8A=";
};
build-system = [ setuptools ];
checkPhase = ''
${python.interpreter} -m unittest
'';
pythonImportsCheck = [ "regex" ];
meta = {
description = "Alternative regular expression module, to replace re";
homepage = "https://github.com/mrabarnett/mrab-regex";
license = [
lib.licenses.asl20
lib.licenses.cnri-python
];
maintainers = [ lib.maintainers.dwoffinden ];
};
}