push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
{
buildPythonPackage,
fetchzip,
isPy3k,
lib,
mkdocs,
}:
buildPythonPackage {
pname = "mkdocs-gitlab-plugin";
version = "0.1.4";
format = "setuptools";
disabled = !isPy3k;
src = fetchzip {
url = "https://gitlab.inria.fr/vidjil/mkdocs-gitlab-plugin/-/archive/fb87fbfd404839e661a799c540664b1103096a5f/mkdocs-gitlab-plugin-fb87fbfd404839e661a799c540664b1103096a5f.tar.gz";
hash = "sha256-z+U0PRwymDDXVNM7a2Yl4pNNVBxpx/BhJnlx6kgyvww=";
};
patches = [ ./mkdocs-gitlab-plugin.diff ];
propagatedBuildInputs = [ mkdocs ];
pythonImportsCheck = [ "mkdocs_gitlab_plugin" ];
meta = with lib; {
description = "MkDocs plugin to transform strings such as #1234, %56, or !789 into links to a Gitlab repository";
homepage = "https://gitlab.inria.fr/vidjil/mkdocs-gitlab-plugin";
license = licenses.mit;
maintainers = with maintainers; [ snpschaaf ];
longDescription = ''
Plugin for MkDocs.
Transform handles such as #1234, %56, !789, &12 or $34 into links to a gitlab repository,
given by the gitlab_url configuration option.
Before the #/%/!/&/$ is needed either a space, a '(', or a '['.
'';
};
}

View File

@@ -0,0 +1,37 @@
diff --git a/mkdocs_gitlab_plugin/plugin.py b/mkdocs_gitlab_plugin/plugin.py
index e8d7ab7..8b883f5 100644
--- a/mkdocs_gitlab_plugin/plugin.py
+++ b/mkdocs_gitlab_plugin/plugin.py
@@ -3,7 +3,7 @@
import re
import mkdocs
-from mkdocs.config import Config
+from mkdocs.config.config_options import Type
from mkdocs.plugins import BasePlugin
class GitlabLinksPlugin(BasePlugin):
@@ -13,8 +13,8 @@ class GitlabLinksPlugin(BasePlugin):
'''
config_scheme = (
- ('gitlab_url', mkdocs.config.config_options.Type(str, default='http://gitlab.com/XXX')),
- ('verbose', mkdocs.config.config_options.Type(bool, default=False))
+ ('gitlab_url', Type(str, default='http://gitlab.com/XXX')),
+ ('verbose', Type(bool, default=False))
)
TOKEN_PATHS = {
diff --git a/mkdocs_gitlab_plugin/test.py b/mkdocs_gitlab_plugin/test.py
index 4a5c35f..d5a19c6 100644
--- a/mkdocs_gitlab_plugin/test.py
+++ b/mkdocs_gitlab_plugin/test.py
@@ -1,7 +1,7 @@
import sys
-from plugin import GitlabLinksPlugin
+from .plugin import GitlabLinksPlugin
if __name__ == '__main__':
plugin = GitlabLinksPlugin()