summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/sphinx-issues/default.nix
blob: 4ea94b7618908acbf24671f893979449098de780 (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
{ lib, buildPythonPackage, sphinx, fetchFromGitHub, pandoc }:

buildPythonPackage rec {
  pname = "sphinx-issues";
  version = "3.0.1";
  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 ];
  };
}