Pandoc and latex (via xelatex) unknown option error

I’m having trouble getting pandoc and latex to play nicely together.

Given an empty input file:

$ ls -al empty.md
-rw-r--r-- 1 adam users 5 Sep 28 22:15 empty.md
$ cat empty.md 
# hi

pandoc (version 2.10.1) outputs:

$ pandoc --from=markdown --to=latex --pdf-engine=xelatex -o x.pdf empty.md
Error producing PDF.
! LaTeX Error: Unknown option `hyphens' for package `url'.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.5148 \let

However pandoc has no problem with another format

$ pandoc --from markdown --to html -o empty.html empty.md
$ cat empty.html
<h1 id="hi">hi</h1>

I have a far more complicated setup that results in

! LaTeX Error: Unknown option `dvipsnames' for package `xcolor'.

But I’m assuming they are related.

Well, pandoc is a text-to-text converter. Maybe reading pandoc pure text output we can discover something. Can you post it here?

I have this version installed:

$ nix-env -q|cat|grep tex
texlive-combined-full-2019

And the full output

$ pandoc --verbose --from markdown --pdf-engine pdflatex -o empty.pdf empty.md
[makePDF] temp dir:
/tmp/tex2pdf.-2ea7b706d683b266
[makePDF] Command line:
pdflatex "-halt-on-error" "-interaction" "nonstopmode" "-output-directory" "/tmp/tex2pdf.-2ea7b706d683b266" "/tmp/tex2pdf.-2ea7b706d683b266/input.tex"

