about summary refs log tree commit diff
path: root/pkgs/development/python-modules/sphinx-issues/default.nix
blob: ea8f4268fb97343a32e458bcde9a74858ecf7709 (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
{
  lib,
  buildPythonPackage,
  sphinx,
  fetchFromGitHub,
  pandoc,
}:

buildPythonPackage rec {
  pname = "sphinx-issues";
  version = "3.0.1";
  format = "setuptools";
  outputs = [
    "out"
    "doc"
  ];

  src = fetchFromGitHub {
    owner = "sloria";
    repo = "sphinx-issues";
    rev = version;
    sha256 = "1lns6isq9kwcw8z4jwgy927f7idx9srvri5adaa5zmypw5x47hha";
  };

  pythonImportsCheck = [ "sphinx_issues" ];

  propagatedBuildInputs = [ sphinx ];

  nativeBuildInputs = [ pandoc ];

  postBuild = ''
    pandoc -f rst -t html --standalone < README.rst > README.html
  '';

  postInstall = ''
    mkdir -p $doc/share/doc/$name/html
    cp README.html $doc/share/doc/$name/html
  '';

  meta = with lib; {
    homepage = "https://github.com/sloria/sphinx-issues";
    description = "Sphinx extension for linking to your project's issue tracker";
    license = licenses.mit;
    maintainers = with maintainers; [ kaction ];
  };
}