GNU bug report logs -
#77780
[PATCH] gnu: gpaste: version bump + fix build
Previous Next
Reported by: Grigory Shepelev <shegeley <at> gmail.com>
Date: Sun, 13 Apr 2025 14:27:02 UTC
Severity: normal
Tags: patch
Done: Andreas Enge <andreas <at> enge.fr>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77780 in the body.
You can then email your comments to 77780 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org:
bug#77780; Package
guix-patches.
(Sun, 13 Apr 2025 14:27:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Grigory Shepelev <shegeley <at> gmail.com>:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org.
(Sun, 13 Apr 2025 14:27:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Bumped version + completely copied build from Nixpkgs.
Change-Id: I8506dcb11617f82cbbf4dbe446f37ec0b91083a1
---
gnu/packages/aux-files/gpaste/wrapper.js | 5 +++
gnu/packages/gnome-xyz.scm | 37 +++++++++++++++++----
gnu/packages/patches/gpaste-fix-paths.patch | 35 ++-----------------
3 files changed, 38 insertions(+), 39 deletions(-)
create mode 100644 gnu/packages/aux-files/gpaste/wrapper.js
diff --git a/gnu/packages/aux-files/gpaste/wrapper.js b/gnu/packages/aux-files/gpaste/wrapper.js
new file mode 100644
index 0000000000..ea6a9cba6f
--- /dev/null
+++ b/gnu/packages/aux-files/gpaste/wrapper.js
@@ -0,0 +1,5 @@
+import GIRepository from 'gi://GIRepository';
+
+GIRepository.Repository.prepend_search_path('@typelibDir@');
+
+export default (await import('./.@originalName@-wrapped.js')).default;
diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 8e2ffb49cb..a41033df70 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -1045,7 +1045,7 @@ (define-public gnome-shell-extension-night-theme-switcher
(define-public gpaste
(package
(name "gpaste")
- (version "44.1")
+ (version "45.2")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1054,7 +1054,7 @@ (define-public gpaste
(file-name (git-file-name name version))
(sha256
(base32
- "1amfr8hwf7401xa3fzaa8w17w3v3lxx0fkr7rqkkyfy57iavrykk"))
+ "1x8rqxqzggvzs0hr9hkwq9gmzn1m16jwllml4m4bxrdib4c9lh8q"))
(patches
(search-patches "gpaste-fix-paths.patch"))))
(build-system meson-build-system)
@@ -1088,11 +1088,34 @@ (define-public gpaste
(lambda _
(substitute* "src/libgpaste/gpaste/gpaste-settings.c"
(("@gschemasCompiled@")
- (string-append #$output "/share/glib-2.0/schemas/")))
- (substitute* '("src/gnome-shell/extension.js"
- "src/gnome-shell/prefs.js")
- (("@typelibPath@")
- (string-append #$output "/lib/girepository-1.0/"))))))))
+ (string-append #$output "/share/glib-2.0/schemas/")))))
+ (add-after 'install 'wrap-typelib
+ ;; absolute copy from nixpkgs
+ ;; https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/gp/gpaste/package.nix#L67
+ (lambda _
+ (let* [(extension-dir
+ (string-append
+ #$output
+ "/share"
+ "/gnome-shell"
+ "/extensions"
+ "/GPaste <at> gnome-shell-extensions.gnome.org"))
+ (extension.js (string-append extension-dir "/extension.js"))
+ (extension-wrapped.js (string-append extension-dir "/.extension-wrapped.js"))
+ (prefs.js (string-append extension-dir "/prefs.js"))
+ (prefs-wrapped.js (string-append extension-dir "/.prefs-wrapped.js"))
+ (wrapper.js #$(local-file (search-auxiliary-file "gpaste/wrapper.js")))
+ (typelibdir (string-append #$output "/lib/girepository-1.0"))]
+ (rename-file extension.js extension-wrapped.js)
+ (rename-file prefs.js prefs-wrapped.js)
+ (copy-file wrapper.js extension.js)
+ (copy-file wrapper.js prefs.js)
+ (substitute* extension.js
+ (("@originalName@") "extension")
+ (("@typelibDir@") typelibdir))
+ (substitute* prefs.js
+ (("@originalName@") "prefs")
+ (("@typelibDir@") typelibdir))))))))
(home-page "https://github.com/Keruspe/GPaste")
(synopsis "Clipboard management system for GNOME Shell")
(description "GPaste is a clipboard manager, a tool which allows you to
diff --git a/gnu/packages/patches/gpaste-fix-paths.patch b/gnu/packages/patches/gpaste-fix-paths.patch
index bacecd61a9..ebebc8a20b 100644
--- a/gnu/packages/patches/gpaste-fix-paths.patch
+++ b/gnu/packages/patches/gpaste-fix-paths.patch
@@ -1,44 +1,15 @@
-This is copied from NixOS, which is under MIT licence.
-https://github.com/NixOS/nixpkgs/blob/master/pkgs/desktops/gnome/misc/gpaste/
-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 @@
-
- const Config = imports.misc.config;
-
-+imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@');
-+
- imports.gi.versions.Clutter = Config.LIBMUTTER_API_VERSION;
- imports.gi.versions.GLib = '2.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 @@
-
- imports.gi.versions.GPasteGtk = '4';
-
-+imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@');
-+
- const ExtensionUtils = imports.misc.extensionUtils;
-
- const { GPasteGtk } = imports.gi;
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);
}
}
--
2.48.1
Reply sent
to
Andreas Enge <andreas <at> enge.fr>:
You have taken responsibility.
(Wed, 18 Jun 2025 08:56:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Grigory Shepelev <shegeley <at> gmail.com>:
bug acknowledged by developer.
(Wed, 18 Jun 2025 08:56:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 77780-done <at> debbugs.gnu.org (full text, mbox):
This is now on codeberg as PR #398.
Andreas
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org.
(Wed, 16 Jul 2025 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 119 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.