unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: 53072@debbugs.gnu.org
Cc: Attila Lendvai <attila@lendvai.name>
Subject: [bug#53072] [PATCH v2] gnu: Add gpaste at v3.42.2.
Date: Fri,  7 Jan 2022 13:50:30 +0100	[thread overview]
Message-ID: <20220107125029.27565-1-attila@lendvai.name> (raw)
In-Reply-To: <20220107093911.17095-1-attila@lendvai.name>

* 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	other threads:[~2022-01-07 12:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07  9:39 [bug#53072] [PATCH] gnu: Add gpaste at v3.42.2 Attila Lendvai
2022-01-07 12:50 ` Attila Lendvai [this message]
2022-01-11 10:17   ` bug#53072: [PATCH v2] " Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220107125029.27565-1-attila@lendvai.name \
    --to=attila@lendvai.name \
    --cc=53072@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).