about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/regex/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/regex/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/regex/default.nix22
1 files changed, 11 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/regex/default.nix b/nixpkgs/pkgs/development/python-modules/regex/default.nix
index efb299161b8e..0445b02c1f33 100644
--- a/nixpkgs/pkgs/development/python-modules/regex/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/regex/default.nix
@@ -2,30 +2,30 @@
 , buildPythonPackage
 , fetchPypi
 , python
+, isPy27
 }:
 
-
 buildPythonPackage rec {
   pname = "regex";
-  version = "2021.3.17";
+  version = "2021.4.4";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "4b8a1fb724904139149a43e172850f35aa6ea97fb0545244dc0b805e0154ed68";
+    sha256 = "sha256-Uro9P5uULEnX5LwQW7KFUcRAZfE5plBiq3kSvvEMmvs=";
   };
 
-  postCheck = ''
-    echo "We now run tests ourselves, since the setuptools installer doesn't."
-    ${python.interpreter} -c 'import test_regex; test_regex.test_main();'
+  # 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
   '';
 
-  # No tests in archive
-  doCheck = false;
+  pythonImportsCheck = [ "regex" ];
 
-  meta = {
+  meta = with lib; {
     description = "Alternative regular expression module, to replace re";
     homepage = "https://bitbucket.org/mrabarnett/mrab-regex";
-    license = lib.licenses.psfl;
-    maintainers = with lib.maintainers; [ abbradar ];
+    license = licenses.psfl;
+    maintainers = with maintainers; [ abbradar ];
   };
 }