Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 24.05-beta 56 lines 1.4 kB view raw
1{ lib 2, fetchFromGitHub 3, aspellDicts 4, python3 5}: 6 7python3.pkgs.buildPythonApplication rec { 8 pname = "codespell"; 9 version = "2.2.6"; 10 format = "pyproject"; 11 12 src = fetchFromGitHub { 13 owner = "codespell-project"; 14 repo = "codespell"; 15 rev = "v${version}"; 16 sha256 = "sha256-esewCJw4o4SfSst5ALZ90X3XgOuOAsaxytpotvFeHB0="; 17 }; 18 19 postPatch = '' 20 substituteInPlace pyproject.toml \ 21 --replace "--cov=codespell_lib" "" \ 22 --replace "--cov-report=" "" 23 ''; 24 25 nativeBuildInputs = with python3.pkgs; [ 26 setuptools-scm 27 ]; 28 29 nativeCheckInputs = with python3.pkgs; [ 30 aspell-python 31 chardet 32 pytestCheckHook 33 pytest-dependency 34 ]; 35 36 preCheck = '' 37 export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell" 38 ''; 39 40 disabledTests = [ 41 # tries to run not fully installed script 42 "test_command" 43 # error 'dateset' should not be in aspell dictionaries (en, en_GB, en_US, en_CA, en_AU) for dictionary /build/source/codespell_lib/tests/../data/dictionary.txt 44 "test_dictionary_formatting" 45 ]; 46 47 pythonImportsCheck = [ "codespell_lib" ]; 48 49 meta = with lib; { 50 description = "Fix common misspellings in source code"; 51 mainProgram = "codespell"; 52 homepage = "https://github.com/codespell-project/codespell"; 53 license = with licenses; [ gpl2Only cc-by-sa-30 ]; 54 maintainers = with maintainers; [ johnazoidberg SuperSandro2000 ]; 55 }; 56}