apostrophe: fix HTML export by referencing fira fonts from store

pandoc can embed fonts and stylesheets on export which apostrophe uses —
however it has hardcoded paths for the fonts which only work in the
flatpak version, so we need to substitute them.

(cherry picked from commit 4e1acab880f0c27741810754c237dfd50e9be5f8)
This commit is contained in:
sternenseemann 2021-07-08 15:59:09 +02:00 committed by sterni
parent 8b98eb8fd1
commit 3ebb71b547

View File

@ -2,7 +2,7 @@
, wrapGAppsHook, pkg-config, desktop-file-utils
, appstream-glib, pythonPackages, glib, gobject-introspection
, gtk3, webkitgtk, glib-networking, gnome, gspell, texlive
, shared-mime-info, libhandy
, shared-mime-info, libhandy, fira
}:
let
@ -31,6 +31,12 @@ in stdenv.mkDerivation rec {
glib-networking libhandy ];
postPatch = ''
substituteInPlace data/media/css/web/base.css \
--replace 'url("/app/share/fonts/FiraSans-Regular.ttf") format("ttf")' \
'url("${fira}/share/fonts/opentype/FiraSans-Regular.otf") format("otf")' \
--replace 'url("/app/share/fonts/FiraMono-Regular.ttf") format("ttf")' \
'url("${fira}/share/fonts/opentype/FiraMono-Regular.otf") format("otf")'
patchShebangs --build build-aux/meson_post_install.py
'';