Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 54 lines 1.2 kB view raw
1{ lib 2, fetchFromGitHub 3, aspellDicts 4, python3 5}: 6 7python3.pkgs.buildPythonApplication rec { 8 pname = "codespell"; 9 version = "2.3.0"; 10 format = "pyproject"; 11 12 src = fetchFromGitHub { 13 owner = "codespell-project"; 14 repo = "codespell"; 15 rev = "v${version}"; 16 sha256 = "sha256-X3Pueu0E7Q57sbKSXqCZki4/PUb1WyWk/Zmj+lhVTM8="; 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_basic" 43 ]; 44 45 pythonImportsCheck = [ "codespell_lib" ]; 46 47 meta = with lib; { 48 description = "Fix common misspellings in source code"; 49 mainProgram = "codespell"; 50 homepage = "https://github.com/codespell-project/codespell"; 51 license = with licenses; [ gpl2Only cc-by-sa-30 ]; 52 maintainers = with maintainers; [ johnazoidberg SuperSandro2000 ]; 53 }; 54}