at 23.11-beta 63 lines 1.2 kB view raw
1{ lib 2, fetchFromGitHub 3, python3Packages 4}: 5 6python3Packages.buildPythonApplication rec { 7 pname = "refurb"; 8 version = "1.13.0"; 9 format = "pyproject"; 10 11 src = fetchFromGitHub { 12 owner = "dosisod"; 13 repo = "refurb"; 14 rev = "refs/tags/v${version}"; 15 hash = "sha256-e/gKBgbtjO2XYnAIdHDoVJWyP6cyvsuIFLrV/eqjces="; 16 }; 17 18 postPatch = '' 19 # remove --cov* options provided to pytest 20 sed -i '/^addopts = "--cov/d' pyproject.toml 21 ''; 22 23 nativeBuildInputs = with python3Packages; [ 24 poetry-core 25 ]; 26 27 propagatedBuildInputs = with python3Packages; [ 28 mypy 29 mypy-extensions 30 tomli 31 typing-extensions 32 ]; 33 34 nativeCheckInputs = with python3Packages; [ 35 attrs 36 click 37 colorama 38 iniconfig 39 mccabe 40 packaging 41 pathspec 42 platformdirs 43 pluggy 44 py 45 pyparsing 46 pytestCheckHook 47 ]; 48 49 disabledTests = [ 50 "test_checks" # broken because new mypy release added new checks 51 ]; 52 53 pythonImportsCheck = [ 54 "refurb" 55 ]; 56 57 meta = with lib; { 58 description = "A tool for refurbishing and modernizing Python codebases"; 59 homepage = "https://github.com/dosisod/refurb"; 60 license = with licenses; [ gpl3Only ]; 61 maintainers = with maintainers; [ knl ]; 62 }; 63}