python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / misc / pandoc-drawio-filter / default.nix
blob73dd658dfb161483f38c4eb9a313de9b7a2da346
1 { buildPythonApplication
2 , drawio-headless
3 , fetchFromGitHub
4 , lib
5 , pandoc
6 , pandocfilters
7 , runCommand
8 , runtimeShell
9 , texlive
10 , writeScriptBin
11 , xvfb-run
14 let
15   version = "1.1";
17   src = fetchFromGitHub {
18     owner = "tfc";
19     repo = "pandoc-drawio-filter";
20     rev = version;
21     sha256 = "sha256-2XJSAfxqEmmamWIAM3vZqi0mZjUUugmR3zWw8Imjadk=";
22   };
24   pandoc-drawio-filter = buildPythonApplication {
25     pname = "pandoc-drawio-filter";
27     inherit src version;
29     propagatedBuildInputs = [
30       drawio-headless
31       pandocfilters
32     ];
34     passthru.tests.example-doc =
35       let
36         env = {
37           nativeBuildInputs = [
38             pandoc
39             pandoc-drawio-filter
40             texlive.combined.scheme-tetex
41           ];
42         };
43       in
44       runCommand "$pandoc-drawio-filter-example-doc.pdf" env ''
45         cp -r ${src}/example/* .
46         pandoc -F pandoc-drawio example.md -T pdf -o $out
47       '';
49     meta = with lib; {
50       homepage = "https://github.com/tfc/pandoc-drawio-filter";
51       description = "Pandoc filter which converts draw.io diagrams to PDF";
52       license = licenses.mit;
53       maintainers = with maintainers; [ tfc ];
54     };
55   };
59 pandoc-drawio-filter