aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Lendvai <attila@lendvai.name>2024-08-07 00:49:44 +0200
committerLudovic Courtès <ludo@gnu.org>2025-05-14 22:45:20 +0200
commit4567f589d863d13534d212b0b86d6c92756eb917 (patch)
tree9bbba6fd49e3fe4d5681cdcbd3c9bdcce91a9fb1
parentb47eed5ea78d30363af78dd593b3cc2f42f420dc (diff)
downloadguix-4567f589d863d13534d212b0b86d6c92756eb917.tar.gz
guix-4567f589d863d13534d212b0b86d6c92756eb917.zip
gnu: gpaste: Update to 45.2.
This fixes the build of the main app, but the GNOME Shell extension remains broken. * gnu/packages/gnome-xyz.scm (gpaste): Update to 45.2. [inputs]: Remove ‘mutter’. [arguments]: In ‘fix-introspection-install-dir’, adjust typelib variable name. * gnu/packages/patches/gpaste-fix-paths.patch: Update. Change-Id: Ia80bddf9bf0978cd7a51a399ca3bf8f425377a6f
-rw-r--r--gnu/packages/gnome-xyz.scm7
-rw-r--r--gnu/packages/patches/gpaste-fix-paths.patch44
2 files changed, 26 insertions, 25 deletions
diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 613d0c1310..904916594b 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -1073,7 +1073,7 @@ dark, switch backgrounds and run custom commands at sunset and sunrise.")
(define-public gpaste
(package
(name "gpaste")
- (version "44.1")
+ (version "45.2")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1082,7 +1082,7 @@ dark, switch backgrounds and run custom commands at sunset and sunrise.")
(file-name (git-file-name name version))
(sha256
(base32
- "1amfr8hwf7401xa3fzaa8w17w3v3lxx0fkr7rqkkyfy57iavrykk"))
+ "1x8rqxqzggvzs0hr9hkwq9gmzn1m16jwllml4m4bxrdib4c9lh8q"))
(patches
(search-patches "gpaste-fix-paths.patch"))))
(build-system meson-build-system)
@@ -1098,7 +1098,6 @@ dark, switch backgrounds and run custom commands at sunset and sunrise.")
desktop-file-utils ; for update-desktop-database
gjs
gtk+
- mutter
libadwaita))
(arguments
(list #:glib-or-gtk? #true
@@ -1119,7 +1118,7 @@ dark, switch backgrounds and run custom commands at sunset and sunrise.")
(string-append #$output "/share/glib-2.0/schemas/")))
(substitute* '("src/gnome-shell/extension.js"
"src/gnome-shell/prefs.js")
- (("@typelibPath@")
+ (("@typelibDir@")
(string-append #$output "/lib/girepository-1.0/"))))))))
(home-page "https://github.com/Keruspe/GPaste")
(synopsis "Clipboard management system for GNOME Shell")
diff --git a/gnu/packages/patches/gpaste-fix-paths.patch b/gnu/packages/patches/gpaste-fix-paths.patch
index bacecd61a9..6e30667bac 100644
--- a/gnu/packages/patches/gpaste-fix-paths.patch
+++ b/gnu/packages/patches/gpaste-fix-paths.patch
@@ -1,44 +1,46 @@
-This is copied from NixOS, which is under MIT licence.
-https://github.com/NixOS/nixpkgs/blob/master/pkgs/desktops/gnome/misc/gpaste/
+Adjust search paths so GIR typelibs and GLib schemas are found.
+Adapted from Nixpkgs: <https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/gp/gpaste>.
+
diff --git a/src/gnome-shell/extension.js b/src/gnome-shell/extension.js
-index c8773fd6..9efbed67 100644
+index cb862a30..6c24175b 100644
--- a/src/gnome-shell/extension.js
+++ b/src/gnome-shell/extension.js
-@@ -6,6 +6,8 @@
+@@ -4,6 +4,9 @@
+ * Copyright (c) 2010-2023, Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+ */
- const Config = imports.misc.config;
-
-+imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@');
++import GIRepository from 'gi://GIRepository';
++GIRepository.Repository.prepend_search_path('@typelibDir@');
+
- imports.gi.versions.Clutter = Config.LIBMUTTER_API_VERSION;
- imports.gi.versions.GLib = '2.0';
- imports.gi.versions.GPaste = '2';
+ import * as Main from 'resource:///org/gnome/shell/ui/main.js';
+ import {Extension, gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js';
+
diff --git a/src/gnome-shell/prefs.js b/src/gnome-shell/prefs.js
-index 32244ab2..74b85572 100644
+index 4c0d9bde..6a376b32 100644
--- a/src/gnome-shell/prefs.js
+++ b/src/gnome-shell/prefs.js
-@@ -6,6 +6,8 @@
-
- imports.gi.versions.GPasteGtk = '4';
+@@ -4,6 +4,9 @@
+ * Copyright (c) 2010-2023, Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+ */
-+imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@');
++import GIRepository from 'gi://GIRepository';
++GIRepository.Repository.prepend_search_path('@typelibDir@');
+
- const ExtensionUtils = imports.misc.extensionUtils;
+ import { ExtensionPreferences, gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
- const { GPasteGtk } = imports.gi;
+ import GPasteGtk from 'gi://GPasteGtk?version=4';
diff --git a/src/libgpaste/gpaste/gpaste-settings.c b/src/libgpaste/gpaste/gpaste-settings.c
-index 7e53eb64..57c399fc 100644
+index 830f5e0b..c8df0e11 100644
--- a/src/libgpaste/gpaste/gpaste-settings.c
+++ b/src/libgpaste/gpaste/gpaste-settings.c
-@@ -1013,7 +1013,11 @@ create_g_settings (void)
+@@ -1039,7 +1039,10 @@ create_g_settings (void)
}
else
{
- return g_settings_new (G_PASTE_SETTINGS_NAME);
+ // library used by introspection requires schemas but we cannot set XDG_DATA_DIRS for the library
-+ GSettingsSchemaSource *schema_source = g_settings_schema_source_new_from_directory ("@gschemasCompiled@", NULL, FALSE, NULL);
++ g_autoptr (GSettingsSchemaSource) schema_source = g_settings_schema_source_new_from_directory ("@gschemasCompiled@", NULL, FALSE, NULL);
+ g_autoptr (GSettingsSchema) schema = g_settings_schema_source_lookup (schema_source, G_PASTE_SETTINGS_NAME, FALSE);
-+ g_settings_schema_source_unref (schema_source);
+ return g_settings_new_full (schema, NULL, NULL);
}
}