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