gnu: python-deepmerge: Use pyproject-build-system.
[jackhill/guix/guix.git] / gnu / packages / text-editors.scm
index 1c936be..26abe60 100644 (file)
@@ -1,12 +1,12 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org>
 ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
-;;; Copyright © 2017, 2018, 2020 Eric Bavier <bavier@posteo.net>
+;;; Copyright © 2017, 2018, 2020, 2022 Eric Bavier <bavier@posteo.net>
 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
 ;;; Copyright © 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2014 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.org>
 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2019, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2019, 2020, 2021, 2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020-2022 Marius Bakke <marius@gnu.org>
@@ -19,6 +19,7 @@
 ;;; Copyright © 2021 Calum Irwin <calumirwin1@gmail.com>
 ;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com>
 ;;; Copyright © 2022 Foo Chuan Wei <chuanwei.foo@hotmail.com>
+;;; Copyright © 2022 zamfofex <zamfofex@twdb.moe>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,6 +46,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
   #:use-module (gnu packages code)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages crates-io)
+  #:use-module (gnu packages datastructures)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages haskell-xyz)
@@ -80,6 +85,7 @@
   #:use-module (gnu packages qt)
   #:use-module (gnu packages regex)
   #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sdl)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages terminals)
   #:use-module (gnu packages texinfo)
