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