Subject: [bug#39599] [PATCH v2] gnu: Add gnome-shell-extension-paperwm.

From: Jack Hill <[email-masked]>
Date: Thu, 20 Feb 2020 22:37:33 -0500

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

Co-authored-by: Alex Griffin <[email-masked]>
---
 gnu/packages/gnome-xyz.scm | 39 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 7f375fefc5..59913e0602 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -2,6 +2,8 @@
 ;;; Copyright © 2019 Leo Prikler <[email-masked]>
 ;;; Copyright © 2019 Alexandros Theodotou <[email-masked]>
 ;;; Copyright © 2019 Giacomo Leidi <[email-masked]>
+;;; Copyright © 2020 Alex Griffin <[email-masked]>
+;;; Copyright © 2020 Jack Hill <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,6 +23,7 @@
 (define-module (gnu packages gnome-xyz)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system copy)
   #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module ((guix licenses) #:prefix license:)
@@ -304,6 +307,42 @@ It uses ES6 syntax and claims to be more actively maintained than others.")
     (home-page "https://extensions.gnome.org/extension/2182/noannoyance/")
     (license license:gpl2)))
 
+(define-public gnome-shell-extension-paperwm
+  (package
+    (name "gnome-shell-extension-paperwm")
+    (version "34.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/paperwm/PaperWM.git")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1qry75f696pgmd9yzqvwhq5h6cipin2fvk7h881g29cjcpxim37a"))
+              (snippet
+               '(begin (delete-file "schemas/gschemas.compiled")))))
+    (build-system copy-build-system)
+    (arguments
+     '(#:install-plan
+       '(("." "share/gnome-shell/extensions/paperwm@hedning:matrix.org"
+          #:include-regexp ("\\.js(on)?$" "\\.css$" "\\.ui$" "\\.png$"
+                            "\\.xml$" "\\.compiled$")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'compile-schemas
+           (lambda _
+             (with-directory-excursion "schemas"
+               (invoke "make")))))))
+    (native-inputs
+     `(("glib:bin" ,glib "bin"))) ; for glib-compile-schemas
+    (home-page "https://github.com/paperwm/PaperWM")
+    (synopsis "Tiled scrollable window management for GNOME Shell")
+    (description "PaperWM is an experimental GNOME Shell extension providing
+scrollable tiling of windows and per monitor workspaces.  It's inspired by paper
+notebooks and tiling window managers.")
+    (license license:gpl3)))
+
 (define-public numix-theme
   (package
     (name "numix-theme")
-- 
2.25.1