font-manager: allow building without webkit

webkit is only beneficial if browsing non-local fonts and building
without it greatly reduces closure size (measurements from
`nix path-info -S` on x86_64):

- `withWebkit=true`: 1203033312
- `withWebkit=false`: 372203760

upstream calls this feature "Google Font integration" here:
- <https://github.com/FontManager/font-manager#building-from-source>

but it's controlled via the "webkit" meson flag:
- <https://github.com/FontManager/font-manager/blob/master/meson.build#L29>
This commit is contained in:
Colin 2023-09-16 12:24:24 +00:00
parent d7b87590ea
commit 54931faf9a

View File

@ -18,9 +18,8 @@
, desktop-file-utils
, wrapGAppsHook
, gobject-introspection
, libsoup
, glib-networking
, webkitgtk
# withWebkit enables the "webkit" feature, also known as Google Fonts
, withWebkit ? true, glib-networking, libsoup, webkitgtk
}:
stdenv.mkDerivation rec {
@ -56,13 +55,15 @@ stdenv.mkDerivation rec {
gsettings-desktop-schemas # for font settings
gtk3
gnome.adwaita-icon-theme
libsoup
] ++ lib.optionals withWebkit [
glib-networking # for SSL so that Google Fonts can load
libsoup
webkitgtk
];
mesonFlags = [
"-Dreproducible=true" # Do not hardcode build directory…
(lib.mesonBool "webkit" withWebkit)
];
postPatch = ''