1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools,
7 docutils,
8 importlib-metadata,
9 oset,
10 pybtex,
11 pybtex-docutils,
12 sphinx,
13 sphinx-autoapi,
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "sphinxcontrib-bibtex";
19 version = "2.6.5";
20 pyproject = true;
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "mcmtroffaes";
26 repo = "sphinxcontrib-bibtex";
27 tag = version;
28 hash = "sha256-sT23DkIfJcb3cFBFdL31RRzlDoJRcCUYIdpUVuYjGuo=";
29 };
30
31 build-system = [ setuptools ];
32
33 dependencies = [
34 docutils
35 oset
36 pybtex
37 pybtex-docutils
38 sphinx
39 ]
40 ++ lib.optionals (pythonOlder "3.10") [
41 importlib-metadata
42 ];
43
44 nativeCheckInputs = [
45 pytestCheckHook
46 sphinx-autoapi
47 ];
48
49 pythonImportsCheck = [ "sphinxcontrib.bibtex" ];
50
51 pythonNamespaces = [ "sphinxcontrib" ];
52
53 meta = with lib; {
54 description = "Sphinx extension for BibTeX style citations";
55 homepage = "https://github.com/mcmtroffaes/sphinxcontrib-bibtex";
56 license = licenses.bsd2;
57 maintainers = [ ];
58 };
59}