- fetch from github instead of pypi - eschew `rec` and `with` (https://nix.dev/guides/best-practices.html)
42 lines
772 B
Nix
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 ];
|
|
};
|
|
}
|