evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / plantuml-markdown / default.nix
blobc24cd66e2facea0747bea2fc8e5b682cf90837d3
2   buildPythonPackage,
3   fetchFromGitHub,
4   lib,
5   plantuml,
6   markdown,
7   requests,
8   six,
9   runCommand,
10   writeText,
11   plantuml-markdown,
12   pythonOlder,
15 buildPythonPackage rec {
16   pname = "plantuml-markdown";
17   version = "3.10.4";
18   format = "setuptools";
20   disabled = pythonOlder "3.7";
22   src = fetchFromGitHub {
23     owner = "mikitex70";
24     repo = pname;
25     rev = "refs/tags/${version}";
26     hash = "sha256-5K8NSxMCdAsOtV0egY8gMbHnHifvYNRHzafR0LAcm+Q=";
27   };
29   propagatedBuildInputs = [
30     plantuml
31     markdown
32     requests
33     six
34   ];
36   # The package uses a custom script that downloads a certain version of plantuml for testing.
37   doCheck = false;
39   pythonImportsCheck = [ "plantuml_markdown" ];
41   passthru.tests.example-doc =
42     let
43       exampleDoc = writeText "plantuml-markdown-example-doc.md" ''
44         ```plantuml
45           Bob -> Alice: Hello
46         ```
47       '';
48     in
49     runCommand "plantuml-markdown-example-doc" { nativeBuildInputs = [ plantuml-markdown ]; } ''
50       markdown_py -x plantuml_markdown ${exampleDoc} > $out
52       ! grep -q "Error" $out
53     '';
55   meta = with lib; {
56     description = "PlantUML plugin for Python-Markdown";
57     longDescription = ''
58       This plugin implements a block extension which can be used to specify a PlantUML
59       diagram which will be converted into an image and inserted in the document.
60     '';
61     homepage = "https://github.com/mikitex70/plantuml-markdown";
62     changelog = "https://github.com/mikitex70/plantuml-markdown/releases/tag/${version}";
63     license = licenses.bsd2;
64     maintainers = with maintainers; [ nikstur ];
65   };