[makePDF] Environment:
("TEXINPUTS","/tmp/tex2pdf.-2ea7b706d683b266:")
("TEXMFOUTPUT","/tmp/tex2pdf.-2ea7b706d683b266")
("ASPELL_CONF","dict-dir /home/adam/.nix-profile/lib/aspell")
("COLORFGBG","15;0")
("COLORTERM","truecolor")
("CUPS_DATADIR","/nix/store/qbsxv14hfqnw7b5c99gjxifzzliayh8j-cups-progs/share/cups")
("DBUS_SESSION_BUS_ADDRESS","unix:abstract=/tmp/dbus-ptUc3ZpMPj,guid=dd30e4b8b81204e5c1bb9b3b5f6552b1")
("DESKTOP_SESSION","none+xmonad")
("DISPLAY",":0")
("EDITOR","emacs -nw -Q")
("EMAIL","adam@adamflott.com")
("GDK_PIXBUF_MODULE_FILE","/nix/store/qzdrlg79lkfm7x71fp4h1162vhr7bj0d-gdk-pixbuf-loaders.cache")
("GDMSESSION","none+xmonad")
("GPG_TTY","/dev/pts/3")
("GTK_PATH","/home/adam/.nix-profile/lib/gtk-2.0:/home/adam/.nix-profile/lib/gtk-3.0:/etc/profiles/per-user/adam/lib/gtk-2.0:/etc/profiles/per-user/adam/lib/gtk-3.0:/nix/var/nix/profiles/default/lib/gtk-2.0:/nix/var/nix/profiles/default/lib/gtk-3.0:/run/current-system/sw/lib/gtk-2.0:/run/current-system/sw/lib/gtk-3.0")
("HOME","/home/adam")
("INFOPATH","/home/adam/.nix-profile/info:/home/adam/.nix-profile/share/info:/etc/profiles/per-user/adam/info:/etc/profiles/per-user/adam/share/info:/nix/var/nix/profiles/default/info:/nix/var/nix/profiles/default/share/info:/run/current-system/sw/info:/run/current-system/sw/share/info")
("KDEDIRS","/home/adam/.nix-profile:/etc/profiles/per-user/adam:/nix/var/nix/profiles/default:/run/current-system/sw")
("KONSOLE_DBUS_SERVICE",":1.25")
("KONSOLE_DBUS_SESSION","/Sessions/1")
("KONSOLE_DBUS_WINDOW","/Windows/1")
("KONSOLE_VERSION","191203")
("LANG","en_US.UTF-8")
("LANGUAGE","")
("LD_LIBRARY_PATH","/nix/store/1vxaj2y80iarnmlnj3n96257m4l4kgpi-sane-config/lib/sane")
("LESS","-R")
("LIBEXEC_PATH","/home/adam/.nix-profile/lib/libexec:/etc/profiles/per-user/adam/lib/libexec:/nix/var/nix/profiles/default/lib/libexec:/run/current-system/sw/lib/libexec")
("LOCALE_ARCHIVE","/run/current-system/sw/lib/locale/locale-archive")
("LOGNAME","adam")
("LSCOLORS","Gxfxcxdxbxegedabagacad")
("LS_COLORS","rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:")
("MOZ_PLUGIN_PATH","/home/adam/.nix-profile/lib/mozilla/plugins:/etc/profiles/per-user/adam/lib/mozilla/plugins:/nix/var/nix/profiles/default/lib/mozilla/plugins:/run/current-system/sw/lib/mozilla/plugins")
("NIXPKGS_CONFIG","/etc/nix/nixpkgs-config.nix")
("NIX_GHC","/nix/store/qp48zwg06h5jfdn60a71jybn213z6hcp-ghc-8.6.5-with-packages/bin/ghc")
("NIX_PATH","/home/adam/.nix-defexpr/channels:nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels")
("NIX_PROFILES","/run/current-system/sw /nix/var/nix/profiles/default /etc/profiles/per-user/adam /home/adam/.nix-profile")
("NIX_USER_PROFILE_DIR","/nix/var/nix/profiles/per-user/adam")
("NO_AT_BRIDGE","1")
("PAGER","less -R")
("PATH","/home/adam/bin:/home/adam/.local/bin:/home/adam/go/bin:/home/adam/.cargo/bin:/home/adam/bin:/home/adam/.local/bin:/home/adam/go/bin:/home/adam/.cargo/bin:/run/wrappers/bin:/home/adam/.nix-profile/bin:/etc/profiles/per-user/adam/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin")
("PROFILEHOME","")
("PWD","/home/adam/src/")
("QML2_IMPORT_PATH","/nix/store/2d2ai0cqvz0fjc0cygwrqwclj8dz0z8s-knewstuff-5.66.0-bin/lib/qt-5.12.7/qml:/nix/store/dyxx8hqa3z016mk6v0kg6mqqdlv5mx6c-kirigami2-5.66.0/lib/qt-5.12.7/qml:/nix/store/k0flx0xciabyzhdnfzniv520szw1n7m5-qtquickcontrols2-5.12.7-bin/lib/qt-5.12.7/qml:/nix/store/9xbp1yimj7nc8wrgs9hkywad58gjnra2-kitemmodels-5.66.0/lib/qt-5.12.7/qml:/nix/store/qbn4ckq7fkygdsiyng8yf060i7hdjq6q-solid-5.66.0-bin/lib/qt-5.12.7/qml:/nix/store/lnrr8i3b0dwwncsi9k21yfr6h2ly5fn0-qtwayland-5.12.7-bin/lib/qt-5.12.7/qml:/nix/store/lx0l0j2hrjrppx0vrq98l4aw596cyncz-qtquickcontrols-5.12.7/lib/qt-5.12.7/qml:/nix/store/dagfh54rwrw0489kj6j31q5v6bba8ilh-qtdeclarative-5.12.7-bin/lib/qt-5.12.7/qml")
("QTWEBKIT_PLUGIN_PATH","/home/adam/.nix-profile/lib/mozilla/plugins/:/etc/profiles/per-user/adam/lib/mozilla/plugins/:/nix/var/nix/profiles/default/lib/mozilla/plugins/:/run/current-system/sw/lib/mozilla/plugins/")
("QT_PLUGIN_PATH","/nix/store/qpn0fivkx5k833d4nmi8gp93nm6h7mi7-konsole-19.12.3/lib/qt-5.12.7/plugins:/nix/store/4339ghnyplqw1fpx08vxfy8yc0cw82wk-kdelibs4support-5.66.0/lib/qt-5.12.7/plugins:/nix/store/6w6dylk83ps70z9ynkznm137pc84n9cg-kemoticons-5.66.0-bin/lib/qt-5.12.7/plugins:/nix/store/qd3x3mjlz841rzdlfgl55y393g46k8k4-kplotting-5.66.0/lib/qt-5.12.7/plugins:/nix/store/bv9x5jf00mjg1n16ywvbiq1v4pp2qrj6-kio-5.66.0/lib/qt-5.12.7/plugins:/nix/store/819qfk31plj4iz4pysnl6sp95z4vlvw4-phonon-4.11.1/lib/qt-5.12.7/plugins:/nix/store/kc6i7dh6r1bidxsgdnr3fq6ic68mycbs-kxmlgui-5.66.0-bin/lib/qt-5.12.7/plugins:/nix/store/b9prj2rqs8d08gfybzd0km519xnb69i7-ktextwidgets-5.66.0-bin/lib/qt-5.12.7/plugins:/nix/store/07r47zkpswmc5znl4fmx5f44lb0ah5if-kcompletion-5.66.0/lib/qt-5.12.7/plugins:/nix/store/ckksw9a1gc806vkrnbzx1mzjzs78gwvh-sonnet-5.66.0-bin/lib/qt-5.12.7/plugins:/nix/store/b895y91yc0d4zc7fijw4r5v4qx89sl0k-kglobalaccel-5.66.0-bin/lib/qt-5.12.7/plugins:/nix/store/bib4xvsq7ca81ws571j9fawzl8cj35ya-kwindowsystem-5.66.0/lib/qt-5.12.7/plugins:/nix/store/nvp8hg4aym9ng9jd5cw8nyzscxbpi01q-kiconthemes-5.66.0-bin/lib/qt-5.12.7/plugins:/nix/store/imzhvl4kac5a0wcshvdh3f7dfxqlc030-kitemviews-5.66.0/lib/qt-5.12.7/plugins:/nix/store/jjy7n2r9r0szm6baks40jvbckry39f4z-kguiaddons-5.66.0/lib/qt-5.12.7/plugins:/nix/store/6p616742zbs3nvw0wq7rsmwdmy0lv3pj-kauth-5.66.0/lib/qt-5.12.7/plugins:/nix/store/fprmgsjxj2yr1a6xdh3cz25jwiwp26za-kconfigwidgets-5.66.0-dev/lib/qt-5.12.7/plugins:/nix/store/3dmz18p5i8bwmggildjwh0aqjyrcb45i-kwidgetsaddons-5.66.0/lib/qt-5.12.7/plugins:/nix/store/zqyr9vgmjqhfk0jyya51bmsdj1kv00gn-ki18n-5.66.0-bin/lib/qt-5.12.7/plugins:/nix/store/lnrr8i3b0dwwncsi9k21yfr6h2ly5fn0-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins:/nix/store/dagfh54rwrw0489kj6j31q5v6bba8ilh-qtdeclarative-5.12.7-bin/lib/qt-5.12.7/plugins:/nix/store/kxlmik0yjq44b2kfliq7qf6lgv6pp4na-qtsvg-5.12.7-bin/lib/qt-5.12.7/plugins:/nix/store/yqdicanwdl2x3pjdv0n3rwlcr7xh74gj-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins:/home/adam/.nix-profile/lib/qt4/plugins:/home/adam/.nix-profile/lib/kde4/plugins:/etc/profiles/per-user/adam/lib/qt4/plugins:/etc/profiles/per-user/adam/lib/kde4/plugins:/nix/var/nix/profiles/default/lib/qt4/plugins:/nix/var/nix/profiles/default/lib/kde4/plugins:/run/current-system/sw/lib/qt4/plugins:/run/current-system/sw/lib/kde4/plugins")
("SANE_CONFIG_DIR","/nix/store/1vxaj2y80iarnmlnj3n96257m4l4kgpi-sane-config/etc/sane.d")
("SHELL","/run/current-system/sw/bin/zsh")
("SHELL_SESSION_ID","cb15d53667f74ee3a4c0446515a38b4d")
("SHLVL","4")
("SSH_AGENT_PID","21196")
("SSH_ASKPASS","/nix/store/xkzb71pwzkdbq81xfjdyx3p6f8x7j7m7-ksshaskpass-5.17.5/bin/ksshaskpass")
("SSH_AUTH_SOCK","/tmp/ssh-Yv5YVsEqWQGk/agent.21194")
("STRIGI_PLUGIN_PATH","/home/adam/.nix-profile/lib/strigi/:/etc/profiles/per-user/adam/lib/strigi/:/nix/var/nix/profiles/default/lib/strigi/:/run/current-system/sw/lib/strigi/")
("TERM","screen")
("TERMINFO_DIRS","/home/adam/.nix-profile/share/terminfo:/etc/profiles/per-user/adam/share/terminfo:/nix/var/nix/profiles/default/share/terminfo:/run/current-system/sw/share/terminfo")
("TMUX","/tmp/tmux-1000/default,9457,0")
("TMUX_PANE","%25")
("TZDIR","/etc/zoneinfo")
("USER","adam")
("VISUAL","emacs -nw -Q")
("WINDOWID","67108871")
("XAUTHORITY","/home/adam/.Xauthority")
("XCURSOR_PATH","/home/adam/.icons:/home/adam/.local/share/icons:/home/adam/.nix-profile/share/icons:/home/adam/.nix-profile/share/pixmaps:/etc/profiles/per-user/adam/share/icons:/etc/profiles/per-user/adam/share/pixmaps:/nix/var/nix/profiles/default/share/icons:/nix/var/nix/profiles/default/share/pixmaps:/run/current-system/sw/share/icons:/run/current-system/sw/share/pixmaps")
("XDG_CONFIG_DIRS","/nix/store/4339ghnyplqw1fpx08vxfy8yc0cw82wk-kdelibs4support-5.66.0/etc/xdg:/nix/store/bv9x5jf00mjg1n16ywvbiq1v4pp2qrj6-kio-5.66.0/etc/xdg:/nix/store/wmwg5sknl5n0s2iivsmxcb3y1sp4gjkb-kservice-5.66.0-bin/etc/xdg:/nix/store/kc6i7dh6r1bidxsgdnr3fq6ic68mycbs-kxmlgui-5.66.0-bin/etc/xdg:/etc/xdg:/home/adam/.nix-profile/etc/xdg:/etc/profiles/per-user/adam/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg")
("XDG_CURRENT_DESKTOP","none+xmonad")
("XDG_DATA_DIRS","/nix/store/qpn0fivkx5k833d4nmi8gp93nm6h7mi7-konsole-19.12.3/share:/nix/store/yjsngfdqsf6gssmyg893smk9a5zbxfh8-knewstuff-5.66.0/share:/nix/store/dyxx8hqa3z016mk6v0kg6mqqdlv5mx6c-kirigami2-5.66.0/share:/nix/store/blm3j2h70aqm8ghvr8wasgk1b291a1gw-kpty-5.66.0/share:/nix/store/g7p24gji4bp3z0rm0z3fpfsds1qa2v32-knotifyconfig-5.66.0/share:/nix/store/4339ghnyplqw1fpx08vxfy8yc0cw82wk-kdelibs4support-5.66.0/share:/nix/store/f0j5ddc9kh6k99dq2pby11lib1jv4fzf-kded-5.66.0/share:/nix/store/aw5rbrwd1n3ykbk55xcb8421mp7jkbij-kunitconversion-5.66.0/share:/nix/store/59vix9gp7p80l6krb1m6yffyinijnw1m-kparts-5.66.0/share:/nix/store/pzsgj2prnisn91ki91c6dbwk3jg9h1wd-kparts-5.66.0-bin/share:/nix/store/flgiflfxpsbj3m8mrwqbx3bkrwsbafh7-kinit-5.66.0/share:/nix/store/6w6dylk83ps70z9ynkznm137pc84n9cg-kemoticons-5.66.0-bin/share:/nix/store/b7bhd2wzjpcjhcs1f7izk7li9ivvp7rf-kdesignerplugin-5.66.0/share:/nix/store/0r63kcsnbpmnssxnsd8vfqixnyr35qng-kwallet-5.66.0/share:/nix/store/zw4wx4va5iyayfjkm4n0zp357gd36nds-kwallet-5.66.0-bin/share:/nix/store/ca8r0jxwhyjrmspqycyajhq3j2f95m16-knotifications-5.66.0/share:/nix/store/6af02i7v4hq9gvgzx9lnzgvlq1wl3q45-knotifications-5.66.0-bin/share:/nix/store/904sz4xpmdix1pbix48fxl47g22gmjh4-solid-5.66.0/share:/nix/store/njaihf2cnjysfc2xv5pw7ixhhzhd1pp6-kjobwidgets-5.66.0/share:/nix/store/zbv67nvqzzns72w465jg9n9hm7hh86zn-kjobwidgets-5.66.0-bin/share:/nix/store/bv9x5jf00mjg1n16ywvbiq1v4pp2qrj6-kio-5.66.0/share:/nix/store/819qfk31plj4iz4pysnl6sp95z4vlvw4-phonon-4.11.1/share:/nix/store/jgd9z4nx59in3pqyipri5i9kgkx6lrnw-kbookmarks-5.66.0/share:/nix/store/zjmk0w3565wrnqpmnh8f4i7x1f4mj3m2-kxmlgui-5.66.0/share:/nix/store/agjxf1xplzjzcih7yif4lhf77p57h340-ktextwidgets-5.66.0/share:/nix/store/79dyj4qdnsxwfw3382yac76w2iml9skk-sonnet-5.66.0/share:/nix/store/waw6ah6a5m1vn5gs3vn8fj2pvdcspjdr-kglobalaccel-5.66.0/share:/nix/store/rs8nnyak1biipgcxslf3j85pldmqrk27-kservice-5.66.0/share:/nix/store/wmwg5sknl5n0s2iivsmxcb3y1sp4gjkb-kservice-5.66.0-bin/share:/nix/store/ns71xrg9prid6iki1bz5l21a8dbq1h6w-kdbusaddons-5.66.0/share:/nix/store/glnbw8awd7qg1banpxdaidh9dh8x5q7p-kiconthemes-5.66.0/share:/nix/store/07r47zkpswmc5znl4fmx5f44lb0ah5if-kcompletion-5.66.0/share:/nix/store/b895y91yc0d4zc7fijw4r5v4qx89sl0k-kglobalaccel-5.66.0-bin/share:/nix/store/bib4xvsq7ca81ws571j9fawzl8cj35ya-kwindowsystem-5.66.0/share:/nix/store/imzhvl4kac5a0wcshvdh3f7dfxqlc030-kitemviews-5.66.0/share:/nix/store/snr1falhihnizn7l1x2c58kwv6qqm8xp-kconfigwidgets-5.66.0/share:/nix/store/whqs3wmd4yjipradwblf188x07w19gda-kconfig-5.66.0/share:/nix/store/f7jk632i6bv4bvnpbkr62md57fzb3c5x-kcodecs-5.66.0/share:/nix/store/6p616742zbs3nvw0wq7rsmwdmy0lv3pj-kauth-5.66.0/share:/nix/store/swbsgwd29pbdswm02n02vc4b7i2agqlp-kcoreaddons-5.66.0/share:/nix/store/w2a1z9bhcbbmxgg4h82xbrn67khav1wz-kcoreaddons-5.66.0-bin/share:/nix/store/3dmz18p5i8bwmggildjwh0aqjyrcb45i-kwidgetsaddons-5.66.0/share:/nix/store/p36c6wdw43c9f6wdss95ji41wyyg0gp0-flex-2.6.4/share:/nix/store/6nwlbsiaagry6vxpl23m33cx1j389fyk-bison-3.5.1/share:/nix/store/nd59nqlxn6mbr1z7bc5vm3jyxrfd3wp2-kdoctools-5.66.0/share:/nix/store/xwk9067hgsnlqsc02yza1s5jpnc28hpk-ki18n-5.66.0/share:/nix/store/p3cblqmzcv43g8w7jrv2mm2qvnd054rn-systemd-243.7/share:/nix/store/vz7cr1r2a14hki9sig0nypf1rc4qcw17-systemd-243.7-lib/share:/nix/store/9dsvcqg7mhkq7727afqb0dhdvmrvv9w5-glib-2.62.6/share:/nix/store/kpmbp2nlwzf6cdgq37phlf5kfdz8dbsv-gettext-0.20.1/share:/nix/store/7wr8jngfihcpzkfdralkikg6187agqqg-dbus-1.12.16/share:/nix/store/jj7dqm9m5cav4gqmwqpkf1z66g0ipwv6-xz-5.2.4/share:/home/adam/.nix-profile/share:/etc/profiles/per-user/adam/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share")
("XDG_DESKTOP_PORTAL_DIR","/nix/store/dxgsrgyd9phqgxis3jy0m0p79fnmf52p-xdg-portals/share/xdg-desktop-portal/portals")
("XDG_GREETER_DATA_DIR","/var/lib/lightdm-data/adam")
("XDG_RUNTIME_DIR","/run/user/1000")
("XDG_SEAT","seat0")
("XDG_SEAT_PATH","/org/freedesktop/DisplayManager/Seat0")
("XDG_SESSION_CLASS","user")
("XDG_SESSION_DESKTOP","none+xmonad")
("XDG_SESSION_ID","2")
("XDG_SESSION_PATH","/org/freedesktop/DisplayManager/Session0")
("XDG_SESSION_TYPE","x11")
("XDG_VTNR","7")
("XMONAD_XMESSAGE","/nix/store/2xnpbi1fy0jpxlv14gwvyyzcrx8vgp4f-xmessage-1.0.5/bin/xmessage")
("ZSH","/home/adam/.oh-my-zsh")
("ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE","fg=8")
("ZSH_TMUX_CONFIG","/home/adam/.tmux.conf")
("ZSH_TMUX_TERM","screen")
("_","/home/adam/.nix-profile/bin/pandoc")
("_ZSH_TMUX_FIXED_CONFIG","/home/adam/.oh-my-zsh/plugins/tmux/tmux.extra.conf")
("__ETC_PROFILE_DONE","1")
("__NIXOS_SET_ENVIRONMENT_DONE","1")

