1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, sphinx
5, matplotlib
6, pytestCheckHook
7, pythonOlder
8, beautifulsoup4
9, setuptools-scm
10}:
11
12buildPythonPackage rec {
13 pname = "sphinxext-opengraph";
14 version = "0.8.2";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "wpilibsuite";
21 repo = "sphinxext-opengraph";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-SrZTtVzEp4E87fzisWKHl8iRP49PWt5kkJq62CqXrBc=";
24 };
25
26 SETUPTOOLS_SCM_PRETEND_VERSION = version;
27
28 nativeBuildInputs = [
29 setuptools-scm
30 ];
31
32 propagatedBuildInputs = [
33 sphinx
34 matplotlib
35 ];
36
37 nativeCheckInputs = [
38 pytestCheckHook
39 beautifulsoup4
40 ];
41
42 pythonImportsCheck = [ "sphinxext.opengraph" ];
43
44 meta = with lib; {
45 description = "Sphinx extension to generate unique OpenGraph metadata";
46 homepage = "https://github.com/wpilibsuite/sphinxext-opengraph";
47 changelog = "https://github.com/wpilibsuite/sphinxext-opengraph/releases/tag/v${version}";
48 license = licenses.mit;
49 maintainers = with maintainers; [ Luflosi ];
50 };
51}