python3Packages.mkdocs-puml: init at 2.3.0

Changed files
+80
pkgs
development
python-modules
top-level
+61
pkgs/development/python-modules/mkdocs-puml/default.nix
···
+
{
+
lib,
+
buildPythonPackage,
+
fetchFromGitHub,
+
poetry-core,
+
httpx,
+
markdown,
+
mkdocs,
+
msgpack,
+
rich,
+
pytestCheckHook,
+
pytest-httpx,
+
}:
+
+
buildPythonPackage rec {
+
pname = "mkdocs-puml";
+
version = "2.3.0";
+
pyproject = true;
+
+
src = fetchFromGitHub {
+
owner = "MikhailKravets";
+
repo = "mkdocs_puml";
+
tag = "v${version}";
+
hash = "sha256-DOGS2lnFIpFdpJxIw9PJ/kvtAOhVtAJOQeMR+CVjkE0=";
+
};
+
+
patches = [
+
# Fix permission of copied files from the store so that they are
+
# overwritable.
+
./fix-permissions.patch
+
];
+
+
build-system = [ poetry-core ];
+
+
pythonRelaxDeps = [
+
"httpx"
+
"rich"
+
];
+
+
dependencies = [
+
httpx
+
markdown
+
mkdocs
+
msgpack
+
rich
+
];
+
+
pythonImportsCheck = [ "mkdocs_puml" ];
+
+
nativeCheckInputs = [
+
pytestCheckHook
+
pytest-httpx
+
];
+
+
meta = {
+
description = "Brings PlantUML to MkDocs";
+
homepage = "https://github.com/MikhailKravets/mkdocs_puml";
+
license = lib.licenses.mit;
+
maintainers = with lib.maintainers; [ drupol ];
+
};
+
}
+17
pkgs/development/python-modules/mkdocs-puml/fix-permissions.patch
···
+
diff --git i/mkdocs_puml/plugin.py w/mkdocs_puml/plugin.py
+
index e9e0f5b..7435327 100644
+
--- i/mkdocs_puml/plugin.py
+
+++ w/mkdocs_puml/plugin.py
+
@@ -221,6 +221,12 @@ class PlantUMLPlugin(BasePlugin[PlantUMLConfig]):
+
# shutil.copy(puml_js, dest_dir)
+
shutil.copytree(static_dir, dest_dir, dirs_exist_ok=True)
+
+
+ # Make sure all the files in dest_dir are writable
+
+ for root, dirs, files in os.walk(dest_dir):
+
+ for file in files:
+
+ file_path = Path(root).joinpath(file)
+
+ file_path.chmod(0o644)
+
+
+
self.storage.save()
+
+
def _replace(self, key: str, content: str) -> str:
+2
pkgs/top-level/python-packages.nix
···
mkdocs-minify-plugin = callPackage ../development/python-modules/mkdocs-minify-plugin { };
+
mkdocs-puml = callPackage ../development/python-modules/mkdocs-puml { };
+
mkdocs-redirects = callPackage ../development/python-modules/mkdocs-redirects { };
mkdocs-redoc-tag = callPackage ../development/python-modules/mkdocs-redoc-tag { };