Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / radon / default.nix
blob23f1a9427b560908ab808b61022746bc15249af7
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
14 buildPythonPackage rec {
15   pname = "radon";
16   version = "6.0.1";
18   pyproject = true;
20   src = fetchFromGitHub {
21     owner = "rubik";
22     repo = "radon";
23     rev = "v${version}";
24     hash = "sha256-yY+j9kuX0ou/uDoVI/Qfqsmq0vNHv735k+vRl22LwwY=";
25   };
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   ];
35   nativeBuildInputs = [
36     poetry-core
37   ];
39   nativeCheckInputs = [
40     pytestCheckHook
41     pytest-mock
42   ];
44   propagatedBuildInputs = [
45     mando
46     colorama
47   ];
49   passthru.optional-dependencies = {
50     toml = [
51       tomli
52     ];
53   };
55   pythonImportsCheck = [
56     "radon"
57   ];
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   };