Nixpkgs: Issue using pandoc and pdflatex

Created on 26 Apr 2017  Â·  3Comments  Â·  Source: NixOS/nixpkgs

Issue description

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

Steps to reproduce

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
  ''

Technical details

  • System: 17.03.1033.99dfb6dce3 (Gorilla)
  • Nix version: nix-env (Nix) 1.11.8
  • Nixpkgs version: "17.03.1033.99dfb6dce3"

Most helpful comment

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.

All 3 comments

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...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomberek picture tomberek  Â·  3Comments

langston-barrett picture langston-barrett  Â·  3Comments

chris-martin picture chris-martin  Â·  3Comments

ghost picture ghost  Â·  3Comments

copumpkin picture copumpkin  Â·  3Comments