It fails with the following error:
these derivations will be built:
/nix/store/vi2h9y86habvy1f93v5fwv8j40yfnrvg-test.drv
building path(s) ‘/nix/store/695xy91z65qhqiwyf224588n9ybdfada-test’
! LaTeX Error: File `article.cls' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)
Enter file name:
! Emergency stop.
<read *>
l.2 \usepackage
pandoc: Error producing PDF
builder for ‘/nix/store/vi2h9y86habvy1f93v5fwv8j40yfnrvg-test.drv’ failed with exit code 43
error: build of ‘/nix/store/vi2h9y86habvy1f93v5fwv8j40yfnrvg-test.drv’ failed
In test.md
, add some text.
let
pkgs = import <nixpkgs> {};
in
pkgs.runCommand "test" {
buildInputs = [
pkgs.pandoc
pkgs.texlive.combined.scheme-basic
];
rootFile = ./test.md;
} ''
mkdir -p $out
pandoc $rootFile -o $out/test.pdf
''
I don't experience the same error:
these derivations will be built:
/nix/store/5ysglzzlvp4gzxhjr0ghw8gqj8r0gb79-test.drv
building path(s) ‘/nix/store/8m5d9hy753x6cifq9glx866i2620p8hb-test’
! LaTeX Error: File `lmodern.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.3 \usepackage
pandoc: Error producing PDF
builder for ‘/nix/store/5ysglzzlvp4gzxhjr0ghw8gqj8r0gb79-test.drv’ failed with exit code 43
error: build of ‘/nix/store/5ysglzzlvp4gzxhjr0ghw8gqj8r0gb79-test.drv’ failed
but I guess scheme-basic does not contain everything pandoc needs. Using texlive.combined.scheme-small
worked for me.
Maybe there can be some documentation on what does scheme-basic
contain and what does scheme-small
contain, and what's necessary for pandoc to work.
I'm not aware of that. Still, *TeX typically does report what's missing – lmodern.sty
in this case. What I used to do in these cases: I kept the *.tlpdb
file from upstream, as it contains file lists for all TeX Live packages, and I searched that manually for the missing files...
Most helpful comment
I don't experience the same error:
but I guess scheme-basic does not contain everything pandoc needs. Using
texlive.combined.scheme-small
worked for me.