at 24.05-pre 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, fetchpatch 6# Python deps 7, mando 8, colorama 9, pytest-mock 10, tomli 11, poetry-core 12}: 13 14buildPythonPackage rec { 15 pname = "radon"; 16 version = "6.0.1"; 17 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "rubik"; 22 repo = "radon"; 23 rev = "v${version}"; 24 hash = "sha256-yY+j9kuX0ou/uDoVI/Qfqsmq0vNHv735k+vRl22LwwY="; 25 }; 26 27 patches = [ 28 # NOTE: Remove after next release 29 (fetchpatch { 30 url = "https://github.com/rubik/radon/commit/ce5d2daa0a9e0e843059d6f57a8124c64a87a6dc.patch"; 31 hash = "sha256-WwcfR2ZEWeRiMKdMZAwtZRBcWOqoqpaVTmVo0k+Tn74="; 32 }) 33 ]; 34 35 nativeBuildInputs = [ 36 poetry-core 37 ]; 38 39 nativeCheckInputs = [ 40 pytestCheckHook 41 pytest-mock 42 ]; 43 44 propagatedBuildInputs = [ 45 mando 46 colorama 47 ]; 48 49 passthru.optional-dependencies = { 50 toml = [ 51 tomli 52 ]; 53 }; 54 55 pythonImportsCheck = [ 56 "radon" 57 ]; 58 59 meta = with lib; { 60 description = "Various code metrics for Python code"; 61 homepage = "https://radon.readthedocs.org"; 62 changelog = "https://github.com/rubik/radon/blob/v${version}/CHANGELOG"; 63 license = licenses.mit; 64 maintainers = with maintainers; [ t4ccer ]; 65 mainProgram = "radon"; 66 }; 67}