GNU bug report logs - #53072
[PATCH] gnu: Add gpaste at v3.42.2.

Previous Next

Package: guix-patches;

Reported by: Attila Lendvai <attila <at> lendvai.name>

Date: Fri, 7 Jan 2022 09:43:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.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 53072 in the body.
You can then email your comments to 53072 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#53072; Package guix-patches. (Fri, 07 Jan 2022 09:43:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Attila Lendvai <attila <at> lendvai.name>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 07 Jan 2022 09:43:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Attila Lendvai <attila <at> lendvai.name>
To: guix-patches <at> gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH] gnu: Add gpaste at v3.42.2.
Date: Fri,  7 Jan 2022 10:39:12 +0100
* gnu/packages/gnome-xyz.scm (gpaste): New variable.
---

this is rather fresh, and i just started to use it on my everyday
install, so i recommend some grace period and/or extensive
testing before applying.

i'm opening this issue nevertheless, so that i can link to it from
the gpaste discussions and that others don't waste their time
packaging it yet again.

 gnu/local.mk                                |  1 +
 gnu/packages/gnome-xyz.scm                  | 61 +++++++++++++++++++++
 gnu/packages/patches/gpaste-fix-paths.patch | 39 +++++++++++++
 3 files changed, 101 insertions(+)
 create mode 100644 gnu/packages/patches/gpaste-fix-paths.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c8ec622aa1..488e91eb05 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1201,6 +1201,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/go-github-com-urfave-cli-fix-tests.patch \
   %D%/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch \
   %D%/packages/patches/go-skip-gc-test.patch			\
+  %D%/packages/patches/gpaste-fix-paths.patch			\
   %D%/packages/patches/gpm-glibc-2.26.patch			\
   %D%/packages/patches/gpodder-disable-updater.patch		\
   %D%/packages/patches/gpsbabel-fix-i686-test.patch		\
diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 8161db557d..4d8bb77bc9 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -39,9 +39,11 @@ (define-module (gnu packages gnome-xyz)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages)
   #:use-module (gnu packages acl)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages build-tools)
@@ -686,6 +688,65 @@ (define-public gnome-shell-extension-paperwm
 notebooks and tiling window managers.")
     (license license:gpl3)))
 
