[PATCH] gnu: Add gnome-shell-extension-clipboard-indicator.

DoneSubmitted by Jack Hill.
Details
2 participants
  • Jack Hill
  • Marius Bakke
Owner
unassigned
Severity
normal
J
J
Jack Hill wrote on 5 May 2020 00:30
(address . guix-patches@gnu.org)
20200504223005.11419-1-jackhill@jackhill.us
* gnu/packages/gnome-xyz.scm (gnome-shell-extension-clipboard-indicator):
New variable.
---
gnu/packages/gnome-xyz.scm | 42 ++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 625248a25a..ee5176d22a 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -148,6 +148,48 @@ GNOME Shell.")
     (home-page "https://github.com/ubuntu/gnome-shell-extension-appindicator/")
     (license license:gpl2+)))
 
+(define-public gnome-shell-extension-clipboard-indicator
+  (package
+    (name "gnome-shell-extension-clipboard-indicator")
+    (version "34")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url (string-append "https://github.com/Tudmotu/"
+                                        "gnome-shell-extension-clipboard-indicator.git"))
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0i00psc1ky70zljd14jzr627y7nd8xwnwrh4xpajl1f6djabh12s"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin (delete-file "schemas/gschemas.compiled")
+                       (for-each delete-file (find-files "locale" "\\.mo$"))
+                       #t))))
+    (build-system copy-build-system)
+    (arguments
+     '(#:install-plan
+       '(("." "share/gnome-shell/extensions/clipboard-indicator@tudmotu.com"
+          #:include-regexp ("\\.css$" "\\.compiled$" "\\.js(on)?$" "\\.mo$" "\\.xml$")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'compile-schemas
+           (lambda _
+             (with-directory-excursion "schemas"
+               (invoke "glib-compile-schemas" "."))
+             #t))
+         (add-before 'install 'compile-locales
+           (lambda _ (invoke "./compile-locales.sh"))))))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")))       ; for glib-compile-schemas
+    (home-page "https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator")
+    (synopsis "Clipboard manager extension for GNOME Shell")
+    (description "Clipboard Indicator is a clipboard manager for GNOME Shell
+that caches clipboard history.")
+    (license license:expat)))
+
 (define-public gnome-shell-extension-topicons-redux
   (package
     (name "gnome-shell-extension-topicons-redux")
-- 
2.26.2
J
J
Jack Hill wrote on 5 May 2020 00:40
[PATCH v2] gnu: Add gnome-shell-extension-clipboard-indicator.
(address . 41088@debbugs.gnu.org)
20200504224036.11979-1-jackhill@jackhill.us
* gnu/packages/gnome-xyz.scm (gnome-shell-extension-clipboard-indicator):
New variable.
---

New in this version: Now all phases return #t

gnu/packages/gnome-xyz.scm | 43 ++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 625248a25a..26de92c2c9 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -148,6 +148,49 @@ GNOME Shell.")
     (home-page "https://github.com/ubuntu/gnome-shell-extension-appindicator/")
     (license license:gpl2+)))
 
