From 94d1b0d54154614c17be5e4c9465f05b45cf851d Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 30 Nov 2021 09:13:44 +0800 Subject: [PATCH 1/2] pantheon.elementary-files: 6.0.4 -> 6.1.0 --- .../apps/elementary-files/default.nix | 6 ++-- ...-portal-hardcode-gsettings-for-nixos.patch | 28 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pkgs/desktops/pantheon/apps/elementary-files/default.nix b/pkgs/desktops/pantheon/apps/elementary-files/default.nix index dcd4591f1363..91dc48cf1c2f 100644 --- a/pkgs/desktops/pantheon/apps/elementary-files/default.nix +++ b/pkgs/desktops/pantheon/apps/elementary-files/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { pname = "elementary-files"; - version = "6.0.4"; + version = "6.1.0"; repoName = "files"; @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { owner = "elementary"; repo = repoName; rev = version; - sha256 = "sha256-FH6EYtgKADp8jjBoCwsdRdknlKS9v3iOtPiT3CyEc/8="; + sha256 = "sha256-aGiFEeSvDV5rPD2Ll/BuDoWclEPhR1UuoCxUSS9CGmw="; }; passthru = { @@ -90,7 +90,7 @@ stdenv.mkDerivation rec { chmod +x meson/post_install.py patchShebangs meson/post_install.py - substituteInPlace filechooser-portal/LegacyFileChooserDialog.vala \ + substituteInPlace filechooser-portal/FileChooserDialog.vala \ --subst-var-by ELEMENTARY_FILES_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"} ''; diff --git a/pkgs/desktops/pantheon/apps/elementary-files/filechooser-portal-hardcode-gsettings-for-nixos.patch b/pkgs/desktops/pantheon/apps/elementary-files/filechooser-portal-hardcode-gsettings-for-nixos.patch index b04208cc8b86..9ad9ee542728 100644 --- a/pkgs/desktops/pantheon/apps/elementary-files/filechooser-portal-hardcode-gsettings-for-nixos.patch +++ b/pkgs/desktops/pantheon/apps/elementary-files/filechooser-portal-hardcode-gsettings-for-nixos.patch @@ -1,24 +1,24 @@ -From 726ab4c0ab01273cb2197e4c151a5b69ff0954b6 Mon Sep 17 00:00:00 2001 +From 256d80aa2ab2b84316260d0be5263b02fd5e796f Mon Sep 17 00:00:00 2001 From: Bobby Rong -Date: Fri, 16 Jul 2021 18:24:58 +0800 +Date: Tue, 30 Nov 2021 10:24:39 +0800 Subject: [PATCH] filechooser-portal: hardcode gsettings for nixos --- - filechooser-portal/LegacyFileChooserDialog.vala | 4 +++- + filechooser-portal/FileChooserDialog.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -diff --git a/filechooser-portal/LegacyFileChooserDialog.vala b/filechooser-portal/LegacyFileChooserDialog.vala -index 330718f..f383bb1 100644 ---- a/filechooser-portal/LegacyFileChooserDialog.vala -+++ b/filechooser-portal/LegacyFileChooserDialog.vala -@@ -60,7 +60,9 @@ public class Files.LegacyFileChooserDialog : Object { - /* If not local only during creation, strange bug occurs on fresh installs */ - chooser_dialog.local_only = true; +diff --git a/filechooser-portal/FileChooserDialog.vala b/filechooser-portal/FileChooserDialog.vala +index 4a84016db..4bf2b32a1 100755 +--- a/filechooser-portal/FileChooserDialog.vala ++++ b/filechooser-portal/FileChooserDialog.vala +@@ -160,7 +160,9 @@ public class Files.FileChooserDialog : Hdy.Window, Xdp.Request { + accept_button.grab_default (); + setup_chooser (); -- var chooser_settings = new Settings ("io.elementary.files.file-chooser"); +- var settings = new Settings ("io.elementary.files.file-chooser"); + SettingsSchemaSource sss = new SettingsSchemaSource.from_directory ("@ELEMENTARY_FILES_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true); + SettingsSchema chooser_schema = sss.lookup ("io.elementary.files.file-chooser", false); -+ var chooser_settings = new Settings.full (chooser_schema, null, null); - - action_area = (Gtk.ButtonBox) chooser_dialog.get_action_area (); ++ var settings = new Settings.full (chooser_schema, null, null); + int width, height; + settings.get ("window-size", "(ii)", out width, out height); From 0a989ec7caa63aabd47b4aff5aecd5a754cd6cea Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 30 Nov 2021 15:38:11 +0800 Subject: [PATCH 2/2] pantheon.elementary-files: drop filechooser-portal-hardcode-gsettings-for-nixos.patch --- .../apps/elementary-files/default.nix | 8 +------ ...-portal-hardcode-gsettings-for-nixos.patch | 24 ------------------- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 pkgs/desktops/pantheon/apps/elementary-files/filechooser-portal-hardcode-gsettings-for-nixos.patch diff --git a/pkgs/desktops/pantheon/apps/elementary-files/default.nix b/pkgs/desktops/pantheon/apps/elementary-files/default.nix index 91dc48cf1c2f..747f9662680d 100644 --- a/pkgs/desktops/pantheon/apps/elementary-files/default.nix +++ b/pkgs/desktops/pantheon/apps/elementary-files/default.nix @@ -67,6 +67,7 @@ stdenv.mkDerivation rec { bamf elementary-dock elementary-icon-theme + glib granite gtk3 libcanberra @@ -82,16 +83,9 @@ stdenv.mkDerivation rec { zeitgeist ]; - patches = [ - ./filechooser-portal-hardcode-gsettings-for-nixos.patch - ]; - postPatch = '' chmod +x meson/post_install.py patchShebangs meson/post_install.py - - substituteInPlace filechooser-portal/FileChooserDialog.vala \ - --subst-var-by ELEMENTARY_FILES_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"} ''; meta = with lib; { diff --git a/pkgs/desktops/pantheon/apps/elementary-files/filechooser-portal-hardcode-gsettings-for-nixos.patch b/pkgs/desktops/pantheon/apps/elementary-files/filechooser-portal-hardcode-gsettings-for-nixos.patch deleted file mode 100644 index 9ad9ee542728..000000000000 --- a/pkgs/desktops/pantheon/apps/elementary-files/filechooser-portal-hardcode-gsettings-for-nixos.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 256d80aa2ab2b84316260d0be5263b02fd5e796f Mon Sep 17 00:00:00 2001 -From: Bobby Rong -Date: Tue, 30 Nov 2021 10:24:39 +0800 -Subject: [PATCH] filechooser-portal: hardcode gsettings for nixos - ---- - filechooser-portal/FileChooserDialog.vala | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/filechooser-portal/FileChooserDialog.vala b/filechooser-portal/FileChooserDialog.vala -index 4a84016db..4bf2b32a1 100755 ---- a/filechooser-portal/FileChooserDialog.vala -+++ b/filechooser-portal/FileChooserDialog.vala -@@ -160,7 +160,9 @@ public class Files.FileChooserDialog : Hdy.Window, Xdp.Request { - accept_button.grab_default (); - setup_chooser (); - -- var settings = new Settings ("io.elementary.files.file-chooser"); -+ SettingsSchemaSource sss = new SettingsSchemaSource.from_directory ("@ELEMENTARY_FILES_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true); -+ SettingsSchema chooser_schema = sss.lookup ("io.elementary.files.file-chooser", false); -+ var settings = new Settings.full (chooser_schema, null, null); - int width, height; - - settings.get ("window-size", "(ii)", out width, out height);