gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / text-editors.scm
index cdd6f0a..47b6e93 100644 (file)
@@ -5,12 +5,15 @@
 ;;; 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, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020 Tom Zander <tomz@freedommail.ch>
+;;; Copyright © 2020 Mark Meyer <mark@ofosos.org>
+;;; Copyright © 2020 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,9 +35,9 @@
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
+  #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
-  #:use-module (guix build-system cmake)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system python)
   #:use-module ((guix licenses) #:prefix license:)
@@ -44,6 +47,7 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages code)
+  #:use-module (gnu packages crates-io)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
@@ -62,6 +66,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages regex)
 (define-public vis
   (package
     (name "vis")
-    (version "0.5")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/martanne/vis/releases"
-                                  "/download/v" version
-                                  "/vis-v" version ".tar.gz"))
-              (sha256
-               (base32
-                "0aw35n8xk7ir84ckvczc6yshj9ynishrlz0qlv4yc1afbra1gxmn"))))
+    (version "0.7")                     ; also update the vis-test input
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.sr.ht/~martanne/vis")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "1g05ncsnk57kcqm9wsv6sz8b24kyzj8r5rfpa1wfwj8qkjzx3vji"))
+       (file-name (git-file-name name version))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
-       #:tests? #f                  ; no releases; snapshots are missing tests
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'unpack-test-suite
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((vis-test (assoc-ref inputs "vis-test")))
+               (copy-recursively vis-test "test")
+               #t)))
+         (delete 'check)                ; the tests need a wrapped vis
          (add-after 'install 'wrap-binary
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                (wrap-program (string-append out "/bin/vis")
                  `("LUA_PATH" ":" prefix (,LUA_PATH))
                  `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
+               #t)))
+         (add-after 'wrap-binary 'check
+           (assoc-ref %standard-phases 'check))
+         (add-before 'check 'set-up-tests
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               ;; DEFAULT_COMPILER is hard-coded here.
+               (substitute* "test/core/ccan-config.c"
+                 (("\"cc\"")
+                  (format #f "\"~a\"" ,(cc-for-target))))
+
+               ;; Use the ‘vis’ executable that we wrapped above.
+               (install-file (string-append out "/bin/vis") ".")
+
+               ;; XXX Delete 2 failing tests.  TODO: make them not fail. :-)
+               (for-each delete-file
+                         (find-files "test/vis/selections" "^complement"))
                #t))))))
+    (native-inputs
+     `(("vis-test"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://git.sr.ht/~martanne/vis-test")
+                 (commit "bbd2f34ff788e87a51a74069069273ad83c44f1f")))
+           (sha256
+            (base32 "1jsvg2lg3xqfgi79x08kx94mc34mh62ivca10vsci6fqsk68jbd0"))
+           (file-name (git-file-name "vis-test" version))))))
     (inputs `(("lua" ,lua)
               ("ncurses" ,ncurses)
               ("libtermkey" ,libtermkey)
@@ -122,7 +160,7 @@ based command language.")
 (define-public kakoune
   (package
     (name "kakoune")
-    (version "2020.08.04")
+    (version "2020.09.01")
     (source
      (origin
        (method url-fetch)
@@ -130,7 +168,7 @@ based command language.")
                            "releases/download/v" version "/"
                            "kakoune-" version ".tar.bz2"))
        (sha256
-        (base32 "08gikjxyvcr415br1g1llzh5pnq737q55yinalb92cgq3yn9yih2"))))
+        (base32 "0x81rxy7bqnhd9374g5ypy4w4nxmm0vnqw6b52bf62jxdg2qj6l6"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
@@ -168,6 +206,50 @@ competitive (as in keystroke count) with Vim.")
     (home-page "https://kakoune.org/")
     (license license:unlicense)))
 
+(define-public kak-lsp
+  (package
+    (name "kak-lsp")
+    (version "9.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/kak-lsp/kak-lsp")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256 "1wfv2fy5ga6kc51zka3pak0hq97csm2l11bz74w3n1hrf5q9nnf8")))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
+        ("rust-clap" ,rust-clap-2)
+        ("rust-daemonize" ,rust-daemonize-0.4)
+        ("rust-dirs" ,rust-dirs-2)
+        ("rust-enum_primitive" ,rust-enum-primitive-0.1)
+        ("rust-glob" ,rust-glob-0.3)
+        ("rust-itertools" ,rust-itertools-0.9)
+        ("rust-lsp-types" ,rust-lsp-types-0.80)
+        ("rust-jsonrpc-core" ,rust-jsonrpc-core-14)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-rand" ,rust-rand-0.7)
+        ("rust-regex" ,rust-regex-1)
+        ("rust-ropey" ,rust-ropey-1)
+        ("rust-serde" ,rust-serde-1)
+        ("rust-serde_derive" ,rust-serde-derive-1)
+        ("rust-serde_json" ,rust-serde-json-1)
+        ("rust-slog" ,rust-slog-2)
+        ("rust-slog-scope" ,rust-slog-scope-4)
+        ("rust-sloggers" ,rust-sloggers-1)
+        ("rust-toml" ,rust-toml-0.5)
+        ("rust-url" ,rust-url-2)
+        ("rust-whoami" ,rust-whoami-0.8))))
+    (home-page "https://github.com/kak-lsp/kak-lsp")
+    (synopsis "Language Server Protocol (LSP) client for Kakoune")
+    (description
+     "kak-lsp is a Language Server Protocol client for Kakoune implemented in
+Rust.")
+    (license license:unlicense)))
+
 (define-public joe
   (package
     (name "joe")
@@ -194,7 +276,7 @@ bindings and many of the powerful features of GNU Emacs.")
 (define-public jucipp
   (package
     (name "jucipp")
-    (version "1.6.0")
+    (version "1.6.3")
     (home-page "https://gitlab.com/cppit/jucipp")
     (source (origin
               (method git-fetch)
@@ -206,7 +288,7 @@ bindings and many of the powerful features of GNU Emacs.")
                                   (recursive? #t)))
               (file-name (git-file-name name version))
               (sha256
-               (base32 "177myy6qvjlb6j3f3i3xmfml5r3p9in8xzpvm0n59dn56s81gpnr"))))
+               (base32 "1gy2xb5rm7q4zx9rl23h96b1i46fz27v25nklj50fvqp8ax2gxqy"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-DBUILD_TESTING=ON"
@@ -276,11 +358,11 @@ bindings and many of the powerful features of GNU Emacs.")
        ("ctags" ,universal-ctags)
        ("gtkmm" ,gtkmm)
        ("gtksourceviewmm" ,gtksourceviewmm)
-       ("libclang" ,clang-10)     ;XXX: must be the same version as Mesas LLVM
+       ("libclang" ,clang-11)     ;XXX: must be the same version as Mesas LLVM
        ("libgit2" ,libgit2)))
     (synopsis "Lightweight C++ IDE")
     (description
-     "juCi++ is a small @dfn{IDE} (Integrated Development Environment)
+     "juCi++ is a small @acronym{IDE, Integrated Development Environment}
 designed especially towards libclang with speed, stability, and ease of use
 in mind.
 
@@ -518,16 +600,17 @@ scripts/input/X11/C/Shell/HTML/Dired): 49KB.
 (define-public ghostwriter
   (package
     (name "ghostwriter")
-    (version "1.8.1")
+    ;; XXX We use a release candidate to fix incompatibility with Qt 5.15.
+    (version "2.0.0-rc4")
     (source (origin
               (method git-fetch)
               (uri (git-reference
                     (url "https://github.com/wereturtle/ghostwriter")
-                    (commit (string-append "v" version))))
+                    (commit version)))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0jc6szfh5sdnafhwsr1xv7cn1fznniq58bix41hb9wlbkvq7wzi6"))))
+                "07547503a209hc0fcg902w3x0s1m899c10nj3gqz3hak0cmrasi3"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -624,24 +707,20 @@ environment with Markdown markup.")
                      (icons-dir (string-append out "/share/pixmaps")))
                  (install-file "icons/Manuskript/manuskript.svg" icons-dir)
                  (mkdir-p apps)
-                 (with-output-to-file (string-append apps "/manuskript.desktop")
-                   (lambda _
-                     (format #t
-                             "[Desktop Entry]~@
-                         Name=Manuskript~@
-                         MimeType=application/x-manuskript-book;~@
-                         Exec=~a/bin/manuskript %f~@
-                         Comment=Tool for writers~@
-                         Comment[es]=Herramienta para escritores/as~@
-                         Keywords=manuskript;office;write;edit;novel;text;msk~@
-                         Terminal=false~@
-                         Type=Application~@
-                         Icon=manuskript~@
-                         Categories=Office;WordProcessor;~%"
-                             out))))
+                 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
+                   #:name "Manuskript"
+                   #:mime-type "application/x-manuskript-book;"
+                   #:exec (string-append out "/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))))))
     (inputs
-     `(("ghc-pandoc" ,ghc-pandoc)
+     `(("pandoc" ,pandoc)
        ("python-lxml" ,python-lxml)
        ("python-markdown" ,python-markdown)
        ("python-pyqt" ,python-pyqt)
@@ -676,7 +755,7 @@ in plain text file format.")
 (define-public editorconfig-core-c
   (package
     (name "editorconfig-core-c")
-    (version "0.12.3")
+    (version "0.12.4")
     (source
       (origin
         (method git-fetch)
@@ -685,8 +764,7 @@ in plain text file format.")
                (commit (string-append "v" version))))
         (file-name (git-file-name name version))
         (sha256
-         (base32
-          "0jkc69r4jwn4rih6h6cqvgljjc3ff49cxj8286mi515aczr48cm1"))))
+         (base32 "1311fhh2jfsja2hhk3nwb6nijlq03jw8dk35cwbrac0p9jvy03jx"))))
     (build-system cmake-build-system)
     (arguments
      '(#:phases
@@ -695,17 +773,25 @@ in plain text file format.")
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((tests (assoc-ref inputs "tests")))
                (copy-recursively tests "tests"))
-             #t)))))
+             #t))
+         (add-after 'install 'delete-static-library
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib")))
+               (with-directory-excursion lib
+                 (delete-file "libeditorconfig_static.a"))
+               #t))))))
     (native-inputs
-     `(("tests" ,(origin
-                   (method git-fetch)
-                   (uri (git-reference
-                          (url "https://github.com/editorconfig/editorconfig-core-test")
-                          (commit "6ea1d8ece62cac9cf72c79dce4879b046abe1fe7"))) ; matches version
-                   (file-name (git-file-name "editorconfig-core-test" version))
-                   (sha256
-                    (base32
-                     "1sf6910idnd4bgzbj8w8f9ldsbkaqa0lh6syymwy3hfqda63acj7"))))))
+     `(("tests"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/editorconfig/editorconfig-core-test")
+                 ;; The tests submodule commit matching this package's version.
+                 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
+           (file-name (git-file-name "editorconfig-core-test" version))
+           (sha256
+            (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
     (inputs
      `(("pcre2" ,pcre2)))
     (home-page "https://editorconfig.org/")
@@ -720,14 +806,14 @@ editors.")
 (define-public texmacs
   (package
     (name "texmacs")
-    (version "1.99.13")
+    (version "1.99.19")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
                            "source/TeXmacs-" version "-src.tar.gz"))
        (sha256
-        (base32 "1d590yyanh2ar88pd0ns4mf616bq1lq4cwg93m863anhir5irb82"))))
+        (base32 "1izwqb0z4gqiglv57mjswk6sjivny73kd2sxrf3nmj7wr12pn5m8"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -737,7 +823,8 @@ editors.")
        ("guile" ,guile-1.8)
        ("perl" ,perl)
        ("python" ,python-wrapper)
-       ("qt" ,qtbase)))
+       ("qt" ,qtbase)
+       ("qtsvg" ,qtsvg)))
     (arguments
      `(#:tests? #f                      ; no check target
        #:phases
@@ -749,6 +836,14 @@ editors.")
                  (("/usr/share")
                   (string-append out "/share")))
                #t)))
+         (add-after 'install 'install-desktop-file
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Install desktop file.
+             (let* ((out (assoc-ref outputs "out"))
+                    (apps (string-append out "/share/applications"))
+                    (source "TeXmacs/misc/mime/texmacs.desktop"))
+               (install-file source apps)
+               #t)))
          (add-before 'configure 'gzip-flags
            (lambda _
              (substitute* "Makefile.in"
@@ -766,14 +861,14 @@ Octave.  TeXmacs is completely extensible via Guile.")
 (define-public scintilla
   (package
     (name "scintilla")
-    (version "4.4.4")
+    (version "5.0.1")
     (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 "1zjsb6iiqi4cw9r9md3xv8qyy86ssz11p680xn7vmllrxshxvs8y"))))
+        (base32 "0w5550fijkhmzvdydd8770qq9dgnbq1sd0a8rn4g6mwyfpcyhbfy"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
@@ -793,7 +888,8 @@ Octave.  TeXmacs is completely extensible via Guile.")
                          (find-files "include/" "."))
                #t))))))
     (native-inputs
-     `(("pkg-config" ,pkg-config)
+     `(("gcc" ,gcc-9)                   ;Code has C++17 requirements
+       ("pkg-config" ,pkg-config)
        ("python" ,python-wrapper)))
     (inputs
      `(("gtk+" ,gtk+)))
@@ -812,14 +908,14 @@ and multiple fonts.")
 (define-public geany
   (package
     (name "geany")
-    (version "1.36")
+    (version "1.37.1")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://download.geany.org/"
                            "geany-" version ".tar.bz2"))
        (sha256
-        (base32 "0gnm17cr4rf3pmkf0axz4a0fxwnvp55ji0q0lzy88yqbshyxv14i"))))
+        (base32 "060sachn33xpx3a609f09y97qq5ky17gvv686zbvrn618ij7bi8q"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("autoconf" ,autoconf)
@@ -870,7 +966,7 @@ The basic features of Geany are:
 (define-public fe
   (package
     (name "fe")
-    ;; Stable release is 1.8.  However, this development version
+    ;; Stable release is 1.9.  However, this development version
     ;; introduces support for UTF-8.
     (version "2.0")
     (source (origin
@@ -879,7 +975,7 @@ The basic features of Geany are:
                                   "fe-" version ".tar.gz"))
               (sha256
                (base32
-                "1hwws7si1752z6hp61zxznvgsb6846lp8zl1hn5ddhsbafwalwb9"))))
+                "10mk5wc3dsdp46b3hkjyd740gcdv6m1gvlr3p8xjxf55b3vfs0la"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                      ;no test
@@ -922,7 +1018,7 @@ card.  It offers:
 (define-public ne
   (package
     (name "ne")
-    (version "3.2.1")
+    (version "3.3.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -931,7 +1027,7 @@ card.  It offers:
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0h6d08cnwrk96ss83i9bragwwanph6x54sm3ak1z81146dsqsiif"))))
+                "01aglnsfljlvx0wvyvpjfn4y88jf450a06qnj9a8lgdqv1hdkq1a"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("perl" ,perl)
@@ -952,7 +1048,7 @@ card.  It offers:
              (substitute* "src/makefile"
               (("-lcurses") "-lncurses"))
              #t)))))
-    (home-page "http://ne.di.unimi.it/")
+    (home-page "https://ne.di.unimi.it/")
     (synopsis "Text editor with menu bar")
     (description "This package provides a modeless text editor with menu bar.
 It supports syntax highlighting, regular expressions, configurable menus,
@@ -992,3 +1088,42 @@ files.  It was originally developed on the Amiga 3000T.")
 systems that displays its buffer(s) as a hex dump.  The user interface is kept
 similar to vi/ex.")
     (license license:bsd-3)))
+
+(define-public virtaal
+  (package
+    (name "virtaal")
+    (version "0.7.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/translate/Virtaal/"
+                                  version "/virtaal-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:use-setuptools? #f
+       #:tests? #f ;; Failing tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Set data file path to absolute store path.
+             (substitute* "virtaal/common/pan_app.py"
+               (("file_discovery\\.get_abs_data_filename.*")
+                (string-append "os.path.join('"
+                               (assoc-ref outputs "out")
+                               "/share', *path_parts)"))))))))
+    (inputs
+     `(("python2-lxml" ,python2-lxml)
+       ("python2-pygtk" ,python2-pygtk)
+       ("python2-simplejson" ,python2-simplejson)
+       ("python2-translate-toolkit" ,python2-translate-toolkit)
+       ("python2-pycurl" ,python2-pycurl)))
+    (synopsis "Graphical translation tool")
+    (description "Virtaal is a powerful yet simple translation tool with an
+uncluttered user interface.  It supports a multitude of translation formats
+provided by the Translate Toolkit, including XLIFF and PO.")
+    (home-page "https://virtaal.translatehouse.org/")
+    (license license:gpl2+)))