gnu: r-rcpparmadillo: Update to 0.9.900.3.0.
[jackhill/guix/guix.git] / gnu / packages / text-editors.scm
index 886babf..18f1c00 100644 (file)
@@ -3,7 +3,7 @@
 ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2017, 2018, 2020 Eric Bavier <bavier@posteo.net>
 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
-;;; Copyright © 2017 ng0 <ng0@n0.is>
+;;; 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 © 2019 Efraim Flashner <efraim@flashner.co.il>
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages code)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
 (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.6")                     ; also update the vis-test input
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/martanne/vis")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "1zjm89cn3rfq8fxpwp66khy53s6vqlmw6q103qyyvix8ydzxdmsh"))
+       (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-search-paths
-     (list (search-path-specification
-            (variable "VIS_PATH")
-            (files '("share/vis")))))
+    (native-inputs
+     `(("vis-test"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/martanne/vis-test")
+                 (commit "4c4f6645de77f697a45899e8645e0c2bbdc7208a")))
+           (sha256
+            (base32 "10vh1pxsqw88a5xwh5irkm85xr66dbycmgpmabyw9h0vm14cvcz2"))
+           (file-name (git-file-name "vis-test" version))))))
     (inputs `(("lua" ,lua)
               ("ncurses" ,ncurses)
               ("libtermkey" ,libtermkey)
@@ -124,7 +155,7 @@ based command language.")
 (define-public kakoune
   (package
     (name "kakoune")
-    (version "2020.01.16")
+    (version "2020.09.01")
     (source
      (origin
        (method url-fetch)
@@ -132,7 +163,7 @@ based command language.")
                            "releases/download/v" version "/"
                            "kakoune-" version ".tar.bz2"))
        (sha256
-        (base32 "1bhd990gywdwdhxc5dn83wwj418c5cw1ndqycf7k0a02kxlg3550"))))
+        (base32 "0x81rxy7bqnhd9374g5ypy4w4nxmm0vnqw6b52bf62jxdg2qj6l6"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
@@ -151,7 +182,7 @@ based command language.")
                                "\";\n        " line)))
              #t))
          (delete 'configure)            ; no configure script
-         ;; kakoune requires us to be in the src/ directory to build
+         ;; kakoune requires us to be in the src/ directory to build.
          (add-before 'build 'chdir
            (lambda _ (chdir "src") #t)))))
     (native-inputs
@@ -196,7 +227,7 @@ bindings and many of the powerful features of GNU Emacs.")
 (define-public jucipp
   (package
     (name "jucipp")
-    (version "1.5.1")
+    (version "1.6.0")
     (home-page "https://gitlab.com/cppit/jucipp")
     (source (origin
               (method git-fetch)
@@ -208,7 +239,7 @@ bindings and many of the powerful features of GNU Emacs.")
                                   (recursive? #t)))
               (file-name (git-file-name name version))
               (sha256
-               (base32 "0v7fmsya2zn1xx59bkv4cbyinmcnv52hm4j40nbfwalcks631xrr"))))
+               (base32 "177myy6qvjlb6j3f3i3xmfml5r3p9in8xzpvm0n59dn56s81gpnr"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-DBUILD_TESTING=ON"
@@ -225,19 +256,6 @@ bindings and many of the powerful features of GNU Emacs.")
                       (chdir "build")
                       #t))
 
-                  ;; This phase is necessary to fix a test failure, see
-                  ;; <https://gitlab.com/cppit/jucipp/-/issues/423>.
-                  (add-after 'unpack 'add-reference-to-clang-internal-header
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (substitute* "src/compile_commands.cc"
-                        ((".*-I/usr/lib/clang.*" all)
-                         (string-append "arguments.emplace_back(\"-I"
-                                        (assoc-ref inputs "libclang")
-                                        "/lib/clang/"
-                                        ,@(list (package-version clang))
-                                        "/include\");\n"
-                                        all)))
-                      #t))
                   (add-after 'unpack 'patch-tiny-process-library
                     (lambda _
                       (with-directory-excursion "lib/tiny-process-library"
@@ -262,16 +280,36 @@ bindings and many of the powerful features of GNU Emacs.")
                         (setenv "DISPLAY" display)
                         (system (string-append xorg-server "/bin/Xvfb "
                                                display " &")))
-                      #t)))))
+                      #t))
+                  (add-after 'install 'wrap
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
+                      ;; for syntax highlighting to work.  shared-mime-info is
+                      ;; necessary for MIME handling.
+                      ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
+                      ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
+                      (let ((out (assoc-ref outputs "out"))
+                            (gtk+ (assoc-ref inputs "gtk+"))
+                            (gtksourceview (assoc-ref inputs "gtksourceview"))
+                            (shared-mime-info (assoc-ref inputs "shared-mime-info")))
+                        (wrap-program (string-append out "/bin/juci")
+                          `("XDG_DATA_DIRS" ":" prefix
+                            (,(string-join
+                               (map (lambda (pkg)
+                                      (string-append pkg "/share"))
+                                    (list out gtk+ gtksourceview shared-mime-info))
+                               ":"))))
+                        #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("xorg-server" ,xorg-server-for-tests)))
     (inputs
      `(("aspell" ,aspell)
        ("boost" ,boost)
+       ("ctags" ,universal-ctags)
        ("gtkmm" ,gtkmm)
        ("gtksourceviewmm" ,gtksourceviewmm)
-       ("libclang" ,clang)
+       ("libclang" ,clang-10)     ;XXX: must be the same version as Mesas LLVM
        ("libgit2" ,libgit2)))
     (synopsis "Lightweight C++ IDE")
     (description
@@ -513,16 +551,16 @@ scripts/input/X11/C/Shell/HTML/Dired): 49KB.
 (define-public ghostwriter
   (package
     (name "ghostwriter")
-    (version "1.8.0")
+    (version "1.8.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/wereturtle/ghostwriter.git")
+                    (url "https://github.com/wereturtle/ghostwriter")
                     (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "13yn82m1l2pq93wbl569a2lzpc3sn8a8g30hsgdch1l9xlmhwran"))))
+                "0jc6szfh5sdnafhwsr1xv7cn1fznniq58bix41hb9wlbkvq7wzi6"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -574,7 +612,7 @@ environment with Markdown markup.")
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/olivierkes/manuskript.git")
+             (url "https://github.com/olivierkes/manuskript")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
@@ -619,24 +657,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)
@@ -671,17 +705,16 @@ 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)
         (uri (git-reference
-               (url "https://github.com/editorconfig/editorconfig-core-c.git")
+               (url "https://github.com/editorconfig/editorconfig-core-c")
                (commit (string-append "v" version))))
         (file-name (git-file-name name version))
         (sha256
-         (base32
-          "0jkc69r4jwn4rih6h6cqvgljjc3ff49cxj8286mi515aczr48cm1"))))
+         (base32 "1311fhh2jfsja2hhk3nwb6nijlq03jw8dk35cwbrac0p9jvy03jx"))))
     (build-system cmake-build-system)
     (arguments
      '(#:phases
@@ -690,17 +723,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/")
@@ -715,32 +756,35 @@ editors.")
 (define-public texmacs
   (package
     (name "texmacs")
-    (version "1.99.11")
+    (version "1.99.13")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
                            "source/TeXmacs-" version "-src.tar.gz"))
        (sha256
-        (base32 "12bp0f34izzqimz49lfpgf4lyz3h45s9xbmk8v6zsawdjki76alg"))
-       (modules '((guix build utils)))
-       (snippet
-        '(begin
-           (delete-file-recursively "3rdparty")
-           #t))))
+        (base32 "1d590yyanh2ar88pd0ns4mf616bq1lq4cwg93m863anhir5irb82"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ("xdg-utils" ,xdg-utils)))       ;for xdg-icon-resource
     (inputs
      `(("freetype" ,freetype)
        ("guile" ,guile-1.8)
        ("perl" ,perl)
        ("python" ,python-wrapper)
-       ("qt" ,qt-4)))
+       ("qt" ,qtbase)))
     (arguments
      `(#:tests? #f                      ; no check target
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-icon-directory
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "packages/linux/icons.sh"
+                 (("/usr/share")
+                  (string-append out "/share")))
+               #t)))
          (add-before 'configure 'gzip-flags
            (lambda _
              (substitute* "Makefile.in"
@@ -748,24 +792,24 @@ editors.")
     (synopsis "Editing platform with special features for scientists")
     (description
      "GNU TeXmacs is a text editing platform which is specialized for
-scientists.  It is ideal for editing structured documents with different
-types of content.  It has robust support for mathematical formulas and plots.
- It can also act as an interface to external mathematical programs such as R
-and Octave.  TeXmacs is completely extensible via Guile.")
+scientists.  It is ideal for editing structured documents with different types
+of content.  It has robust support for mathematical formulas and plots.  It
+can also act as an interface to external mathematical programs such as R and
+Octave.  TeXmacs is completely extensible via Guile.")
     (license license:gpl3+)
     (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
 
 (define-public scintilla
   (package
     (name "scintilla")
-    (version "4.3.3")
+    (version "4.4.4")
     (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 "0zh8c19r1zd4kr9jg2ws0n2n5ic2siz5zbns6cvylyfbpf69ghy2"))))
+        (base32 "1zjsb6iiqi4cw9r9md3xv8qyy86ssz11p680xn7vmllrxshxvs8y"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
@@ -773,20 +817,14 @@ and Octave.  TeXmacs is completely extensible via Guile.")
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)            ;no configure script
-         (add-after 'unpack 'build-shared-library
-           (lambda _
-             (substitute* "gtk/makefile"
-               (("scintilla\\.a") "libscintilla.so")
-               (("\\$\\(AR\\) \\$\\(ARFLAGS\\) \\$@ \\$\\^")
-                "$(CC) -shared $^ -o $@")
-               (("\\$\\(RANLIB\\) \\$@") ""))
-             #t))
          (replace 'install
+           ;; Upstream provides no install script.
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (lib (string-append out "/lib"))
                     (include (string-append out "/include")))
-               (install-file "bin/libscintilla.so" lib)
+               (for-each (lambda (f) (install-file f lib))
+                         (find-files "bin/" "\\.so$"))
                (for-each (lambda (f) (install-file f include))
                          (find-files "include/" "."))
                #t))))))
@@ -811,17 +849,13 @@ and multiple fonts.")
   (package
     (name "geany")
     (version "1.36")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://download.geany.org/"
-                                  "geany-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "0gnm17cr4rf3pmkf0axz4a0fxwnvp55ji0q0lzy88yqbshyxv14i"))
-              (modules '((guix build utils)))
-              (snippet '(begin
-                          (delete-file-recursively "scintilla")
-                          #t))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://download.geany.org/"
+                           "geany-" version ".tar.bz2"))
+       (sha256
+        (base32 "0gnm17cr4rf3pmkf0axz4a0fxwnvp55ji0q0lzy88yqbshyxv14i"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("autoconf" ,autoconf)
@@ -834,26 +868,20 @@ and multiple fonts.")
        ("python-docutils" ,python-docutils))) ;for rst2html
     (inputs
      `(("gtk+" ,gtk+)
-       ("scintilla" ,scintilla)))
+       ;; FIXME: Geany bundles a 3.X release of Scintilla.  It is not
+       ;; currently possible to replace it with our Scintilla package.
+       ;; ("scintilla" ,scintilla)
+       ))
     (arguments
-     `(#:phases
+     `(#:imported-modules ((guix build glib-or-gtk-build-system)
+                           ,@%gnu-build-system-modules)
+       #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+                  (guix build gnu-build-system)
+                  (guix build utils))
+       #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'use-scintilla-shared-library
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "configure.ac"
-               (("scintilla/Makefile") "")
-               (("scintilla/include/Makefile") ""))
-             (substitute* "Makefile.am"
-               (("scintilla ") ""))
-             (substitute* "src/Makefile.am"
-               (("\\$\\(top_builddir\\)/scintilla/libscintilla.la") "")
-               (("geany_LDFLAGS =" all) (string-append all " -lscintilla")))
-             (substitute* "doc/Makefile.am"
-               (("\\$\\(INSTALL_DATA\\) \\$\\(top_srcdir\\)/scintilla/License.txt \\$\\(DOCDIR\\)/ScintillaLicense.txt") ""))
-             (substitute* "tests/Makefile.am"
-               (("AM_LDFLAGS =" all) (string-append all " -lscintilla")))
-             (for-each delete-file (list "autogen.sh" "configure" "Makefile.in"))
-             #t)))))
+         (add-after 'install 'glib-or-gtk-wrap
+           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
     (home-page "https://www.geany.org")
     (synopsis "Fast and lightweight IDE")
     (description "Geany is a small and fast Integrated Development
@@ -930,16 +958,16 @@ 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
-                    (url "https://github.com/vigna/ne.git")
+                    (url "https://github.com/vigna/ne")
                     (commit version)))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0h6d08cnwrk96ss83i9bragwwanph6x54sm3ak1z81146dsqsiif"))))
+                "01aglnsfljlvx0wvyvpjfn4y88jf450a06qnj9a8lgdqv1hdkq1a"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("perl" ,perl)