[makePDF] Source:
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math}
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
  hidelinks,
  pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifluatex
  \usepackage{selnolig}  % disable illegal ligatures
\fi

\author{}
\date{}

\begin{document}

\hypertarget{hi}{%
\section{hi}\label{hi}}

\end{document}

[makePDF] Run #1
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/NixOS.org) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(/tmp/tex2pdf.-2ea7b706d683b266/input.tex
LaTeX2e <2019-10-01> patch level 1

(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/article.cls
Document Class: article 2019/08/27 v1.4j Standard LaTeX document class

(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/size10.clo))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/lm/lmodern.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsfonts/amssymb.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsfonts/amsfonts.sty))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.

(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsmath/amstext.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsmath/amsgen.sty))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsmath/amsbsy.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsmath/amsopn.sty))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/ifxetex/ifxetex.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/ifluatex.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/fontenc.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/t1enc.def))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/inputenc.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/textcomp.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/ts1enc.def
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/ts1enc.dfu)))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/upquote/upquote.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/microtype/microtype.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/graphics/keyval.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/microtype/microtype-pdftex.def)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/microtype/microtype.cfg))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/parskip/parskip.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/oberdiek/kvoptions.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/ltxcmds.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/kvsetkeys.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/infwarerr.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/etexcmds.sty)))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/etoolbox/etoolbox.sty))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/xcolor/xcolor.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/xurl/xurl.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/oberdiek/bookmark.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/pdfescape.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/pdftexcmds.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/ifpdf.sty)))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/ifvtex.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/hyperref/hyperref.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/hobsub-hyperref.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/hobsub-generic.sty))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/oberdiek/auxhook.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/hyperref/pd1enc.def)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/latexconfig/hyperref.cfg)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/hyperref/puenc.def)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/url/url.sty)

