about summary refs log tree commit diff
path: root/pkgs/desktops
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2017-11-23 22:11:40 +0100
committerJan Tojnar <jtojnar@gmail.com>2017-11-23 22:35:29 +0100
commit9c7a06d595362ea96b2b69074deff29eea6c5e00 (patch)
tree5f8b6f265f3106ecdab504032541d78481b06311 /pkgs/desktops
parentd6d96c3274a1b0dac6fa56f382719168f9a188af (diff)
downloadnixlib-9c7a06d595362ea96b2b69074deff29eea6c5e00.tar
nixlib-9c7a06d595362ea96b2b69074deff29eea6c5e00.tar.gz
nixlib-9c7a06d595362ea96b2b69074deff29eea6c5e00.tar.bz2
nixlib-9c7a06d595362ea96b2b69074deff29eea6c5e00.tar.lz
nixlib-9c7a06d595362ea96b2b69074deff29eea6c5e00.tar.xz
nixlib-9c7a06d595362ea96b2b69074deff29eea6c5e00.tar.zst
nixlib-9c7a06d595362ea96b2b69074deff29eea6c5e00.zip
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.
Diffstat (limited to 'pkgs/desktops')
-rw-r--r--pkgs/desktops/gnome-3/core/gsettings-desktop-schemas/default.nix14
1 files changed, 9 insertions, 5 deletions
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 ];