diff mbox series

[bug#65783] Added webapp-manager and python-gobject

Message ID 4e080abd-7977-bf79-f9d4-5ac3c739a933@jamesdavidclarke.com
State New
Headers show
Series [bug#65783] Added webapp-manager and python-gobject | expand

Commit Message

James Clarke Sept. 6, 2023, 10:24 a.m. UTC
Here is a patch which will add webapp-manager and python-gobject to guix.

I have already tested it and linted it, but you may want to test it 
yourself.
diff mbox series

Patch

From 0a043e6c227a63ceb9cb983aab0ab035a70729fe Mon Sep 17 00:00:00 2001
From: James Clarke <james@jamesdavidclarke.com>
Date: Wed, 6 Sep 2023 11:16:14 +0100
Subject: [PATCH] Added webapp-manager and python-gobject

---
 gnu/packages/linuxmint.scm  | 77 +++++++++++++++++++++++++++++++++++++
 gnu/packages/python-xyz.scm | 28 ++++++++++++++
 2 files changed, 105 insertions(+)
 create mode 100644 gnu/packages/linuxmint.scm

diff --git a/gnu/packages/linuxmint.scm b/gnu/packages/linuxmint.scm
new file mode 100644
index 0000000000..5abe4ef94d
--- /dev/null
+++ b/gnu/packages/linuxmint.scm
@@ -0,0 +1,77 @@ 
+;;; Copyright © 2023 James David Clarke <james@jamesdavidclarke.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+
+(define-module (gnu packages linuxmint)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages cinnamon)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages package-management)
+  #:use-module (guix git-download))
+
+
+(define-public webapp-manager
+  (package
+    (name "webapp-manager")
+    (version "1.3.2")
+    (source (origin
+          (method git-fetch)
+          (uri (git-reference
+                (url "https://github.com/linuxmint/webapp-manager")
+                (commit version)))
+          (file-name (string-append name "-" version "-checkout"))
+          (sha256 (base32 "1jayc805m716mm0p0bnjisb8clvqar87j65p4pv7ayybqirvkhga"))))
+
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'check)
+         (add-after 'unpack 'prepare
+           (lambda _
+             (substitute* "usr/lib/webapp-manager/webapp-manager.py"
+               (("common-licenses/GPL") "licenses/common/GPL/license.txt")
+               (("__DEB_VERSION__") ,version))
+             #t))
+         (replace 'build (lambda _ (zero? (system* "make"))))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (copy-recursively "etc" (string-append out "/etc"))
+               (copy-recursively "usr" (string-append out "/usr"))))))))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("python-beautifulsoup4" ,python-beautifulsoup4)
+       ("python-configobj" ,python-configobj)
+       ("python-gobject" ,python-gobject)
+       ("python-pillow" ,python-pillow)
+       ("python-setproctitle" ,python-setproctitle)
+       ("python-tldextract" ,python-tldextract)
+       ("dconf" ,dconf)
+       ("libxapp" ,libxapp)))
+    (home-page "https://github.com/linuxmint/webapp-manager")
+    (synopsis "Run websites as if they were apps")
+    (description "WebApp Manager allows you to run websites as if they were apps.")
+    (license license:gpl3+)))
+
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a950de3b46..8933ff628a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -141,6 +141,7 @@ 
 ;;; Copyright © 2023 Ontje Lünsdorf <ontje.luensdorf@dlr.de>
 ;;; Copyright © 2023 Parnikkapore <poomklao@yahoo.com>
 ;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
+;;; Copyright © 2023 James David Clarke <james@jamesdavidclarke.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -278,6 +279,33 @@  (define-module (gnu packages python-xyz)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26))
+  
+(define-public python-gobject
+  (package
+    (name "python-gobject")
+    (version "3.44.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "PyGObject" version))
+              (sha256
+               (base32 "10sxglfwrv377wcjs03410h4hsclg5lgdlwfswdb7s4i1jcbwpv6"))))
+    (build-system pyproject-build-system)
+    (native-inputs
+     `(("glib:bin" ,glib "bin")
+       ("pkg-config" ,pkg-config)
+       ("gobject-introspection" ,gobject-introspection)
+       ("python-pytest" ,python-pytest)
+       ("python-pycairo" ,python-pycairo)
+       ("gtk" ,gtk)
+       ("xvfb-run" ,xvfb-run)))
+    (propagated-inputs
+     `(("python-pycairo" ,python-pycairo)))
+    (arguments
+     `(#:tests? #f))  ;; Skips test phase as GIMarshallingTests is missing.
+    (home-page "https://pygobject.readthedocs.io/")
+    (synopsis "Python bindings for GObject Introspection")
+    (description "PyGObject provides Python bindings for the GObject Introspection.")
+    (license license:lgpl2.0)))
 
 (define-public python-xmldiff
   (package
-- 
2.41.0