1{ lib, buildPythonApplication, fetchFromGitHub, pytestCheckHook, pytest-cov, pytest-dependency, aspell-python, aspellDicts, chardet }:
2
3buildPythonApplication rec {
4 pname = "codespell";
5 version = "2.1.0";
6
7 src = fetchFromGitHub {
8 owner = "codespell-project";
9 repo = "codespell";
10 rev = "v${version}";
11 sha256 = "sha256-BhYVztSr2MalILEcOcvMl07CObYa73o3kW8S/idqAO8=";
12 };
13
14 checkInputs = [ aspell-python chardet pytestCheckHook pytest-cov pytest-dependency ];
15
16 preCheck = ''
17 export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell"
18 '';
19
20 # tries to run not fully installed script
21 disabledTests = [ "test_command" ];
22
23 pythonImportsCheck = [ "codespell_lib" ];
24
25 meta = with lib; {
26 description = "Fix common misspellings in source code";
27 homepage = "https://github.com/codespell-project/codespell";
28 license = with licenses; [ gpl2Only cc-by-sa-30 ];
29 maintainers = with maintainers; [ johnazoidberg SuperSandro2000 ];
30 };
31}