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