2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
sphinx,
|
|
|
|
matplotlib,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
beautifulsoup4,
|
|
|
|
setuptools-scm,
|
2021-08-05 21:33:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sphinxext-opengraph";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.9.1";
|
2023-03-08 16:32:21 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wpilibsuite";
|
|
|
|
repo = "sphinxext-opengraph";
|
2022-12-28 21:21:41 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-B+bJ1tKqTTlbNeJLxk56o2a21n3Yg6OHwJiFfCx46aw=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
social_cards_generation = [ matplotlib ];
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ sphinx ];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-19 01:06:50 +00:00
|
|
|
pytestCheckHook
|
|
|
|
beautifulsoup4
|
2024-10-04 16:56:33 +00:00
|
|
|
] ++ optional-dependencies.social_cards_generation;
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "sphinxext.opengraph" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Sphinx extension to generate unique OpenGraph metadata";
|
|
|
|
homepage = "https://github.com/wpilibsuite/sphinxext-opengraph";
|
2023-03-08 16:32:21 +00:00
|
|
|
changelog = "https://github.com/wpilibsuite/sphinxext-opengraph/releases/tag/v${version}";
|
2021-08-05 21:33:18 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ Luflosi ];
|
|
|
|
};
|
|
|
|
}
|