about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/class-doc/default.nix
blob: 937a94c953b88afae7c7df360220cd25e1b22bc2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, more-itertools
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "class-doc";
  version = "0.2.6";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "danields761";
    repo = "${pname}";
    rev = "9b122d85ce667d096ebee75a49350bbdbd48686d"; # no 0.2.6 version tag
    hash = "sha256-4Sn/TuBvBpl1nvJBg327+sVrjGavkYKEYP32DwLWako=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  postPatch = ''
    substituteInPlace pyproject.toml --replace \
      "poetry.masonry.api" \
      "poetry.core.masonry.api"
  '';

  propagatedBuildInputs = [
    more-itertools
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "class_doc"
  ];

  meta = with lib; {
    description = "Extract attributes docstrings defined in various ways";
    homepage = "https://github.com/danields761/class-doc";
    license = licenses.mit;
    maintainers = with maintainers; [ gador ];
  };
}