unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#47268] [PATCH] gnu: Add apostrophe.
@ 2021-03-19 17:56 Leo Prikler
  2021-03-19 19:58 ` [bug#47268] [PATCH v2 0/1] " Léo Le Bouter via Guix-patches via
  0 siblings, 1 reply; 4+ messages in thread
From: Leo Prikler @ 2021-03-19 17:56 UTC (permalink / raw)
  To: 47268

* gnu/packages/gnome.scm (apostrophe): New variable.
---
 gnu/packages/gnome.scm | 64 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 34cd0fa992..060f467fa9 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -125,6 +125,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages ibus)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
@@ -11569,6 +11570,69 @@ and toolbars.")
 GTK+.  It integrates well with the GNOME desktop environment.")
     (license license:gpl3+)))
 
+(define-public apostrophe
+  (package
+    (name "apostrophe")
+    (version "2.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.gnome.org/somas/apostrophe")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1qzy3zhi18wf42m034s8kcmx9gl05j620x3hf6rnycq2fvy7g4gz"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-meson
+           (lambda _
+             (substitute* "build-aux/meson_post_install.py"
+               (("gtk-update-icon-cache") "true"))
+             #t))
+         (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((prog (string-append (assoc-ref outputs "out")
+                                        "/bin/apostrophe"))
+                   (pylib (string-append (assoc-ref outputs "out")
+                                         "/lib/python"
+                                         ,(version-major+minor
+                                           (package-version python))
+                                         "/site-packages")))
+               (wrap-program prog
+                 `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
+                 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
+                 `("PATH" prefix (,(string-append (assoc-ref inputs "pandoc")
+                                                  "/bin"))))
+               #t))))))
+    (inputs
+     `(("glib" ,glib)
+       ("gobject-introspection" ,gobject-introspection)
+       ("gspell" ,gspell)
+       ("gtk+" ,gtk+)
+       ("libhandy" ,libhandy)
+       ("pandoc" ,pandoc)
+       ("python-chardet" ,python-chardet)
+       ("python-levenshtein" ,python-levenshtein)
+       ("python-regex" ,python-regex)
+       ("python-pycairo" ,python-pycairo)
+       ("python-pygobject" ,python-pygobject)
+       ("python-pyenchant" ,python-pyenchant)
+       ("python-pypandoc" ,python-pypandoc)
+       ("webkitgtk" ,webkitgtk)))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("pkg-config" ,pkg-config)))
+    (home-page "https://gitlab.gnome.org/somas/apostrophe")
+    (synopsis "Markdown editor written in Python with GTK+")
+    (description "Apostrophe is a GTK+ based distraction free Markdown editor.
+It uses pandoc as back-end for parsing Markdown.")
+    (license license:gpl3)))
+
 (define-public libratbag
   (package
     (name "libratbag")
-- 
2.31.0





^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-19 20:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 17:56 [bug#47268] [PATCH] gnu: Add apostrophe Leo Prikler
2021-03-19 19:58 ` [bug#47268] [PATCH v2 0/1] " Léo Le Bouter via Guix-patches via
2021-03-19 19:58   ` [bug#47268] [PATCH v2 1/1] " Léo Le Bouter via Guix-patches via
2021-03-19 20:26     ` Leo Prikler

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