@@ -166,7 +172,7 @@ based command language.")
 (define-public kakoune
   (package
     (name "kakoune")
-    (version "2021.08.28")
+    (version "2021.11.08")
     (source
      (origin
        (method url-fetch)
@@ -174,7 +180,7 @@ based command language.")
                            "releases/download/v" version "/"
                            "kakoune-" version ".tar.bz2"))
        (sha256
-        (base32 "1jvn4b9rma5jjvg3xz8nf224pbq3ry570j6qvc834wn5v3gxfvkg"))))
+        (base32 "1x5mvmpf0rgmr2xdw5wjn4hr6qd8yvj0zx588fi324x1knfqhc5a"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
@@ -190,14 +196,9 @@ based command language.")
              (substitute* "src/shell_manager.cc"
                (("if \\(m_shell.empty\\(\\)\\)" line)
                 (string-append "m_shell = \"" (which "sh")
-                               "\";\n        " line)))
-             #t))
-         (delete 'configure)            ; no configure script
-         ;; kakoune requires us to be in the src/ directory to build.
-         (add-before 'build 'chdir
-           (lambda _ (chdir "src") #t)))))
-    (native-inputs
-     (list asciidoc pkg-config ruby))
+                               "\";\n        " line)))))
+         (delete 'configure))))            ; no configure script
+    (native-inputs (list pkg-config))
     (synopsis "Vim-inspired code editor")
     (description
      "Kakoune is a code editor heavily inspired by Vim, as such most of its
@@ -498,7 +499,7 @@ Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings.  e3 can be used on
 (define-public mg
   (package
     (name "mg")
-    (version "20210609")
+    (version "20220614")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -507,7 +508,7 @@ Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings.  e3 can be used on
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "04c2vqxg31mk15cfrhzrivykis8fmf0m1d8h1qdjdmlfxd4qwaqf"))
+                "145qk4bzys4igv98645vikswv9hqym46chh6xb9d82ihsvjq1wjk"))
               (modules '((guix build utils)))
               (snippet '(begin
                           (substitute* "GNUmakefile"
@@ -655,7 +656,7 @@ scripts/input/X11/C/Shell/HTML/Dired): 49KB.
 (define-public ghostwriter
   (package
     (name "ghostwriter")
-    (version "2.0.2")
+    (version "2.1.4")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -664,42 +665,41 @@ scripts/input/X11/C/Shell/HTML/Dired): 49KB.
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "19cf55b86yj2b5hdazbyw4iyp6xq155243aiyg4m0vhwh0h79nwh"))))
+                "1w8a6vkhmdbp4kzb7aprvfni9ny47dj0vigbcnsh539dn3sp1gan"))))
     (build-system gnu-build-system)
     (native-inputs
-     (list pkg-config qttools))           ; for lrelease
+     (list pkg-config qttools-5))       ; for lrelease
     (inputs
      (list hunspell
            qtbase-5
-           qtdeclarative
-           qtmultimedia
-           qtquickcontrols
-           qtsvg
-           qtwebchannel))
+           qtdeclarative-5
+           qtmultimedia-5
+           qtquickcontrols-5
+           qtsvg-5
+           qtwebchannel-5))
     (propagated-inputs                  ; To get native-search-path
-     (list qtwebengine))
+     (list qtwebengine-5))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (invoke "qmake" (string-append "PREFIX=" out)))))
-         (add-after 'configure 'create-translations
-           (lambda _
-             ;; `lrelease` will not overwrite, so delete existing .qm files
-             (for-each delete-file (find-files "translations" ".*\\.qm"))
-             (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
-         ;; Ensure that icons are found at runtime.
-         (add-after 'install 'wrap-executable
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (wrap-program (string-append out "/bin/ghostwriter")
-                 `("QT_PLUGIN_PATH" ":" prefix
-                   ,(map (lambda (label)
-                           (string-append (assoc-ref inputs label)
-                                          "/lib/qt5/plugins/"))
-                         '("qtsvg" "qtmultimedia"))))))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'configure
+            (lambda* (#:key outputs #:allow-other-keys)
+              (invoke "qmake" (string-append "PREFIX=" #$output))))
+          (add-after 'configure 'create-translations
+            (lambda _
+              ;; `lrelease` will not overwrite, so delete existing .qm files
+              (for-each delete-file (find-files "translations" ".*\\.qm"))
+              (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
+          ;; Ensure that icons are found at runtime.
+          (add-after 'install 'wrap-executable
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (wrap-program (string-append #$output "/bin/ghostwriter")
+                `("QT_PLUGIN_PATH" ":" prefix
+                  #$(map (lambda (label)
+                           (file-append (this-package-input label)
+                                        "/lib/qt5/plugins"))
+                         '("qtsvg" "qtmultimedia")))))))))
     (home-page "https://wereturtle.github.io/ghostwriter/")
     (synopsis "Write without distractions")
     (description
@@ -710,7 +710,7 @@ environment with Markdown markup.")
 (define-public manuskript
   (package
     (name "manuskript")
-    (version "0.13.1")
+    (version "0.14.0")
     (source
      (origin
        (method git-fetch)
@@ -719,62 +719,62 @@ environment with Markdown markup.")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1rj41wimmaq47lwaz0d1iq270klp96xv9dpfdsxi5a2xcdm80jac"))))
+        (base32 "0qhr9bkq4yl2qjainpsv7blzcji2q9ic9zcynawmhfqy3rmf8qlr"))))
     (build-system python-build-system)
     (arguments
-     `(#:tests? #f                      ;no test
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (delete 'build)
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (share (string-append out "/share/manuskript")))
-               ;; Install data.
-               (mkdir-p share)
-               (for-each
-                (lambda (d)
-                  (let ((destination  (string-append share "/" d)))
-                    (mkdir-p destination)
-                    (copy-recursively d destination)))
-                '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
-               ;; Install documentation.
-               (let ((doc (string-append out
-                                         "/doc/manuskript-" ,version
-                                         "/sample-projects")))
-                 (mkdir-p doc)
-                 (copy-recursively "sample-projects" doc))
-               ;; Wrap executable in "$out/share/manuskript/bin" and
-               ;; link to it from "$out/bin".
-               (let ((bin (string-append out "/bin"))
-                     (executable (string-append share "/bin/manuskript")))
-                 (wrap-program executable
-                   (list "GUIX_PYTHONPATH" 'prefix
-                         (list (getenv "GUIX_PYTHONPATH"))))
-                 (mkdir-p bin)
-                 (with-directory-excursion bin
-                   (symlink (string-append share "/bin/manuskript")
-                            "manuskript")))
-               ;; Install icons and create .desktop file.
-               (let ((apps (string-append out "/share/applications"))
-                     (icons-dir (string-append out "/share/pixmaps")))
-                 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
-                 (mkdir-p apps)
-                 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
+     (list
+      #:tests? #f                       ;no test
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (delete 'build)
+          (replace 'install
+            (lambda _
+              (let ((share (string-append #$output "/share/manuskript")))
+                ;; Install data.
+                (mkdir-p share)
+                (for-each
+                 (lambda (d)
+                   (let ((destination  (string-append share "/" d)))
+                     (mkdir-p destination)
+                     (copy-recursively d destination)))
+                 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
+                ;; Install documentation.
+                (let ((doc (string-append #$output
+                                          "/doc/manuskript-" #$version
+                                          "/sample-projects")))
+                  (mkdir-p doc)
+                  (copy-recursively "sample-projects" doc))
+                ;; Wrap executable in "$out/share/manuskript/bin" and
+                ;; link to it from "$out/bin".
+                (let ((bin (string-append #$output "/bin"))
+                      (executable (string-append share "/bin/manuskript")))
+                  (wrap-program executable
+                    (list "GUIX_PYTHONPATH" 'prefix
+                          (list (getenv "GUIX_PYTHONPATH"))))
+                  (mkdir-p bin)
+                  (with-directory-excursion bin
+                    (symlink (string-append share "/bin/manuskript")
+                             "manuskript")))
+                ;; Install icons and create .desktop file.
+                (let ((apps (string-append #$output "/share/applications"))
+                      (icons-dir (string-append #$output "/share/pixmaps")))
+                  (install-file "icons/Manuskript/manuskript.svg" icons-dir)
+                  (mkdir-p apps)
+                  (make-desktop-entry-file
+                   (string-append apps "/manuskript.desktop")
                    #:name "Manuskript"
                    #:mime-type "application/x-manuskript-book;"
-                   #:exec (string-append out "/bin/manuskript %f")
+                   #:exec (string-append #$output "/bin/manuskript %f")
                    #:comment '((#f "Tool for writers")
                                ("es" "Herramienta para escritores/as"))
                    #:keywords "manuskript;office;write;edit;novel;text;msk"
                    #:terminal #f
                    #:type "Application"
                    #:icon "manuskript"
-                   #:categories "Office;WordProcessor;"))
-               #t))))))
+                   #:categories "Office;WordProcessor;"))))))))
     (inputs
-     (list pandoc python-lxml python-markdown python-pyqt qtsvg))
+     (list pandoc python-lxml python-markdown python-pyqt qtsvg-5))
     (home-page "http://www.theologeek.ch/manuskript/")
     (synopsis "Tool for writers")
     (description "Manuskript provides a rich environment to help
@@ -874,7 +874,7 @@ editors.")
            perl
            python-wrapper
            qtbase-5
-           qtsvg
+           qtsvg-5
            sqlite))
     (arguments
      `(#:tests? #f                      ; no check target
@@ -900,17 +900,75 @@ Octave.  TeXmacs is completely extensible via Guile.")
     (license license:gpl3+)
     (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
 
+(define-public textpieces
+  (package
+    (name "textpieces")
+    (version "3.2.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/liferooter/textpieces")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "14zq2c7js80m4cq8wpdb3kyz5sw96l8znbz027w8s94gqhm632ff"))))
+    (arguments
+     '(;; The test suite fails to validate appstream file due to lack of
+       ;; network access
+       #:tests? #f
+       #:glib-or-gtk? #t))
+    (build-system meson-build-system)
+    (native-inputs
+     (list appstream-glib
+           blueprint-compiler
+           desktop-file-utils
+           gettext-minimal
+           `(,glib "bin")
+           `(,gtk "bin")
+           pkg-config
+           vala))
+    (inputs
+     (list gtk
+           gtksourceview
+           json-glib
+           libadwaita
+           libgee
+           python
+           python-pygobject
+           python-pyyaml))
+    (home-page "https://github.com/liferooter/textpieces")
+    (synopsis "Quick text processor")
+    (description
+     "Text Pieces is a tool for quick text transformations such as checksums,
+encoding, decoding, etc.
+
+The basic features of Text Pieces are:
+@itemize
+@item Base64 encoding and decoding
+@item SHA-1, SHA-2 and MD5 checksums
+@item Prettify and minify JSON
+@item Covert JSON to YAML and vice versa
+@item Count lines, symbols and words
+@item Escape and unescape string, URL and HTML
+@item Remove leading and trailing whitespaces
+@item Sort and reverse sort lines
+@item Reverse lines and whole text
+@item You can write your own scripts and create custom tools
+@end itemize")
+    (license license:gpl3)))
+
 (define-public scintilla
   (package
     (name "scintilla")
-    (version "5.2.1")
+    (version "5.3.0")
     (source
      (origin
        (method url-fetch)
        (uri (let ((v (apply string-append (string-split version #\.))))
               (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
        (sha256
-        (base32 "1q6z8v2anbdwcxqfqjs0mwl2z4cdzarj0hqxj86fvvdxsr25649r"))))
+        (base32 "0ys0836qjljzqk0wj6y9pnmrcw7ydzn8c06rwbawjk74dpsn0lpx"))))
     (build-system gnu-build-system)
     (arguments
      (list
@@ -1078,7 +1136,8 @@ card.  It offers:
     (arguments
      `(#:tests? #f
        #:make-flags
-       (list "CC=gcc"
+       (list "STRIP=true"               ; don't
+             (string-append "CC=" ,(cc-for-target))
              (string-append "PREFIX=" (assoc-ref %outputs "out"))
              (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
                             "/lib"))
@@ -1215,3 +1274,89 @@ can be embedded in any application
 This package includes the @code{libtree-sitter} runtime library.
 ")
     (license license:expat)))
+
+(define-public mle
+  (package
+    (name "mle")
+    (version "1.5.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/adsr/mle")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1nhd00lsx9v12zdmps92magz76c2d8zzln3lxvzl4ng73gbvq3n0"))))
+    (build-system gnu-build-system)
+    (inputs (list lua pcre uthash))
+    (arguments
+     `(#:test-target "test"
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'fix-lua
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (substitute* "mle.h"
+                        (("<lua5.4/") "<"))
+                      (substitute* "Makefile"
+                        (("-llua5.4") "-llua")
+                        (("/bin/sh") (which "sh")))))
+                  (add-after 'unpack 'patch-test-shebangs
+                    (lambda _
+                      (substitute* (find-files "tests/func" "\\.sh$")
+                        (("/usr/bin/env bash") (which "bash")))))
+                  (delete 'configure) ;no configure script
+                  (add-after 'install 'install-man-pages
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (man (string-append out
+                                                 "/share/man/man1")))
+                        (install-file "mle.1"
+                                      (string-append man))))))
+       #:make-flags (list (string-append "CC="
+                                         ,(cc-for-target))
+                          (string-append "prefix=" %output))))
+    (home-page "https://github.com/adsr/mle")
+    (synopsis "Small, flexible, terminal-based text editor")
+    (description
+     "mle is a small, flexible, terminal-based text editor written in C.
+Notable features include: full Unicode support, syntax highlighting,
+scriptable rc file, macros, search and replace (PCRE), window
+splitting, multiple cursors, and integration with various shell
+commands.")
+    (license license:asl2.0)))
+
+(define-public lite-xl
+  (package
+    (name "lite-xl")
+    (version "2.0.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/lite-xl/lite-xl")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0l2i9mvbkc4kqkwk2p17zd1rlm5v41acdyp2xivi53p2hkj4x6pf"))
+              (modules '((guix build utils)))
+              (snippet '(substitute* "meson.build"
+                          (("dependency\\('lua5\\.2',")
+                           "dependency('lua-5.2',")))))
+    (build-system meson-build-system)
+    (inputs (list agg
+                  freetype
+                  lua-5.2
+                  pcre2
+                  reproc
+                  sdl2))
+    (native-inputs (list pkg-config))
+    (home-page "https://lite-xl.com")
+    (synopsis "Lightweight text editor written in Lua")
+    (description
+     "Lite XL is derived from lite.  It is a lightweight text editor written
+mostly in Lua.  It aims to provide something practical, pretty, small and fast
+easy to modify and extend, or to use without doing either.
+
+The aim of Lite XL compared to lite is to be more user-friendly, improve the
+quality of font rendering, and reduce CPU usage.")
+    (license license:expat)))