summary refs log tree commit diff
path: root/pkgs/development/python-modules/cchardet/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/cchardet/default.nix')
-rw-r--r--pkgs/development/python-modules/cchardet/default.nix20
1 files changed, 19 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/cchardet/default.nix b/pkgs/development/python-modules/cchardet/default.nix
index b93ea9c3bd7..e1c27d9e4fb 100644
--- a/pkgs/development/python-modules/cchardet/default.nix
+++ b/pkgs/development/python-modules/cchardet/default.nix
@@ -14,9 +14,27 @@ buildPythonPackage rec {
     sha256 = "c428b6336545053c2589f6caf24ea32276c6664cb86db817e03a94c60afa0eaf";
   };
 
+  pythonImportsCheck = [
+    "cchardet"
+  ];
+
   checkInputs = [ nose ];
+
+  preCheck = ''
+    cp -R src/tests $TMPDIR
+    pushd $TMPDIR
+  '';
+
   checkPhase = ''
-    ${python.interpreter} setup.py nosetests
+    runHook preCheck
+
+    nosetests
+
+    runHook postCheck
+  '';
+
+  postCheck = ''
+    popd
   '';
 
   meta = {