diff mbox series

[bug#41088,v2] gnu: Add gnome-shell-extension-clipboard-indicator.

Message ID 20200504224036.11979-1-jackhill@jackhill.us
State Accepted
Headers show
Series [bug#41088,v2] gnu: Add gnome-shell-extension-clipboard-indicator. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Jack Hill May 4, 2020, 10:40 p.m. UTC
* 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(+)

Comments

Marius Bakke May 5, 2020, 6:06 p.m. UTC | #1
Jack Hill <jackhill@jackhill.us> writes:

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

Thanks!

[...]

> +              (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.
Jack Hill May 5, 2020, 8:11 p.m. UTC | #2
On Tue, 5 May 2020, Marius Bakke wrote:

> 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.

> Otherwise LGTM.

Thanks for the review.

Best,
Jack
diff mbox series

Patch

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")