From 7b4b8c4d2fd9fa6620d1278729ef1665a91c913c Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 25 Jul 2025 09:54:18 +0200 Subject: [PATCH] python3Packages.plantuml-markdown: patch path to local `plantuml` --- .../python-modules/plantuml-markdown/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/plantuml-markdown/default.nix b/pkgs/development/python-modules/plantuml-markdown/default.nix index d66c26e13a30..e5998caeb092 100644 --- a/pkgs/development/python-modules/plantuml-markdown/default.nix +++ b/pkgs/development/python-modules/plantuml-markdown/default.nix @@ -1,6 +1,7 @@ { buildPythonPackage, fetchFromGitHub, + pkgs, # Only for pkgs.plantuml, lib, plantuml, markdown, @@ -9,7 +10,6 @@ runCommand, writeText, plantuml-markdown, - pythonOlder, }: buildPythonPackage rec { @@ -17,8 +17,6 @@ buildPythonPackage rec { version = "3.11.1"; format = "setuptools"; - disabled = pythonOlder "3.7"; - src = fetchFromGitHub { owner = "mikitex70"; repo = "plantuml-markdown"; @@ -26,6 +24,11 @@ buildPythonPackage rec { hash = "sha256-DgHWqwPsZ5q1XqrfaAiUslKnJdHX4Pzw9lygF3iaxz4="; }; + postPatch = '' + substituteInPlace plantuml_markdown/plantuml_markdown.py \ + --replace-fail '"plantuml_cmd": ["plantuml"' '"plantuml_cmd": ["${lib.getExe pkgs.plantuml}"' + ''; + propagatedBuildInputs = [ plantuml markdown @@ -34,6 +37,7 @@ buildPythonPackage rec { ]; # The package uses a custom script that downloads a certain version of plantuml for testing. + # Missing https://github.com/ezequielramos/http-server-mock which looks unmaintained doCheck = false; pythonImportsCheck = [ "plantuml_markdown" ]; @@ -52,7 +56,7 @@ buildPythonPackage rec { ! grep -q "Error" $out ''; - meta = with lib; { + meta = { description = "PlantUML plugin for Python-Markdown"; longDescription = '' This plugin implements a block extension which can be used to specify a PlantUML @@ -60,7 +64,7 @@ buildPythonPackage rec { ''; homepage = "https://github.com/mikitex70/plantuml-markdown"; changelog = "https://github.com/mikitex70/plantuml-markdown/releases/tag/${src.tag}"; - license = licenses.bsd2; - maintainers = with maintainers; [ nikstur ]; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ nikstur ]; }; }