From a0d22d2ada9040f9217304785a25cd25ccfddf4b Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 20 Mar 2022 06:12:03 +0100 Subject: [PATCH] =?UTF-8?q?gnome.gpaste:=203.42.6=20=E2=86=92=2042.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.imagination-land.org/posts/2022-03-19-gpaste-42.0-released.html --- pkgs/desktops/gnome/misc/gpaste/default.nix | 13 ++++++++---- .../gnome/misc/gpaste/fix-paths.patch | 20 ++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/pkgs/desktops/gnome/misc/gpaste/default.nix b/pkgs/desktops/gnome/misc/gpaste/default.nix index f593fbbd6535..1a6abacad7d7 100644 --- a/pkgs/desktops/gnome/misc/gpaste/default.nix +++ b/pkgs/desktops/gnome/misc/gpaste/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ stdenv +, lib , fetchFromGitHub , fetchpatch , appstream-glib @@ -7,6 +8,8 @@ , glib , gobject-introspection , gtk3 +, gtk4 +, libadwaita , meson , mutter , ninja @@ -17,14 +20,14 @@ }: stdenv.mkDerivation rec { - version = "3.42.6"; + version = "42.0"; pname = "gpaste"; src = fetchFromGitHub { owner = "Keruspe"; repo = "GPaste"; rev = "v${version}"; - sha256 = "sha256-dCeNWdHj3bBGJR1VpJtQjSn601Vdl3f9FjHAPB2wuhE="; + sha256 = "sha256-dwL06BL6P8fqvAfrYpifqMAh6d+3Er6RhUeP6nfCr1M="; }; patches = [ @@ -38,7 +41,7 @@ stdenv.mkDerivation rec { --subst-var-by typelibPath "${placeholder "out"}/lib/girepository-1.0" substituteInPlace src/gnome-shell/prefs.js \ --subst-var-by typelibPath "${placeholder "out"}/lib/girepository-1.0" - substituteInPlace src/libgpaste/settings/gpaste-settings.c \ + substituteInPlace src/libgpaste/gpaste/gpaste-settings.c \ --subst-var-by gschemasCompiled ${glib.makeSchemaPath (placeholder "out") "${pname}-${version}"} ''; @@ -57,6 +60,8 @@ stdenv.mkDerivation rec { gjs glib gtk3 + gtk4 + libadwaita mutter pango ]; diff --git a/pkgs/desktops/gnome/misc/gpaste/fix-paths.patch b/pkgs/desktops/gnome/misc/gpaste/fix-paths.patch index 46e30ce2e2cb..2ec807b61c05 100644 --- a/pkgs/desktops/gnome/misc/gpaste/fix-paths.patch +++ b/pkgs/desktops/gnome/misc/gpaste/fix-paths.patch @@ -1,3 +1,5 @@ +diff --git a/src/gnome-shell/extension.js b/src/gnome-shell/extension.js +index c8773fd6..9efbed67 100644 --- a/src/gnome-shell/extension.js +++ b/src/gnome-shell/extension.js @@ -6,6 +6,8 @@ @@ -8,21 +10,25 @@ + imports.gi.versions.Clutter = Config.LIBMUTTER_API_VERSION; imports.gi.versions.GLib = '2.0'; - imports.gi.versions.GPaste = '1.0'; + imports.gi.versions.GPaste = '2'; +diff --git a/src/gnome-shell/prefs.js b/src/gnome-shell/prefs.js +index 32244ab2..74b85572 100644 --- a/src/gnome-shell/prefs.js +++ b/src/gnome-shell/prefs.js @@ -6,6 +6,8 @@ - const Gettext = imports.gettext; + imports.gi.versions.GPasteGtk = '4'; +imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@'); + - //const { GPaste } = imports.gi; - const ExtensionUtils = imports.misc.extensionUtils; ---- a/src/libgpaste/settings/gpaste-settings.c -+++ b/src/libgpaste/settings/gpaste-settings.c -@@ -1013,7 +1013,11 @@ + + const { GPasteGtk } = imports.gi; +diff --git a/src/libgpaste/gpaste/gpaste-settings.c b/src/libgpaste/gpaste/gpaste-settings.c +index 7e53eb64..57c399fc 100644 +--- a/src/libgpaste/gpaste/gpaste-settings.c ++++ b/src/libgpaste/gpaste/gpaste-settings.c +@@ -1013,7 +1013,11 @@ create_g_settings (void) } else {