! LaTeX Error: Unknown option `hyphens' for package `url'.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.5148 \let
           \HyOrg@url\url
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on /tmp/tex2pdf.-2ea7b706d683b266/input.log.

[makePDF] Run #2
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/NixOS.org) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(/tmp/tex2pdf.-2ea7b706d683b266/input.tex
LaTeX2e <2019-10-01> patch level 1

(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/article.cls
Document Class: article 2019/08/27 v1.4j Standard LaTeX document class

(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/size10.clo))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/lm/lmodern.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsfonts/amssymb.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsfonts/amsfonts.sty))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.

(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsmath/amstext.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsmath/amsgen.sty))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsmath/amsbsy.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/amsmath/amsopn.sty))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/ifxetex/ifxetex.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/ifluatex.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/fontenc.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/t1enc.def))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/inputenc.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/textcomp.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/ts1enc.def
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/base/ts1enc.dfu)))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/upquote/upquote.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/microtype/microtype.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/graphics/keyval.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/microtype/microtype-pdftex.def)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/microtype/microtype.cfg))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/parskip/parskip.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/oberdiek/kvoptions.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/ltxcmds.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/kvsetkeys.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/infwarerr.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/etexcmds.sty)))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/etoolbox/etoolbox.sty))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/xcolor/xcolor.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/xurl/xurl.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/oberdiek/bookmark.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/pdfescape.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/pdftexcmds.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/ifpdf.sty)))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/ifvtex.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/hyperref/hyperref.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/hobsub-hyperref.sty
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/generic/oberdiek/hobsub-generic.sty))
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/oberdiek/auxhook.sty)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/hyperref/pd1enc.def)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/latexconfig/hyperref.cfg)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/hyperref/puenc.def)
(/nix/store/jbikf35rbm143pb9wb02jxzrjm4d962n-texlive-combined-full-2019/share/t
exmf/tex/latex/url/url.sty)

! LaTeX Error: Unknown option `hyphens' for package `url'.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.5148 \let
           \HyOrg@url\url
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on /tmp/tex2pdf.-2ea7b706d683b266/input.log.

Error producing PDF.
! LaTeX Error: Unknown option `hyphens' for package `url'.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.5148 \let

It looks like a typical ordering bug of LaTeX packages. Usually it could be solved by reordering the packages in the preamble, but it implies modifying some config in Pandoc itself somehow.

I will try to test it later in a more traditional distro.