+(define-public gpaste
+  (package
+    (name "gpaste")
+    (version "3.42.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/Keruspe/GPaste")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1k5qvgzwl357k72qfim5zfas2a0n6j24jnlm1v472l7h6gb6lssm"))
+              (patches
+               (search-patches "gpaste-fix-paths.patch"))))
+    (build-system meson-build-system)
+    (native-inputs
+     (list autoconf automake gettext-minimal gobject-introspection
+           (list glib "bin") ; for glib-compile-resources
+           libtool pkg-config vala))
+    (inputs
+     (list appstream-glib libarchive gjs mutter graphene))
+    (arguments
+     `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+       #:configure-flags
+       (list
+        (string-append "-Dcontrol-center-keybindings-dir="
+                       %output "/share/gnome-control-center/keybindings")
+        (string-append "-Ddbus-services-dir="
+                       %output "/share/dbus-1/services")
+        (string-append "-Dsystemd-user-unit-dir="
+                       %output "/etc/systemd/user"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-introspection-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* '("src/gnome-shell/extension.js"
+                              "src/gnome-shell/prefs.js")
+                 (("@typelibPath@")
+                  (string-append out "/lib/girepository-1.0/")))
+               (substitute* "src/libgpaste/settings/gpaste-settings.c"
+                 (("@gschemasCompiled@")
+                  (string-append out "/share/glib-2.0/schemas"))))))
+         (add-after 'install 'compile-schemas
+           (lambda* (#:key outputs #:allow-other-keys)
+             (invoke "glib-compile-schemas"
+                     (string-append (assoc-ref outputs "out")
+                                    "/share/glib-2.0/schemas")))))))
+    (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
+keep a trace of what you’re copying and pasting.  Is is really useful when
+you go through tons of documentation and you want to keep around a bunch of
+functions you might want to use, for example.  The clipboard manager will
+store an history of everything you do, so that you can get back to older
+copies you now want to paste.")
+    (license license:bsd-2)))
+
 (define-public arc-theme
   (package
     (name "arc-theme")
diff --git a/gnu/packages/patches/gpaste-fix-paths.patch b/gnu/packages/patches/gpaste-fix-paths.patch
new file mode 100644
index 0000000000..cc8a83b5af
--- /dev/null
+++ b/gnu/packages/patches/gpaste-fix-paths.patch
@@ -0,0 +1,39 @@
+This is copied verbatim from NixOS, which is under MIT licence.
+https://github.com/NixOS/nixpkgs/blob/master/pkgs/desktops/gnome/misc/gpaste/
+--- 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 = '1.0';
+--- a/src/gnome-shell/prefs.js
++++ b/src/gnome-shell/prefs.js
+@@ -6,6 +6,8 @@
+ 
+ const Gettext = imports.gettext;
+ 
++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 @@
+     }
+     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 (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);
+     }
+ }
+ 
\ No newline at end of file
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53072; Package guix-patches. (Fri, 07 Jan 2022 12:52:02 GMT) Full text and rfc822 format available.

Message #8 received at 53072 <at> debbugs.gnu.org (full text, mbox):

From: Attila Lendvai <attila <at> lendvai.name>
To: 53072 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH v2] gnu: Add gpaste at v3.42.2.
Date: Fri,  7 Jan 2022 13:50:30 +0100
* gnu/packages/gnome-xyz.scm (gpaste): New variable.
---

v2 adds #:glib-or-gtk? #true, which simplifies the rest.

 gnu/local.mk                                |  1 +
 gnu/packages/gnome-xyz.scm                  | 54 +++++++++++++++++++++
 gnu/packages/patches/gpaste-fix-paths.patch | 24 +++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 gnu/packages/patches/gpaste-fix-paths.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c8ec622aa1..488e91eb05 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1201,6 +1201,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/go-github-com-urfave-cli-fix-tests.patch \
   %D%/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch \
   %D%/packages/patches/go-skip-gc-test.patch			\
+  %D%/packages/patches/gpaste-fix-paths.patch			\
   %D%/packages/patches/gpm-glibc-2.26.patch			\
   %D%/packages/patches/gpodder-disable-updater.patch		\
   %D%/packages/patches/gpsbabel-fix-i686-test.patch		\
diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 8161db557d..7ca43c524b 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -39,9 +39,11 @@ (define-module (gnu packages gnome-xyz)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages)
   #:use-module (gnu packages acl)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages build-tools)
@@ -686,6 +688,58 @@ (define-public gnome-shell-extension-paperwm
 notebooks and tiling window managers.")
     (license license:gpl3)))
 
+(define-public gpaste
+  (package
+    (name "gpaste")
+    (version "3.42.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/Keruspe/GPaste")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1k5qvgzwl357k72qfim5zfas2a0n6j24jnlm1v472l7h6gb6lssm"))
+              (patches
+               (search-patches "gpaste-fix-paths.patch"))))
+    (build-system meson-build-system)
+    (native-inputs
+     (list autoconf automake gettext-minimal gobject-introspection
+           (list glib "bin") ; for glib-compile-resources
+           libtool pkg-config vala))
+    (inputs
+     (list appstream-glib libarchive gjs mutter graphene))
+    (arguments
+     `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+       #:glib-or-gtk? #true
+       #:configure-flags
+       (list
+        (string-append "-Dcontrol-center-keybindings-dir="
+                       %output "/share/gnome-control-center/keybindings")
+        (string-append "-Ddbus-services-dir="
+                       %output "/share/dbus-1/services")
+        (string-append "-Dsystemd-user-unit-dir="
+                       %output "/etc/systemd/user"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-introspection-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* '("src/gnome-shell/extension.js"
+                              "src/gnome-shell/prefs.js")
+                 (("@typelibPath@")
+                  (string-append out "/lib/girepository-1.0/")))))))))
+    (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
+keep a trace of what you’re copying and pasting.  Is is really useful when
+you go through tons of documentation and you want to keep around a bunch of
+functions you might want to use, for example.  The clipboard manager will
+store an history of everything you do, so that you can get back to older
+copies you now want to paste.")
+    (license license:bsd-2)))
+
 (define-public arc-theme
   (package
     (name "arc-theme")
diff --git a/gnu/packages/patches/gpaste-fix-paths.patch b/gnu/packages/patches/gpaste-fix-paths.patch
new file mode 100644
index 0000000000..be63878fe6
--- /dev/null
+++ b/gnu/packages/patches/gpaste-fix-paths.patch
@@ -0,0 +1,24 @@
+This is copied from NixOS, which is under MIT licence.
+https://github.com/NixOS/nixpkgs/blob/master/pkgs/desktops/gnome/misc/gpaste/
+--- 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 = '1.0';
+--- a/src/gnome-shell/prefs.js
++++ b/src/gnome-shell/prefs.js
+@@ -6,6 +6,8 @@
+ 
+ const Gettext = imports.gettext;
+ 
++imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@');
++
+ //const { GPaste } = imports.gi;
+ 
+ const ExtensionUtils = imports.misc.extensionUtils;
-- 
2.34.0





Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Tue, 11 Jan 2022 10:18:02 GMT) Full text and rfc822 format available.

Notification sent to Attila Lendvai <attila <at> lendvai.name>:
bug acknowledged by developer. (Tue, 11 Jan 2022 10:18:02 GMT) Full text and rfc822 format available.

Message #13 received at 53072-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Attila Lendvai <attila <at> lendvai.name>
Cc: 53072-done <at> debbugs.gnu.org
Subject: Re: [bug#53072] [PATCH v2] gnu: Add gpaste at v3.42.2.
Date: Tue, 11 Jan 2022 11:17:41 +0100
Hello,

Attila Lendvai <attila <at> lendvai.name> writes:

> * gnu/packages/gnome-xyz.scm (gpaste): New variable.

I fixed commit message, used gexps to remove %output and added
a copyright line for you.

Applied. Thanks!

Regards,
-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 Feb 2022 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 71 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.