Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / sphinxext-opengraph / default.nix
blob85a736bd880c692eee8ee009829a105a0186dd4c
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , sphinx
5 , matplotlib
6 , pytestCheckHook
7 , pythonOlder
8 , beautifulsoup4
9 , setuptools-scm
12 buildPythonPackage rec {
13   pname = "sphinxext-opengraph";
14   version = "0.9.0";
15   format = "setuptools";
17   disabled = pythonOlder "3.8";
19   src = fetchFromGitHub {
20     owner = "wpilibsuite";
21     repo = "sphinxext-opengraph";
22     rev = "refs/tags/v${version}";
23     hash = "sha256-ZLIxbFgayG+WVvSXu74eZJ/PbSHg6dzkkIr1OBry4DE=";
24   };
26   SETUPTOOLS_SCM_PRETEND_VERSION = version;
28   nativeBuildInputs = [
29     setuptools-scm
30   ];
32   passthru.optional-dependencies = {
33     social_cards_generation = [
34       matplotlib
35     ];
36   };
38   propagatedBuildInputs = [
39     sphinx
40   ];
42   nativeCheckInputs = [
43     pytestCheckHook
44     beautifulsoup4
45   ] ++ passthru.optional-dependencies.social_cards_generation;
47   pythonImportsCheck = [ "sphinxext.opengraph" ];
49   meta = with lib; {
50     description = "Sphinx extension to generate unique OpenGraph metadata";
51     homepage = "https://github.com/wpilibsuite/sphinxext-opengraph";
52     changelog = "https://github.com/wpilibsuite/sphinxext-opengraph/releases/tag/v${version}";
53     license = licenses.mit;
54     maintainers = with maintainers; [ Luflosi ];
55   };