mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 08:26:37 +01:00
49 lines
893 B
Nix
49 lines
893 B
Nix
{
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
lib,
|
|
python,
|
|
setuptools,
|
|
}:
|
|
|
|
let
|
|
version = "2026.1.15";
|
|
in
|
|
buildPythonPackage {
|
|
pname = "regex";
|
|
inherit version;
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mrabarnett";
|
|
repo = "mrab-regex";
|
|
tag = version;
|
|
hash = "sha256-siSyt5maiAjeU4LjOLUo82ubsjtNCeRbdwgYu2DdwBE=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
preCheck = ''
|
|
rm regex/__init__.py
|
|
'';
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
|
|
${python.interpreter} -m unittest ./regex/tests/test_regex.py
|
|
|
|
runHook postCheck
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|