1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-28 20:16:41 +03:00
nixpkgs/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.9.30";
2018-01-01 11:46:35 +01:00
src = fetchPypi {
inherit pname version;
sha256 = "81e125d9ba54c34579e4539a967e976a3c56150796674aec318b1b2f49251be7";
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
};
}