Loading pkgs/development/python-modules/mkdocs-puml/default.nix 0 → 100644 +61 −0 Original line number Diff line number Diff line { 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 ]; }; } pkgs/development/python-modules/mkdocs-puml/fix-permissions.patch 0 → 100644 +17 −0 Original line number Diff line number Diff line 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: pkgs/top-level/python-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -9311,6 +9311,8 @@ self: super: with self; { 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 { }; Loading Loading
pkgs/development/python-modules/mkdocs-puml/default.nix 0 → 100644 +61 −0 Original line number Diff line number Diff line { 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 ]; }; }
pkgs/development/python-modules/mkdocs-puml/fix-permissions.patch 0 → 100644 +17 −0 Original line number Diff line number Diff line 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:
pkgs/top-level/python-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -9311,6 +9311,8 @@ self: super: with self; { 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 { }; Loading