fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Kirill Elaginpandoc: add new modulec47c350f

master
737 B30 linesraw
1{ config, lib, ... }:
2
3let cfg = config.programs.pandoc;
4
5in {
6  config = lib.mkIf config.test.enableBig {
7    programs.pandoc = {
8      enable = true;
9
10      defaults = {
11        metadata = { author = "John Doe"; };
12        pdf-engine = "xelatex";
13        citeproc = true;
14      };
15    };
16
17    nmt.script = ''
18      assertFileContent ${cfg.defaultsFile} ${./defaults-expected.json}
19
20      # Test that defaults are set by looking at the metadata for an empty file
21      # (it should contain the author that we set in defaults).
22      output=$(mktemp)
23      ${cfg.finalPackage}/bin/pandoc --standalone \
24        -f markdown /dev/null \
25        -t native -o "$output"
26      assertFileContent "$output" ${./output-expected}
27    '';
28  };
29}
30