nixpkgs-suyu/pkgs/development/python-modules/regex/default.nix

32 lines
731 B
Nix
Raw Normal View History

2018-01-01 11:46:35 +01:00
{ lib
, buildPythonPackage
, fetchPypi
, python
2021-04-23 16:49:06 +02:00
, isPy27
2018-01-01 11:46:35 +01:00
}:
buildPythonPackage rec {
pname = "regex";
version = "2021.8.28";
2018-01-01 11:46:35 +01:00
src = fetchPypi {
inherit pname version;
sha256 = "f585cbbeecb35f35609edccb95efd95a3e35824cd7752b586503f7e6087303f1";
2018-01-01 11:46:35 +01:00
};
2021-04-23 16:49:06 +02:00
# Sources for different Python releases are located in same folder
checkPhase = ''
rm -r ${if !isPy27 then "regex_2" else "regex_3"}
${python.interpreter} -m unittest
'';
pythonImportsCheck = [ "regex" ];
meta = with lib; {
2018-01-01 11:46:35 +01:00
description = "Alternative regular expression module, to replace re";
homepage = "https://bitbucket.org/mrabarnett/mrab-regex";
license = licenses.psfl;
maintainers = with maintainers; [ abbradar ];
2018-01-01 11:46:35 +01:00
};
}