+(define-public gnome-shell-extension-clipboard-indicator
+  (package
+    (name "gnome-shell-extension-clipboard-indicator")
+    (version "34")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url (string-append "https://github.com/Tudmotu/"
+                                        "gnome-shell-extension-clipboard-indicator.git"))
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0i00psc1ky70zljd14jzr627y7nd8xwnwrh4xpajl1f6djabh12s"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin (delete-file "schemas/gschemas.compiled")
+                       (for-each delete-file (find-files "locale" "\\.mo$"))
+                       #t))))
+    (build-system copy-build-system)
+    (arguments
+     '(#:install-plan
+       '(("." "share/gnome-shell/extensions/clipboard-indicator@tudmotu.com"
+          #:include-regexp ("\\.css$" "\\.compiled$" "\\.js(on)?$" "\\.mo$" "\\.xml$")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'compile-schemas
+           (lambda _
+             (with-directory-excursion "schemas"
+               (invoke "glib-compile-schemas" "."))
+             #t))
+         (add-before 'install 'compile-locales
+           (lambda _ (invoke "./compile-locales.sh")
+                   #t)))))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")))       ; for glib-compile-schemas
+    (home-page "https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator")
+    (synopsis "Clipboard manager extension for GNOME Shell")
+    (description "Clipboard Indicator is a clipboard manager for GNOME Shell
+that caches clipboard history.")
+    (license license:expat)))
+
 (define-public gnome-shell-extension-topicons-redux
   (package
     (name "gnome-shell-extension-topicons-redux")
-- 
2.26.2
M
M
Marius Bakke wrote on 5 May 2020 20:06
87imhaxnnb.fsf@devup.no
Jack Hill <jackhill@jackhill.us> writes:

Toggle quote (3 lines)
> * gnu/packages/gnome-xyz.scm (gnome-shell-extension-clipboard-indicator):
> New variable.

Thanks!

[...]

Toggle quote (5 lines)
> + (snippet
> + '(begin (delete-file "schemas/gschemas.compiled")
> + (for-each delete-file (find-files "locale" "\\.mo$"))
> + #t))))

Can you add a comment about why this is necessary?

Otherwise LGTM.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6xqwgACgkQoqBt8qM6
VPoTpAf9ETQf9bt4g/1QY4m9nE/50TFl6/VQXn1CcTbcaI8ShGE6hH1Z0PveHN51
kFjjHsw4EsRruEyrB4BBS4F8RGPmq+cXUZ/9C+LcWzvDFK8lpH8eVXgdCgYaggcG
FaltSdRg3yxLSaEKollIK3zhSTUiVRuFdgDVWH/Vt/2W4HGbmZ1WPjsKGFAUpMc7
mIbrZBECdh0vVPvBDb1bwmUPB2Wr4ZyNwQEf6PylYMq1iWI9YAgnrS9BK/8CeS/+
QKDijzTMHjef3mSZLg3uu7P9OVwuMh+vLt/DZdAF8o1F4ak8Q2oNuxD7y2AuuSLb
rPnnaw19Y3EgH2BasV9AloJJDNRMfQ==
=c1dF
-----END PGP SIGNATURE-----

J
J
Jack Hill wrote on 5 May 2020 22:11
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 41088@debbugs.gnu.org)
alpine.DEB.2.20.2005051606340.5735@marsh.hcoop.net
On Tue, 5 May 2020, Marius Bakke wrote:

Toggle quote (9 lines)
> Jack Hill <jackhill@jackhill.us> writes:
>
>> + (snippet
>> + '(begin (delete-file "schemas/gschemas.compiled")
>> + (for-each delete-file (find-files "locale" "\\.mo$"))
>> + #t))))
>
> Can you add a comment about why this is necessary?

I've added a commend and will send the updated patch shortly. However, I
may have been wrong to remove these files as part of the snippet. I did it
because the removed files are not source form, but instead can be
generated from source during the package build. I believe that upstream
includes them in the code repository because it is common for people to
install GNOME Shell extensions by directly cloning the repo in their home
directories.

Toggle quote (2 lines)
> Otherwise LGTM.

Thanks for the review.

Best,
Jack
J
J
Jack Hill wrote on 5 May 2020 22:12
[PATCH v3] gnu: Add gnome-shell-extension-clipboard-indicator.
(address . 41088@debbugs.gnu.org)(name . Marius Bakke)(address . mbakke@fastmail.com)
20200505201255.29313-1-jackhill@jackhill.us
* gnu/packages/gnome-xyz.scm (gnome-shell-extension-clipboard-indicator):
New variable.
---

New in this version: Added comment about why compiled schemas and
translations are removed as part of the source snippet.

gnu/packages/gnome-xyz.scm | 47 ++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (60 lines)
diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 625248a25a..41c341fd41 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -148,6 +148,53 @@ GNOME Shell.")
     (home-page "https://github.com/ubuntu/gnome-shell-extension-appindicator/")
     (license license:gpl2+)))
 
+(define-public gnome-shell-extension-clipboard-indicator
+  (package
+    (name "gnome-shell-extension-clipboard-indicator")
+    (version "34")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url (string-append "https://github.com/Tudmotu/"
+                                        "gnome-shell-extension-clipboard-indicator.git"))
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0i00psc1ky70zljd14jzr627y7nd8xwnwrh4xpajl1f6djabh12s"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Remove pre-compiled settings schemas and translations from
+               ;; source, as they are generated as part of build. Upstream
+               ;; includes them for people who want to run the software
+               ;; directly from source tree.
+               '(begin (delete-file "schemas/gschemas.compiled")
+                       (for-each delete-file (find-files "locale" "\\.mo$"))
+                       #t))))
+    (build-system copy-build-system)
+    (arguments
+     '(#:install-plan
+       '(("." "share/gnome-shell/extensions/clipboard-indicator@tudmotu.com"
+          #:include-regexp ("\\.css$" "\\.compiled$" "\\.js(on)?$" "\\.mo$" "\\.xml$")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'compile-schemas
+           (lambda _
+             (with-directory-excursion "schemas"
+               (invoke "glib-compile-schemas" "."))
+             #t))
+         (add-before 'install 'compile-locales
+           (lambda _ (invoke "./compile-locales.sh")
+                   #t)))))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")))       ; for glib-compile-schemas
+    (home-page "https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator")
+    (synopsis "Clipboard manager extension for GNOME Shell")
+    (description "Clipboard Indicator is a clipboard manager for GNOME Shell
+that caches clipboard history.")
+    (license license:expat)))
+
 (define-public gnome-shell-extension-topicons-redux
   (package
     (name "gnome-shell-extension-topicons-redux")
-- 
2.26.2
M
M
Marius Bakke wrote on 6 May 2020 22:32
874kss4xem.fsf@devup.no
Jack Hill <jackhill@jackhill.us> writes:

Toggle quote (3 lines)
> * gnu/packages/gnome-xyz.scm (gnome-shell-extension-clipboard-indicator):
> New variable.

Applied, thanks!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6zHuEACgkQoqBt8qM6
VPqHFAgAx3YKx9b9L82lmOeE1A/5V6n+/dl8MMQBWBa9onk+LvJyIWSipytqI+L/
57Mzn4tm8YYXEm2+r2j8kvZ21jGwjxp2Xgm1ixIEWmFEUYREslRjpAyj87kVC1Xy
liyCfubjVdoSo1PgDV6kBU5mSpL5vt2ZYWglbTOwKT7YtQK0tSPnHoVxyCTKrf5P
Ca59Uf+KTahMEVx7TMUGYXHDbHBeH6p8Y/Ano7aEyL5fXRbGv3TglbE9o3hHZxpn
nfc2xbcXxKG+D97JJH7lx9/Y7a620LaCuw+jL/gfuGt13qmA9H1gF15c8VQVxGW5
J1qiJvYwu/bxsLGzn27RK2AFSL+WzA==
=pgdO
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 41088@debbugs.gnu.org