summary refs log tree commit diff
path: root/pkgs/desktops/gnome/core/nautilus
diff options
context:
space:
mode:
authorcolin <colin@uninsane.org>2022-10-14 06:38:35 -0700
committerJan Tojnar <jtojnar@gmail.com>2022-10-25 17:26:07 +0200
commit22834c42cc688b4e52a96d17b0d2a71698125239 (patch)
tree705f5d63ca2678d7cd9b0ced15bf366f5c1ad61a /pkgs/desktops/gnome/core/nautilus
parent1ce20e8b30c6053044e5019c4f141df8bcdceaad (diff)
downloadnixpkgs-22834c42cc688b4e52a96d17b0d2a71698125239.tar
nixpkgs-22834c42cc688b4e52a96d17b0d2a71698125239.tar.gz
nixpkgs-22834c42cc688b4e52a96d17b0d2a71698125239.tar.bz2
nixpkgs-22834c42cc688b4e52a96d17b0d2a71698125239.tar.lz
nixpkgs-22834c42cc688b4e52a96d17b0d2a71698125239.tar.xz
nixpkgs-22834c42cc688b4e52a96d17b0d2a71698125239.tar.zst
nixpkgs-22834c42cc688b4e52a96d17b0d2a71698125239.zip
gnome.nautilus: use the gtk4 FileChooser settings schema (fixes crash-on-start)
upstream PR for more context: <https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1013>

with the recent nixpkgs bump from GNOME 42 -> 43, we build nautilus with
gtk4 (as upstream expects). if the user has nothing else in their
environment providing gtk3, then nautilus fails to locate a gtk3
gsettings schema it depends on. i.e.

```console
$ nautilus
(org.gnome.Nautilus): GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed
```

we could solve this on our end by adding gtk3 to `gappsWrapperArgs`, but
this seems like an upstream bug: i believe they mean to use the gtk4 settings
schemas instead of the legacy gtk3 ones.
Diffstat (limited to 'pkgs/desktops/gnome/core/nautilus')
-rw-r--r--pkgs/desktops/gnome/core/nautilus/default.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/desktops/gnome/core/nautilus/default.nix b/pkgs/desktops/gnome/core/nautilus/default.nix
index 5eacfdac5ba..48cc47b5d8e 100644
--- a/pkgs/desktops/gnome/core/nautilus/default.nix
+++ b/pkgs/desktops/gnome/core/nautilus/default.nix
@@ -1,5 +1,6 @@
 { lib
 , stdenv
+, fetchpatch
 , fetchurl
 , meson
 , ninja
@@ -48,6 +49,17 @@ stdenv.mkDerivation rec {
   };
 
   patches = [
+    # Switch to GTK 4 settings schema to avoid crash when GTK 3 did not manage to contaminate environment.
+    # https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1013
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/nautilus/-/commit/96d542a0d84da4ad6915a7727642490a5c433d4a.patch";
+      sha256 = "BO/0ifRwSTDe7RV+DI3CPZg+UQezk0tbM+UidgoJRQM=";
+    })
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/nautilus/-/commit/52b4daf4396fd3b21755b3a0d1fbf85c3831c6b1.patch";
+      sha256 = "+8KCw2HZUi9UgOEUBNp4kbwqOI1qz6i0Q/wvzqTb8OA=";
+    })
+
     # Allow changing extension directory using environment variable.
     ./extension_dir.patch