Since there is no functional pandoc-include
(the original haskell one doesn’t build (too ancient?) and the python-based one needs pip
which is also cumbersome in nix (as a system-wide solution anyway)), I try to use include-files.lua
from pandoc-lua-filters
, but installation doesn’t link to /current-system/sw/share
as expected (why?), but I need to hard-code the lua file location in pandocomatic.yml
.
I suppose the “preferred” way would be that the usual link is produced during nixos-rebuild
, so I can just refer to /current-system/...
How to achieve this?
While we’re at it: since there is no nix-package for pandocomatic
I install it via gem install pandocomatic
after which I manually have to fix the shebang to #!/usr/bin/env ruby
instead of #! ruby
.
So that looks that it would be best to package it myself?
Or is a more ideomatic way (“the nix way”) to define a nix-shell
in my ~/.pandoc
which includes the complete pandoc(omatic)
, texlive
etc. environment, including shebang patching etc.?
Alternatively/additionally: what would be a good way to wrap a python pandoc filter (e.g. pandoc-xnos
)? I suppose it must be possible to make an executable with #!/usr/bin/env nix-shell
that acts the same (i.e. executes it under the hood) as said python module?