diff --git a/pkgs/development/python-modules/cchardet/default.nix b/pkgs/development/python-modules/cchardet/default.nix index b93ea9c3bd78..e1c27d9e4fb1 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 = {