841d9c7fc1
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
31 lines
717 B
Nix
31 lines
717 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, python
|
|
, isPy27
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "regex";
|
|
version = "2021.4.4";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-Uro9P5uULEnX5LwQW7KFUcRAZfE5plBiq3kSvvEMmvs=";
|
|
};
|
|
|
|
# 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; {
|
|
description = "Alternative regular expression module, to replace re";
|
|
homepage = "https://bitbucket.org/mrabarnett/mrab-regex";
|
|
license = licenses.psfl;
|
|
maintainers = with maintainers; [ abbradar ];
|
|
};
|
|
}
|