summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/docstring-to-markdown/default.nix
blob: ad4fd3baa82c427d69d8dcf252244e2861fcc541 (plain)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  importlib-metadata,
  pytestCheckHook,
  setuptools,
  typing-extensions,
}:

buildPythonPackage rec {
  pname = "docstring-to-markdown";
  version = "0.17";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "python-lsp";
    repo = "docstring-to-markdown";
    tag = "v${version}";
    hash = "sha256-conwwToBrlDL487zf2ldCOxFFKxP1a8LnU0KocI8riI=";
  };

  postPatch = ''
    sed -i -E '/--(cov|flake8)/d' setup.cfg
  '';

  build-system = [ setuptools ];

  dependencies = [
    importlib-metadata
    typing-extensions
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "docstring_to_markdown" ];

  meta = {
    homepage = "https://github.com/python-lsp/docstring-to-markdown";
    description = "On the fly conversion of Python docstrings to markdown";
    changelog = "https://github.com/python-lsp/docstring-to-markdown/releases/tag/${src.tag}";
    license = lib.licenses.lgpl2Plus;
    maintainers = with lib.maintainers; [ doronbehar ];
  };
}