2021-02-12 19:14:54 +00:00
|
|
|
{ lib, buildPythonApplication, fetchFromGitHub, pytestCheckHook, pytest-cov, pytest-dependency, aspell-python, aspellDicts, 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
|
|
|
|
2021-02-12 19:14:54 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "codespell-project";
|
|
|
|
repo = "codespell";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "187g26s3wzjmvdx9vjabbnajpbg0s9klixyv6baymmgz9lrcv4ln";
|
2019-08-07 22:04:48 +01:00
|
|
|
};
|
|
|
|
|
2021-02-12 19:14:54 +00:00
|
|
|
checkInputs = [ aspell-python chardet pytestCheckHook pytest-cov pytest-dependency ];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell"
|
2019-08-07 22:04:48 +01:00
|
|
|
'';
|
|
|
|
|
2021-02-14 05:34:28 +00:00
|
|
|
# tries to run not fully installed script
|
2021-02-12 19:14:54 +00:00
|
|
|
disabledTests = [ "test_command" ];
|
|
|
|
|
2020-11-29 17:27:55 +00:00
|
|
|
pythonImportsCheck = [ "codespell_lib" ];
|
|
|
|
|
2021-02-12 19:14:54 +00:00
|
|
|
meta = with lib; {
|
2019-08-07 22:04:48 +01:00
|
|
|
description = "Fix common misspellings in source code";
|
|
|
|
homepage = "https://github.com/codespell-project/codespell";
|
2021-02-12 19:14:54 +00:00
|
|
|
license = with licenses; [ gpl2Only cc-by-sa-30 ];
|
|
|
|
maintainers = with maintainers; [ johnazoidberg SuperSandro2000 ];
|
2019-08-07 22:04:48 +01:00
|
|
|
};
|
|
|
|
}
|