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";
|
2021-06-14 20:59:44 +01:00
|
|
|
version = "2.1.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}";
|
2021-06-14 20:59:44 +01:00
|
|
|
sha256 = "sha256-BhYVztSr2MalILEcOcvMl07CObYa73o3kW8S/idqAO8=";
|
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
|
|
|
};
|
|
|
|
}
|