Pandoc and pdflatex


I’d like to use the venerable pandoc to convert some word docx to PDF. So I installed pandoc and then ran: pandoc myfile.docx -o myfile.pdf and got:

pdflatex not found. Please select a different --pdf-engine or install pdflatex

After some fiddling, I installed tetex and that seemed to help, but then came to a new error:

Error producing PDF.
! LaTeX Error: File `ifxetex.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.10 \ifnum

After some research, I came to find TexLive - NixOS Wiki, which has a table with an entry:

Scheme-small 	nixpkgs.texlive.combined.scheme-small 	contains everything in the basic scheme + xetex, metapost, a few languages. 

That includes xetex (mentioned in the error and other pages like
Then I installed texlive.combined.scheme-small, but I still see the same error.
Even with the full package, I am still seeing the same error.

I can build the PDF using -t html and wkhtmltopdf, but the PDF that results isn’t correct.

How should I install/use latex with pandoc to render PDF properly?

Thank you!