1{
2 lib,
3 buildPythonPackage,
4 feedparser,
5 fetchFromGitHub,
6 gitpython,
7 jsonfeed,
8 mkdocs,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools,
12 validator-collection,
13}:
14
15buildPythonPackage rec {
16 pname = "mkdocs-rss-plugin";
17 version = "1.12.2";
18 pyproject = true;
19
20 disabled = pythonOlder "3.9";
21
22 src = fetchFromGitHub {
23 owner = "Guts";
24 repo = "mkdocs-rss-plugin";
25 rev = "refs/tags/${version}";
26 hash = "sha256-CeVt4Vkr3tGvWsDQtw8eAaRS5jBeDei0TrS5rViSCaI=";
27 };
28
29 postPatch = ''
30 sed -i "/--cov/d" setup.cfg
31 '';
32
33 build-system = [ setuptools ];
34
35 dependencies = [
36 gitpython
37 mkdocs
38 ];
39
40 nativeCheckInputs = [
41 feedparser
42 jsonfeed
43 pytestCheckHook
44 validator-collection
45 ];
46
47 pythonImportsCheck = [ "mkdocs_rss_plugin" ];
48
49 disabledTests = [
50 # Tests require network access
51 "test_plugin_config_through_mkdocs"
52 "test_remote_image_ok"
53 ];
54
55 disabledTestPaths = [
56 # Tests require network access
57 "tests/test_integrations_material_social_cards.py"
58 "tests/test_build_no_git.py"
59 "tests/test_build.py"
60 ];
61
62 meta = with lib; {
63 description = "MkDocs plugin to generate a RSS feeds for created and updated pages, using git log and YAML frontmatter";
64 homepage = "https://github.com/Guts/mkdocs-rss-plugin";
65 changelog = "https://github.com/Guts/mkdocs-rss-plugin/blob/${src.rev}/CHANGELOG.md";
66 license = licenses.mit;
67 maintainers = with maintainers; [ fab ];
68 };
69}