2021-02-13 14:23:35 +00:00
|
|
|
{ lib, buildPythonApplication, fetchFromGitHub, pytestCheckHook, pytest-cov, pytest-dependency, aspell-python, aspellDicts, chardet }:
|
2020-12-07 07:45:13 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "codespell";
|
2020-12-07 07:45:13 +00:00
|
|
|
version = "2.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "codespell-project";
|
|
|
|
repo = "codespell";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "187g26s3wzjmvdx9vjabbnajpbg0s9klixyv6baymmgz9lrcv4ln";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
checkInputs = [ aspell-python chardet pytestCheckHook pytest-cov pytest-dependency ];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
# tries to run not fully installed script
|
2021-02-13 14:23:35 +00:00
|
|
|
disabledTests = [ "test_command" ];
|
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
pythonImportsCheck = [ "codespell_lib" ];
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fix common misspellings in source code";
|
|
|
|
homepage = "https://github.com/codespell-project/codespell";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = with licenses; [ gpl2Only cc-by-sa-30 ];
|
|
|
|
maintainers = with maintainers; [ johnazoidberg SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|