From 54931faf9a276818bc4a9d88562b0010da534577 Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 16 Sep 2023 12:24:24 +0000 Subject: [PATCH] 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: - but it's controlled via the "webkit" meson flag: - --- pkgs/applications/misc/font-manager/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/font-manager/default.nix b/pkgs/applications/misc/font-manager/default.nix index cd42abbc76b0..40cbeaea6130 100644 --- a/pkgs/applications/misc/font-manager/default.nix +++ b/pkgs/applications/misc/font-manager/default.nix @@ -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 = ''