2019-08-07 22:04:48 +01:00
|
|
|
{ lib, buildPythonApplication, fetchPypi, pytest, chardet }:
|
2020-11-29 17:27:55 +00:00
|
|
|
|
2019-08-07 22:04:48 +01:00
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "codespell";
|
2020-11-29 14:04:25 +00:00
|
|
|
version = "2.0.0";
|
2019-08-07 22:04:48 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:25 +00:00
|
|
|
sha256 = "dd9983e096b9f7ba89dd2d2466d1fc37231d060f19066331b9571341363c77b8";
|
2019-08-07 22:04:48 +01:00
|
|
|
};
|
|
|
|
|
2020-11-29 17:27:55 +00:00
|
|
|
# no tests in pypi tarball
|
|
|
|
doCheck = false;
|
2019-08-07 22:04:48 +01:00
|
|
|
checkInputs = [ pytest chardet ];
|
|
|
|
checkPhase = ''
|
|
|
|
# We don't want to be affected by the presence of these
|
|
|
|
rm -r codespell_lib setup.cfg
|
|
|
|
# test_command assumes too much about the execution environment
|
|
|
|
pytest --pyargs codespell_lib.tests -k "not test_command"
|
|
|
|
'';
|
|
|
|
|
2020-11-29 17:27:55 +00:00
|
|
|
pythonImportsCheck = [ "codespell_lib" ];
|
|
|
|
|
2019-08-07 22:04:48 +01:00
|
|
|
meta = {
|
|
|
|
description = "Fix common misspellings in source code";
|
|
|
|
homepage = "https://github.com/codespell-project/codespell";
|
|
|
|
license = with lib.licenses; [ gpl2 cc-by-sa-30 ];
|
|
|
|
maintainers = with lib.maintainers; [ johnazoidberg ];
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|