From 9c7a06d595362ea96b2b69074deff29eea6c5e00 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 23 Nov 2017 22:11:40 +0100 Subject: gnome3.gsettings_desktop_schemas: do not depend on gnome-backgrounds We intend to make all GTK apps depend on the desktop schemas. Since the schemas depend on gnome-backgrounds to determine the default wallpaper path, it would increase the closure size significantly for smaller apps. We could split out the org.gnome.desktop.background and screensaver schemas but that would make the packaging unnecessarily complicated. Instead we remove the backgrounds dependency since they are not used (outside of GNOME) or they will be replaced by a different set by the NixOS module. There will be no background when running GNOME manually but that can be easily fixed. --- .../gnome-3/core/gsettings-desktop-schemas/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'pkgs') diff --git a/pkgs/desktops/gnome-3/core/gsettings-desktop-schemas/default.nix b/pkgs/desktops/gnome-3/core/gsettings-desktop-schemas/default.nix index 5123cadbdafd..977dd7ffd6fb 100644 --- a/pkgs/desktops/gnome-3/core/gsettings-desktop-schemas/default.nix +++ b/pkgs/desktops/gnome-3/core/gsettings-desktop-schemas/default.nix @@ -5,11 +5,15 @@ stdenv.mkDerivation rec { inherit (import ./src.nix fetchurl) name src; - postPatch = '' - for file in "background" "screensaver"; do - substituteInPlace "schemas/org.gnome.desktop.$file.gschema.xml.in" \ - --replace "@datadir@" "${gnome3.gnome-backgrounds}/share/" - done + preInstall = '' + mkdir -p $out/share/gsettings-schemas/${name}/glib-2.0/schemas + cat - > $out/share/gsettings-schemas/${name}/glib-2.0/schemas/remove-backgrounds.gschema.override <<- EOF + [org.gnome.desktop.background] + picture-uri=''' + + [org.gnome.desktop.screensaver] + picture-uri=''' + EOF ''; buildInputs = [ glib gobjectIntrospection ]; -- cgit 1.4.1