text-editors.scm 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org>
  3. ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
  4. ;;; Copyright © 2017, 2018, 2020 Eric Bavier <bavier@posteo.net>
  5. ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
  6. ;;; Copyright © 2017 Nikita <nikita@n0.is>
  7. ;;; Copyright © 2014 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.org>
  8. ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  9. ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
  10. ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
  11. ;;; Copyright © 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  12. ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
  13. ;;; Copyright © 2020 Tom Zander <tomz@freedommail.ch>
  14. ;;; Copyright © 2020 Mark Meyer <mark@ofosos.org>
  15. ;;; Copyright © 2020 Maxime Devos <maximedevos@telenet.be>
  16. ;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
  17. ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
  18. ;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
  19. ;;; Copyright © 2021 Calum Irwin <calumirwin1@gmail.com>
  20. ;;;
  21. ;;; This file is part of GNU Guix.
  22. ;;;
  23. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  24. ;;; under the terms of the GNU General Public License as published by
  25. ;;; the Free Software Foundation; either version 3 of the License, or (at
  26. ;;; your option) any later version.
  27. ;;;
  28. ;;; GNU Guix is distributed in the hope that it will be useful, but
  29. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  30. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31. ;;; GNU General Public License for more details.
  32. ;;;
  33. ;;; You should have received a copy of the GNU General Public License
  34. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  35. (define-module (gnu packages text-editors)
  36. #:use-module (guix packages)
  37. #:use-module (guix download)
  38. #:use-module (guix gexp)
  39. #:use-module (guix git-download)
  40. #:use-module (guix utils)
  41. #:use-module (guix build-system cargo)
  42. #:use-module (guix build-system cmake)
  43. #:use-module (guix build-system gnu)
  44. #:use-module (guix build-system glib-or-gtk)
  45. #:use-module (guix build-system python)
  46. #:use-module ((guix licenses) #:prefix license:)
  47. #:use-module (gnu packages)
  48. #:use-module (gnu packages aspell)
  49. #:use-module (gnu packages assembly)
  50. #:use-module (gnu packages autotools)
  51. #:use-module (gnu packages base)
  52. #:use-module (gnu packages boost)
  53. #:use-module (gnu packages code)
  54. #:use-module (gnu packages crates-io)
  55. #:use-module (gnu packages documentation)
  56. #:use-module (gnu packages fontutils)
  57. #:use-module (gnu packages freedesktop)
  58. #:use-module (gnu packages gcc)
  59. #:use-module (gnu packages gettext)
  60. #:use-module (gnu packages glib)
  61. #:use-module (gnu packages gtk)
  62. #:use-module (gnu packages guile)
  63. #:use-module (gnu packages haskell-xyz)
  64. #:use-module (gnu packages libbsd)
  65. #:use-module (gnu packages libreoffice)
  66. #:use-module (gnu packages llvm)
  67. #:use-module (gnu packages lua)
  68. #:use-module (gnu packages ncurses)
  69. #:use-module (gnu packages pcre)
  70. #:use-module (gnu packages perl)
  71. #:use-module (gnu packages pkg-config)
  72. #:use-module (gnu packages python)
  73. #:use-module (gnu packages python-web)
  74. #:use-module (gnu packages python-xyz)
  75. #:use-module (gnu packages qt)
  76. #:use-module (gnu packages regex)
  77. #:use-module (gnu packages ruby)
  78. #:use-module (gnu packages terminals)
  79. #:use-module (gnu packages texinfo)
  80. #:use-module (gnu packages version-control)
  81. #:use-module (gnu packages xml)
  82. #:use-module (gnu packages xorg))
  83. (define-public vis
  84. (package
  85. (name "vis")
  86. (version "0.7") ; also update the vis-test input
  87. (source
  88. (origin
  89. (method git-fetch)
  90. (uri (git-reference
  91. (url "https://git.sr.ht/~martanne/vis")
  92. (commit (string-append "v" version))))
  93. (sha256
  94. (base32 "1g05ncsnk57kcqm9wsv6sz8b24kyzj8r5rfpa1wfwj8qkjzx3vji"))
  95. (file-name (git-file-name name version))))
  96. (build-system gnu-build-system)
  97. (arguments
  98. `(#:test-target "test"
  99. #:phases
  100. (modify-phases %standard-phases
  101. (add-after 'unpack 'unpack-test-suite
  102. (lambda* (#:key inputs #:allow-other-keys)
  103. (let ((vis-test (assoc-ref inputs "vis-test")))
  104. (copy-recursively vis-test "test")
  105. #t)))
  106. (delete 'check) ; the tests need a wrapped vis
  107. (add-after 'install 'wrap-binary
  108. (lambda* (#:key inputs outputs #:allow-other-keys)
  109. (let* ((out (assoc-ref outputs "out"))
  110. (lpeg (assoc-ref inputs "lua-lpeg"))
  111. (lua-version ,(version-major+minor (package-version lua)))
  112. (LUA_PATH (string-append lpeg "/share/lua/"
  113. lua-version "/?.lua"))
  114. (LUA_CPATH (string-append lpeg "/lib/lua/"
  115. lua-version "/?.so")))
  116. (wrap-program (string-append out "/bin/vis")
  117. `("LUA_PATH" ":" prefix (,LUA_PATH))
  118. `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
  119. #t)))
  120. (add-after 'wrap-binary 'check
  121. (assoc-ref %standard-phases 'check))
  122. (add-before 'check 'set-up-tests
  123. (lambda* (#:key outputs #:allow-other-keys)
  124. (let ((out (assoc-ref outputs "out")))
  125. ;; DEFAULT_COMPILER is hard-coded here.
  126. (substitute* "test/core/ccan-config.c"
  127. (("\"cc\"")
  128. (format #f "\"~a\"" ,(cc-for-target))))
  129. ;; Use the ‘vis’ executable that we wrapped above.
  130. (install-file (string-append out "/bin/vis") ".")
  131. ;; XXX Delete 2 failing tests. TODO: make them not fail. :-)
  132. (for-each delete-file
  133. (find-files "test/vis/selections" "^complement"))
  134. #t))))))
  135. (native-inputs
  136. `(("vis-test"
  137. ,(origin
  138. (method git-fetch)
  139. (uri (git-reference
  140. (url "https://git.sr.ht/~martanne/vis-test")
  141. (commit "bbd2f34ff788e87a51a74069069273ad83c44f1f")))
  142. (sha256
  143. (base32 "1jsvg2lg3xqfgi79x08kx94mc34mh62ivca10vsci6fqsk68jbd0"))
  144. (file-name (git-file-name "vis-test" version))))))
  145. (inputs `(("lua" ,lua)
  146. ("ncurses" ,ncurses)
  147. ("libtermkey" ,libtermkey)
  148. ("lua-lpeg" ,lua-lpeg)
  149. ("tre" ,tre)))
  150. (synopsis "Vim-like text editor")
  151. (description
  152. "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
  153. editor. It extends vim's modal editing with built-in support for multiple
  154. cursors/selections and combines it with sam's structural regular expression
  155. based command language.")
  156. (home-page "https://github.com/martanne/vis")
  157. (license (list license:isc ; Main distribution.
  158. license:public-domain ; map.[ch]
  159. license:expat)))) ; lexers and libutf.[ch]
  160. (define-public kakoune
  161. (package
  162. (name "kakoune")
  163. (version "2021.08.28")
  164. (source
  165. (origin
  166. (method url-fetch)
  167. (uri (string-append "https://github.com/mawww/kakoune/"
  168. "releases/download/v" version "/"
  169. "kakoune-" version ".tar.bz2"))
  170. (sha256
  171. (base32 "1jvn4b9rma5jjvg3xz8nf224pbq3ry570j6qvc834wn5v3gxfvkg"))))
  172. (build-system gnu-build-system)
  173. (arguments
  174. `(#:make-flags
  175. (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
  176. #:phases
  177. (modify-phases %standard-phases
  178. (add-after 'unpack 'patch-source
  179. (lambda _
  180. ;; kakoune uses confstr with _CS_PATH to find out where to find
  181. ;; a posix shell, but this doesn't work in the build
  182. ;; environment. This substitution just replaces that result
  183. ;; with the "sh" path.
  184. (substitute* "src/shell_manager.cc"
  185. (("if \\(m_shell.empty\\(\\)\\)" line)
  186. (string-append "m_shell = \"" (which "sh")
  187. "\";\n " line)))
  188. #t))
  189. (delete 'configure) ; no configure script
  190. ;; kakoune requires us to be in the src/ directory to build.
  191. (add-before 'build 'chdir
  192. (lambda _ (chdir "src") #t)))))
  193. (native-inputs
  194. `(("gcc", gcc-10) ; See https://github.com/mawww/kakoune/issues/4318
  195. ("asciidoc" ,asciidoc)
  196. ("pkg-config" ,pkg-config)
  197. ("ruby" ,ruby)))
  198. (synopsis "Vim-inspired code editor")
  199. (description
  200. "Kakoune is a code editor heavily inspired by Vim, as such most of its
  201. commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
  202. editing language\" model. Kakoune has a strong focus on interactivity, most
  203. commands provide immediate and incremental results, while still being
  204. competitive (as in keystroke count) with Vim.")
  205. (home-page "https://kakoune.org/")
  206. (license license:unlicense)))
  207. (define-public kak-lsp
  208. (package
  209. (name "kak-lsp")
  210. (version "9.0.0")
  211. (source
  212. (origin
  213. (method git-fetch)
  214. (uri (git-reference
  215. (url "https://github.com/kak-lsp/kak-lsp")
  216. (commit (string-append "v" version))))
  217. (file-name (git-file-name name version))
  218. (sha256 "1wfv2fy5ga6kc51zka3pak0hq97csm2l11bz74w3n1hrf5q9nnf8")))
  219. (build-system cargo-build-system)
  220. (arguments
  221. `(#:cargo-inputs
  222. (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
  223. ("rust-clap" ,rust-clap-2)
  224. ("rust-daemonize" ,rust-daemonize-0.4)
  225. ("rust-dirs" ,rust-dirs-2)
  226. ("rust-enum_primitive" ,rust-enum-primitive-0.1)
  227. ("rust-glob" ,rust-glob-0.3)
  228. ("rust-itertools" ,rust-itertools-0.9)
  229. ("rust-lsp-types" ,rust-lsp-types-0.80)
  230. ("rust-jsonrpc-core" ,rust-jsonrpc-core-14)
  231. ("rust-libc" ,rust-libc-0.2)
  232. ("rust-rand" ,rust-rand-0.7)
  233. ("rust-regex" ,rust-regex-1)
  234. ("rust-ropey" ,rust-ropey-1)
  235. ("rust-serde" ,rust-serde-1)
  236. ("rust-serde_derive" ,rust-serde-derive-1)
  237. ("rust-serde_json" ,rust-serde-json-1)
  238. ("rust-slog" ,rust-slog-2)
  239. ("rust-slog-scope" ,rust-slog-scope-4)
  240. ("rust-sloggers" ,rust-sloggers-1)
  241. ("rust-toml" ,rust-toml-0.5)
  242. ("rust-url" ,rust-url-2)
  243. ("rust-whoami" ,rust-whoami-0.8))))
  244. (home-page "https://github.com/kak-lsp/kak-lsp")
  245. (synopsis "Language Server Protocol (LSP) client for Kakoune")
  246. (description
  247. "kak-lsp is a Language Server Protocol client for Kakoune implemented in
  248. Rust.")
  249. (license license:unlicense)))
  250. (define-public parinfer-rust
  251. (package
  252. (name "parinfer-rust")
  253. (version "0.4.3")
  254. (source
  255. (origin
  256. (method git-fetch)
  257. (uri (git-reference
  258. (url "https://github.com/eraserhd/parinfer-rust")
  259. (commit (string-append "v" version))))
  260. (sha256
  261. (base32 "0hj5in5h7pj72m4ag80ing513fh65q8xlsf341qzm3vmxm3y3jgd"))
  262. (file-name (git-file-name name version))))
  263. (build-system cargo-build-system)
  264. (arguments
  265. `(#:cargo-inputs
  266. (("rust-getopts" ,rust-getopts-0.2)
  267. ("rust-libc" ,rust-libc-0.2)
  268. ("rust-emacs" ,rust-emacs-0.11)
  269. ("rust-serde" ,rust-serde-1)
  270. ("rust-serde-json" ,rust-serde-json-1)
  271. ("rust-serde-derive" ,rust-serde-derive-1)
  272. ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
  273. ("rust-unicode-width" ,rust-unicode-width-0.1))))
  274. (inputs
  275. `(("clang" ,clang)))
  276. (home-page "https://github.com/justinbarclay/parinfer-rust")
  277. (synopsis "Infer parantheses for Clojure, Lisp and Scheme")
  278. (description
  279. "Parinfer is a plugin for Kakoune, Vim, Neovim and Emacs that infers
  280. paretheses and indentation. This library can be called from other editors that
  281. can load dynamic libraries.")
  282. (license license:expat)))
  283. (define-public joe
  284. (package
  285. (name "joe")
  286. (version "4.6")
  287. (source
  288. (origin
  289. (method url-fetch)
  290. (uri (string-append "https://sourceforge.net/projects/joe-editor/"
  291. "files/JOE sources/joe-" version "/"
  292. "joe-" version ".tar.gz"))
  293. (sha256
  294. (base32
  295. "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
  296. (build-system gnu-build-system)
  297. (inputs `(("ncurses" ,ncurses)))
  298. (home-page "http://joe-editor.sourceforge.net/")
  299. (synopsis "Console screen editor")
  300. (description
  301. "JOE is a powerful console screen editor with a \"mode-less\" user
  302. interface similar to many user-friendly editors. JOE has some of the key
  303. bindings and many of the powerful features of GNU Emacs.")
  304. (license license:gpl3+)))
  305. (define-public jucipp
  306. (package
  307. (name "jucipp")
  308. (version "1.6.3")
  309. (home-page "https://gitlab.com/cppit/jucipp")
  310. (source (origin
  311. (method git-fetch)
  312. (uri (git-reference (url home-page)
  313. (commit (string-append "v" version))
  314. ;; Two submodules are required which are
  315. ;; developed alongside JuCi++ and difficult
  316. ;; to package separately.
  317. (recursive? #t)))
  318. (file-name (git-file-name name version))
  319. (sha256
  320. (base32 "1gy2xb5rm7q4zx9rl23h96b1i46fz27v25nklj50fvqp8ax2gxqy"))))
  321. (build-system cmake-build-system)
  322. (arguments
  323. `(#:configure-flags '("-DBUILD_TESTING=ON"
  324. ;; These arguments are here to facilitate an "in-source"
  325. ;; build using "./build" instead of the default "../build".
  326. ;; The test suite expects that to be the case.
  327. "..")
  328. #:out-of-source? #f
  329. #:phases (modify-phases %standard-phases
  330. (add-before 'configure 'enter-build-directory
  331. (lambda _
  332. (mkdir "build")
  333. (chdir "build")
  334. #t))
  335. (add-after 'unpack 'patch-tiny-process-library
  336. (lambda _
  337. (with-directory-excursion "lib/tiny-process-library"
  338. (substitute* '("process_unix.cpp"
  339. "tests/io_test.cpp")
  340. (("/bin/sh") (which "sh"))))
  341. #t))
  342. (add-after 'unpack 'disable-git-test
  343. (lambda _
  344. (substitute* "tests/CMakeLists.txt"
  345. ;; Disable the git test, as it requires the full checkout.
  346. (("add_test\\(git_test.*\\)") ""))
  347. #t))
  348. (add-before 'check 'pre-check
  349. (lambda* (#:key inputs #:allow-other-keys)
  350. ;; Tests do not expect HOME to be empty.
  351. (setenv "HOME" "/etc")
  352. ;; Most tests require an X server.
  353. (let ((xorg-server (assoc-ref inputs "xorg-server"))
  354. (display ":1"))
  355. (setenv "DISPLAY" display)
  356. (system (string-append xorg-server "/bin/Xvfb "
  357. display " &")))
  358. #t))
  359. (add-after 'install 'wrap
  360. (lambda* (#:key inputs outputs #:allow-other-keys)
  361. ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
  362. ;; for syntax highlighting to work. shared-mime-info is
  363. ;; necessary for MIME handling.
  364. ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
  365. ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
  366. (let ((out (assoc-ref outputs "out"))
  367. (gtk+ (assoc-ref inputs "gtk+"))
  368. (gtksourceview (assoc-ref inputs "gtksourceview"))
  369. (shared-mime-info (assoc-ref inputs "shared-mime-info")))
  370. (wrap-program (string-append out "/bin/juci")
  371. `("XDG_DATA_DIRS" ":" prefix
  372. (,(string-join
  373. (map (lambda (pkg)
  374. (string-append pkg "/share"))
  375. (list out gtk+ gtksourceview shared-mime-info))
  376. ":"))))
  377. #t))))))
  378. (native-inputs
  379. `(("pkg-config" ,pkg-config)
  380. ("xorg-server" ,xorg-server-for-tests)))
  381. (inputs
  382. `(("aspell" ,aspell)
  383. ("boost" ,boost)
  384. ("ctags" ,universal-ctags)
  385. ("gtkmm" ,gtkmm)
  386. ("gtksourceviewmm" ,gtksourceviewmm)
  387. ("libclang" ,clang-11) ;XXX: must be the same version as Mesas LLVM
  388. ("libgit2" ,libgit2)))
  389. (synopsis "Lightweight C++ IDE")
  390. (description
  391. "juCi++ is a small @acronym{IDE, Integrated Development Environment}
  392. designed especially towards libclang with speed, stability, and ease of use
  393. in mind.
  394. It supports autocompletion, on-the-fly warnings and errors, syntax
  395. highlighting, and integrates with Git as well as the CMake and Meson build
  396. systems.")
  397. (license license:expat)))
  398. (define-public leafpad
  399. (package
  400. (name "leafpad")
  401. (version "0.8.18.1")
  402. (source (origin
  403. (method url-fetch)
  404. (uri (string-append "mirror://savannah/"
  405. "leafpad/leafpad-" version ".tar.gz"))
  406. (sha256
  407. (base32
  408. "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
  409. (build-system glib-or-gtk-build-system)
  410. (native-inputs
  411. `(("intltool" ,intltool)
  412. ("pkg-config" ,pkg-config)))
  413. (inputs
  414. `(("gtk+" ,gtk+-2)))
  415. (home-page "http://tarot.freeshell.org/leafpad/")
  416. (synopsis "GTK+ based text editor")
  417. (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
  418. development focuses on keeping weight down to a minimum, only the most essential
  419. features are implemented in the editor. Leafpad is simple to use, is easily
  420. compiled, requires few libraries, and starts up quickly. ")
  421. (license license:gpl2+)))
  422. (define-public l3afpad
  423. (let ((commit "5235c9e13bbf0d31a902c6776918c2d7cdbb61ff")
  424. (revision "0"))
  425. (package
  426. (name "l3afpad")
  427. (version (git-version "0.8.18.1.11" revision commit))
  428. (source (origin
  429. (method git-fetch)
  430. (file-name (git-file-name name version))
  431. (uri (git-reference
  432. (url "https://github.com/stevenhoneyman/l3afpad")
  433. (commit commit)))
  434. (sha256
  435. (base32
  436. "1alyghm2wpakzdfag0g4g8gb1h9l4wdg7mnhq8bk0iq5ryqia16a"))))
  437. (build-system glib-or-gtk-build-system)
  438. (native-inputs
  439. `(("intltool" ,intltool)
  440. ("autoconf" ,autoconf)
  441. ("automake" ,automake)
  442. ("pkg-config" ,pkg-config)))
  443. (inputs
  444. `(("gtk+" ,gtk+)))
  445. (home-page "http://tarot.freeshell.org/leafpad/")
  446. (synopsis "GTK+ 3 based text editor")
  447. (description "L3afpad is a GTK+ 3 text editor that emphasizes simplicity. As
  448. development focuses on keeping weight down to a minimum, only the most essential
  449. features are implemented in the editor. L3afpad is simple to use, is easily
  450. compiled, requires few libraries, and starts up quickly. L3afpad is a
  451. fork of Leafpad that uses GTK+ 3 instead of GTK+ 2.")
  452. (license license:gpl2+))))
  453. (define-public e3
  454. (package
  455. (name "e3")
  456. (version "2.82")
  457. (source (origin
  458. (method url-fetch)
  459. (uri (string-append "https://sites.google.com/site/e3editor/Home/"
  460. "e3-" version ".tgz"))
  461. (sha256
  462. (base32
  463. "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
  464. (modules '((guix build utils)))
  465. ;; Remove pre-built binaries.
  466. (snippet '(begin
  467. (delete-file-recursively "bin")
  468. #t))))
  469. (build-system gnu-build-system)
  470. (arguments
  471. `(#:tests? #f
  472. #:make-flags (list (string-append "PREFIX="
  473. (assoc-ref %outputs "out")))
  474. #:phases (modify-phases %standard-phases
  475. (delete 'configure))))
  476. (native-inputs
  477. `(("nasm" ,nasm)))
  478. (home-page "https://sites.google.com/site/e3editor/")
  479. (synopsis "Tiny text editor written in assembly")
  480. (description
  481. "e3 is a micro text editor with an executable code size between 3800 and
  482. 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
  483. of the basic functions one expects plus built in arithmetic calculations.
  484. UTF-8 coding of unicode characters is supported as well. e3 can use
  485. Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
  486. 16, 32, and 64-bit CPUs.")
  487. (supported-systems '("x86_64-linux" "i686-linux"))
  488. (license license:gpl2+)))
  489. (define-public mg
  490. (package
  491. (name "mg")
  492. (version "20210609")
  493. (source (origin
  494. (method git-fetch)
  495. (uri (git-reference
  496. (url "https://github.com/hboetes/mg")
  497. (commit version)))
  498. (file-name (git-file-name name version))
  499. (sha256
  500. (base32
  501. "04c2vqxg31mk15cfrhzrivykis8fmf0m1d8h1qdjdmlfxd4qwaqf"))
  502. (modules '((guix build utils)))
  503. (snippet '(begin
  504. (substitute* "GNUmakefile"
  505. (("/usr/bin/") ""))))))
  506. (build-system gnu-build-system)
  507. (native-inputs (list pkg-config))
  508. (inputs (list diffutils libbsd ncurses))
  509. (arguments
  510. ;; No test suite available.
  511. (list #:tests? #f
  512. #:make-flags
  513. #~(list (string-append "prefix=" #$output)
  514. (string-append "CC=" #$(cc-for-target))
  515. (string-append "PKG_CONFIG=" #$(pkg-config-for-target)))
  516. #:phases
  517. #~(modify-phases %standard-phases
  518. (delete 'configure) ;no configure script
  519. (add-before 'build 'correct-location-of-diff
  520. (lambda* (#:key inputs #:allow-other-keys)
  521. (substitute* "buffer.c"
  522. (("/usr/bin/diff")
  523. (search-input-file inputs "/bin/diff")))))
  524. (add-before 'install 'patch-tutorial-location
  525. (lambda _
  526. (substitute* "mg.1"
  527. (("/usr") #$output))))
  528. (add-after 'install 'install-tutorial
  529. (lambda _
  530. (let ((doc (string-append #$output "/share/doc/mg")))
  531. (install-file "tutorial" doc)))))))
  532. (home-page "https://homepage.boetes.org/software/mg/")
  533. (synopsis "Microscopic GNU Emacs clone")
  534. (description
  535. "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
  536. \"broadly\" compatible. This is a portable version of the mg maintained by the
  537. OpenBSD team.")
  538. (license license:public-domain)))
  539. (define-public qemacs
  540. (package
  541. (name "qemacs")
  542. (version "0.3.3")
  543. (source
  544. (origin
  545. (method url-fetch)
  546. (uri (string-append "https://bellard.org/qemacs/"
  547. "qemacs-" version ".tar.gz"))
  548. (sha256
  549. (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
  550. (build-system gnu-build-system)
  551. (arguments
  552. `(#:tests? #f ;no test
  553. #:phases
  554. (modify-phases %standard-phases
  555. (add-before 'build 'build-qhtml
  556. ;; Build fails without first creating qHTML library.
  557. (lambda _ (invoke "make" "-C" "libqhtml")))
  558. (add-before 'install 'fix-man-pages-directory
  559. ;; Install in $out/share/man instead of $out/man.
  560. (lambda _
  561. (substitute* "Makefile"
  562. (("/man/man1" all) (string-append "/share" all)))
  563. #t))
  564. (add-before 'install 'create-directories
  565. ;; Ensure directories exist before installing files.
  566. (lambda* (#:key outputs #:allow-other-keys)
  567. (let ((out (assoc-ref outputs "out")))
  568. (for-each (lambda (d) (mkdir-p (string-append out d)))
  569. '("/bin" "/share/man/man1" "/share/qe"))
  570. #t)))
  571. (add-after 'install 'install-extra-documentation
  572. ;; Install sample configuration file, Info, and HTML manual.
  573. (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
  574. (let* ((share (string-append (assoc-ref outputs "out") "/share"))
  575. (doc (string-append share "/doc/" ,name "-" ,version))
  576. (html (string-append share "/html"))
  577. (info (string-append share "/info"))
  578. (makeinfo (string-append
  579. (assoc-ref (or native-inputs inputs) "texinfo")
  580. "/bin/makeinfo")))
  581. ;; First fix Texinfo documentation, create appropriate
  582. ;; directories, then generate Info and HTML files there.
  583. (substitute* "qe-doc.texi"
  584. (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
  585. (for-each (lambda (d) (mkdir-p d)) (list html info))
  586. (invoke makeinfo "qe-doc.texi" "-o" info)
  587. (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
  588. ;; Install sample configuration file.
  589. (install-file "config.eg" doc)
  590. #t))))))
  591. (native-inputs
  592. `(("texinfo" ,texinfo)))
  593. (inputs
  594. `(("libx11" ,libx11)
  595. ("libxext" ,libxext)
  596. ("libxv" ,libxv)))
  597. (home-page "https://bellard.org/qemacs/")
  598. (synopsis "Small but powerful text editor")
  599. (description "QEmacs (for Quick Emacs) is a very small but
  600. powerful editor. It has features that even big editors lack:
  601. @itemize
  602. @item Full screen editor with an Emacs look and feel with all Emacs
  603. common features: multi-buffer, multi-window, command mode, universal
  604. argument, keyboard macros, config file with C-like syntax, minibuffer
  605. with completion and history.
  606. @item Can edit files of hundreds of Megabytes without being slow by
  607. using a highly optimized internal representation and by mmaping the
  608. file.
  609. @item Full Unicode support, including multi charset handling (8859-x,
  610. UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
  611. Unicode bidi algorithm. Arabic and Indic scripts handling (in
  612. progress).
  613. @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
  614. Lynx like rendering on VT100 terminals.
  615. @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
  616. @item C mode: coloring with immediate update. Emacs like auto-indent.
  617. @item Shell mode: colorized VT100 emulation so that your shell work
  618. exactly as you expect. Compile mode with next/prev error.
  619. @item Input methods for most languages, including Chinese (input
  620. methods come from the Yudit editor).
  621. @item Hexadecimal editing mode with insertion and block commands.
  622. Unicode hexa editing is also supported.
  623. @item Works on any VT100 terminals without termcap. UTF8 VT100
  624. support included with double width glyphs.
  625. @item X11 support. Support multiple proportional fonts at the same
  626. time (as XEmacs). X Input methods supported. Xft extension supported
  627. for anti aliased font display.
  628. @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
  629. and all charsets): 200KB big. Basic version (without bidir/unicode
  630. scripts/input/X11/C/Shell/HTML/Dired): 49KB.
  631. @end itemize")
  632. (license license:lgpl2.1+)))
  633. (define-public ghostwriter
  634. (package
  635. (name "ghostwriter")
  636. (version "2.0.2")
  637. (source (origin
  638. (method git-fetch)
  639. (uri (git-reference
  640. (url "https://github.com/wereturtle/ghostwriter")
  641. (commit version)))
  642. (file-name (git-file-name name version))
  643. (sha256
  644. (base32
  645. "19cf55b86yj2b5hdazbyw4iyp6xq155243aiyg4m0vhwh0h79nwh"))))
  646. (build-system gnu-build-system)
  647. (native-inputs
  648. `(("pkg-config" ,pkg-config)
  649. ("qttools" ,qttools))) ; for lrelease
  650. (inputs
  651. `(("hunspell" ,hunspell)
  652. ("qtbase" ,qtbase-5)
  653. ("qtdeclarative" ,qtdeclarative)
  654. ("qtmultimedia" ,qtmultimedia)
  655. ("qtquickcontrols" ,qtquickcontrols)
  656. ("qtsvg" ,qtsvg)
  657. ("qtwebchannel" ,qtwebchannel)))
  658. (propagated-inputs ; To get native-search-path
  659. `(("qtwebengine" ,qtwebengine)))
  660. (arguments
  661. `(#:phases
  662. (modify-phases %standard-phases
  663. (replace 'configure
  664. (lambda* (#:key outputs #:allow-other-keys)
  665. (let ((out (assoc-ref outputs "out")))
  666. (invoke "qmake" (string-append "PREFIX=" out)))))
  667. (add-after 'configure 'create-translations
  668. (lambda _
  669. ;; `lrelease` will not overwrite, so delete existing .qm files
  670. (for-each delete-file (find-files "translations" ".*\\.qm"))
  671. (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
  672. ;; Ensure that icons are found at runtime.
  673. (add-after 'install 'wrap-executable
  674. (lambda* (#:key inputs outputs #:allow-other-keys)
  675. (let ((out (assoc-ref outputs "out")))
  676. (wrap-program (string-append out "/bin/ghostwriter")
  677. `("QT_PLUGIN_PATH" ":" prefix
  678. ,(map (lambda (label)
  679. (string-append (assoc-ref inputs label)
  680. "/lib/qt5/plugins/"))
  681. '("qtsvg" "qtmultimedia"))))))))))
  682. (home-page "https://wereturtle.github.io/ghostwriter/")
  683. (synopsis "Write without distractions")
  684. (description
  685. "@code{ghostwriter} provides a relaxing, distraction-free writing
  686. environment with Markdown markup.")
  687. (license license:gpl3+))) ; icons/* under CC-BY-SA3
  688. (define-public manuskript
  689. (package
  690. (name "manuskript")
  691. (version "0.12.0")
  692. (source
  693. (origin
  694. (method git-fetch)
  695. (uri (git-reference
  696. (url "https://github.com/olivierkes/manuskript")
  697. (commit version)))
  698. (file-name (git-file-name name version))
  699. (sha256
  700. (base32 "0gfwwnpjslb0g8y3v9ha4sd8in6bpy6bhi4rn4hmfd2vmq2flpbd"))))
  701. (build-system python-build-system)
  702. (arguments
  703. `(#:tests? #f ;no test
  704. #:phases
  705. (modify-phases %standard-phases
  706. (delete 'configure)
  707. (delete 'build)
  708. (replace 'install
  709. (lambda* (#:key outputs #:allow-other-keys)
  710. (let* ((out (assoc-ref outputs "out"))
  711. (share (string-append out "/share/manuskript")))
  712. ;; Install data.
  713. (mkdir-p share)
  714. (for-each
  715. (lambda (d)
  716. (let ((destination (string-append share "/" d)))
  717. (mkdir-p destination)
  718. (copy-recursively d destination)))
  719. '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
  720. ;; Install documentation.
  721. (let ((doc (string-append out
  722. "/doc/manuskript-" ,version
  723. "/sample-projects")))
  724. (mkdir-p doc)
  725. (copy-recursively "sample-projects" doc))
  726. ;; Wrap executable in "$out/share/manuskript/bin" and
  727. ;; link to it from "$out/bin".
  728. (let ((bin (string-append out "/bin"))
  729. (executable (string-append share "/bin/manuskript")))
  730. (wrap-program executable
  731. (list "GUIX_PYTHONPATH" 'prefix
  732. (list (getenv "GUIX_PYTHONPATH"))))
  733. (mkdir-p bin)
  734. (with-directory-excursion bin
  735. (symlink (string-append share "/bin/manuskript")
  736. "manuskript")))
  737. ;; Install icons and create .desktop file.
  738. (let ((apps (string-append out "/share/applications"))
  739. (icons-dir (string-append out "/share/pixmaps")))
  740. (install-file "icons/Manuskript/manuskript.svg" icons-dir)
  741. (mkdir-p apps)
  742. (make-desktop-entry-file (string-append apps "/manuskript.desktop")
  743. #:name "Manuskript"
  744. #:mime-type "application/x-manuskript-book;"
  745. #:exec (string-append out "/bin/manuskript %f")
  746. #:comment '((#f "Tool for writers")
  747. ("es" "Herramienta para escritores/as"))
  748. #:keywords "manuskript;office;write;edit;novel;text;msk"
  749. #:terminal #f
  750. #:type "Application"
  751. #:icon "manuskript"
  752. #:categories "Office;WordProcessor;"))
  753. #t))))))
  754. (inputs
  755. `(("pandoc" ,pandoc)
  756. ("python-lxml" ,python-lxml)
  757. ("python-markdown" ,python-markdown)
  758. ("python-pyqt" ,python-pyqt)
  759. ("qtsvg" ,qtsvg)))
  760. (home-page "http://www.theologeek.ch/manuskript/")
  761. (synopsis "Tool for writers")
  762. (description "Manuskript provides a rich environment to help
  763. writers create their first draft and then further refine and edit
  764. their masterpiece. With Manuskript you can:
  765. @itemize
  766. @item Grow your premise from one sentence, to a paragraph, to a full
  767. summary,
  768. @item Create characters,
  769. @item Conceive plots,
  770. @item Construct outlines (Outline mode and/or Index cards),
  771. @item Write with focus (Distraction free mode),
  772. @item Build worlds,
  773. @item Track items,
  774. @item Edit and re-organize chapters and scenes,
  775. @item View Story line,
  776. @item Compose with fiction or non-fiction templates and writing modes,
  777. @item Import and export document formats such as HTML, ePub,
  778. OpenDocument, DocX, and more.
  779. @end itemize
  780. Additionally Manuskript can help in many more ways with a spell
  781. checker, markdown highlighter, frequency analyzer, and automatic save
  782. in plain text file format.")
  783. (license license:gpl3+)))
  784. (define-public editorconfig-core-c
  785. (package
  786. (name "editorconfig-core-c")
  787. (version "0.12.5")
  788. (source
  789. (origin
  790. (method git-fetch)
  791. (uri (git-reference
  792. (url "https://github.com/editorconfig/editorconfig-core-c")
  793. (commit (string-append "v" version))))
  794. (file-name (git-file-name name version))
  795. (sha256
  796. (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg"))))
  797. (build-system cmake-build-system)
  798. (arguments
  799. '(#:phases
  800. (modify-phases %standard-phases
  801. (add-after 'unpack 'insert-tests
  802. (lambda* (#:key inputs #:allow-other-keys)
  803. (let ((tests (assoc-ref inputs "tests")))
  804. (copy-recursively tests "tests"))
  805. #t))
  806. (add-after 'install 'delete-static-library
  807. (lambda* (#:key outputs #:allow-other-keys)
  808. (let* ((out (assoc-ref outputs "out"))
  809. (lib (string-append out "/lib")))
  810. (with-directory-excursion lib
  811. (delete-file "libeditorconfig_static.a"))
  812. #t))))))
  813. (native-inputs
  814. `(("tests"
  815. ,(origin
  816. (method git-fetch)
  817. (uri (git-reference
  818. (url "https://github.com/editorconfig/editorconfig-core-test")
  819. ;; The tests submodule commit matching this package's version.
  820. (commit "48610d43b7455af12195473377f93c4ceea654f5")))
  821. (file-name (git-file-name "editorconfig-core-test" version))
  822. (sha256
  823. (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
  824. (inputs
  825. `(("pcre2" ,pcre2)))
  826. (home-page "https://editorconfig.org/")
  827. (synopsis "EditorConfig core library written in C")
  828. (description "EditorConfig makes it easy to maintain the correct coding
  829. style when switching between different text editors and between different
  830. projects. The EditorConfig project maintains a file format and plugins for
  831. various text editors which allow this file format to be read and used by those
  832. editors.")
  833. (license license:bsd-2)))
  834. (define-public texmacs
  835. (package
  836. (name "texmacs")
  837. (version "2.1")
  838. (source
  839. (origin
  840. (method url-fetch)
  841. (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
  842. "source/TeXmacs-" version "-src.tar.gz"))
  843. (sha256
  844. (base32 "1gl6k1bwrk1y7hjyl4xvlqvmk5crl4jvsk8wrfp7ynbdin6n2i48"))))
  845. (build-system gnu-build-system)
  846. (native-inputs
  847. `(("pkg-config" ,pkg-config)
  848. ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
  849. (inputs
  850. `(("freetype" ,freetype)
  851. ("guile" ,guile-1.8)
  852. ("perl" ,perl)
  853. ("python" ,python-wrapper)
  854. ("qt" ,qtbase-5)
  855. ("qtsvg" ,qtsvg)))
  856. (arguments
  857. `(#:tests? #f ; no check target
  858. #:phases
  859. (modify-phases %standard-phases
  860. (add-after 'unpack 'fix-icon-directory
  861. (lambda* (#:key outputs #:allow-other-keys)
  862. (let ((out (assoc-ref outputs "out")))
  863. (substitute* "packages/linux/icons.sh"
  864. (("/usr/share")
  865. (string-append out "/share"))))))
  866. (add-after 'install 'install-desktop-file
  867. (lambda* (#:key outputs #:allow-other-keys)
  868. ;; Install desktop file.
  869. (let* ((out (assoc-ref outputs "out"))
  870. (apps (string-append out "/share/applications"))
  871. (source "TeXmacs/misc/mime/texmacs.desktop"))
  872. (install-file source apps))))
  873. (add-before 'configure 'gzip-flags
  874. (lambda _
  875. (substitute* "Makefile.in"
  876. (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
  877. (synopsis "Editing platform with special features for scientists")
  878. (description
  879. "GNU TeXmacs is a text editing platform which is specialized for
  880. scientists. It is ideal for editing structured documents with different types
  881. of content. It has robust support for mathematical formulas and plots. It
  882. can also act as an interface to external mathematical programs such as R and
  883. Octave. TeXmacs is completely extensible via Guile.")
  884. (license license:gpl3+)
  885. (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
  886. (define-public scintilla
  887. (package
  888. (name "scintilla")
  889. (version "5.1.1")
  890. (source
  891. (origin
  892. (method url-fetch)
  893. (uri (let ((v (apply string-append (string-split version #\.))))
  894. (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
  895. (sha256
  896. (base32 "1d0yjx2wlx4fj5bccxdgfmrr7nzazkw4m08i6h4c0a54sb484yif"))))
  897. (build-system gnu-build-system)
  898. (arguments
  899. `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
  900. #:tests? #f ;require un-packaged Pyside
  901. #:phases
  902. (modify-phases %standard-phases
  903. (delete 'configure) ;no configure script
  904. (replace 'install
  905. ;; Upstream provides no install script.
  906. (lambda* (#:key outputs #:allow-other-keys)
  907. (let* ((out (assoc-ref outputs "out"))
  908. (lib (string-append out "/lib"))
  909. (include (string-append out "/include")))
  910. (for-each (lambda (f) (install-file f lib))
  911. (find-files "bin/" "\\.so$"))
  912. (for-each (lambda (f) (install-file f include))
  913. (find-files "include/" "."))))))))
  914. (native-inputs
  915. `(("gcc" ,gcc-9) ;Code has C++17 requirements
  916. ("pkg-config" ,pkg-config)
  917. ("python" ,python-wrapper)))
  918. (inputs
  919. `(("gtk+" ,gtk+)))
  920. (home-page "https://www.scintilla.org/")
  921. (synopsis "Code editor for GTK+")
  922. (description "Scintilla is a source code editing component for
  923. GTK+. It has the usual features found in text editing components, as
  924. well as some that are especially useful for editing and debugging
  925. source code; these include support for syntax styling, error
  926. indicators, code completion and call tips. Styling choices are more
  927. open than with many editors: Scintilla lets you use proportional
  928. fonts, bold and italics, multiple foreground and background colours,
  929. and multiple fonts.")
  930. (license license:hpnd)))
  931. (define-public geany
  932. (package
  933. (name "geany")
  934. (version "1.37.1")
  935. (source
  936. (origin
  937. (method url-fetch)
  938. (uri (string-append "https://download.geany.org/"
  939. "geany-" version ".tar.bz2"))
  940. (sha256
  941. (base32 "060sachn33xpx3a609f09y97qq5ky17gvv686zbvrn618ij7bi8q"))))
  942. (build-system gnu-build-system)
  943. (native-inputs
  944. `(("autoconf" ,autoconf)
  945. ("automake" ,automake)
  946. ("doxygen" ,doxygen)
  947. ("glib" ,glib "bin")
  948. ("intltool" ,intltool)
  949. ("libtool" ,libtool)
  950. ("pkg-config" ,pkg-config)
  951. ("python-docutils" ,python-docutils))) ;for rst2html
  952. (inputs
  953. `(("gtk+" ,gtk+)
  954. ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
  955. ;; currently possible to replace it with our Scintilla package.
  956. ;; ("scintilla" ,scintilla)
  957. ))
  958. (arguments
  959. `(#:imported-modules ((guix build glib-or-gtk-build-system)
  960. ,@%gnu-build-system-modules)
  961. #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
  962. (guix build gnu-build-system)
  963. (guix build utils))
  964. #:phases
  965. (modify-phases %standard-phases
  966. (add-after 'install 'glib-or-gtk-wrap
  967. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
  968. (home-page "https://www.geany.org")
  969. (synopsis "Fast and lightweight IDE")
  970. (description "Geany is a small and fast Integrated Development
  971. Environment (IDE) that only has a few dependencies on other packages and is as
  972. independent as possible from special desktop environments like KDE or GNOME.
  973. The basic features of Geany are:
  974. @itemize
  975. @item syntax highlighting
  976. @item code completion
  977. @item auto completion of often constructed constructs like if, for and while
  978. @item auto completion of XML and HTML tags
  979. @item call tips
  980. @item folding
  981. @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
  982. @item symbol lists
  983. @item embedded terminal emulation
  984. @item extensibility through plugins
  985. @end itemize")
  986. (license license:gpl2+)))
  987. (define-public fe
  988. (package
  989. (name "fe")
  990. ;; Stable release is 1.9. However, this development version
  991. ;; introduces support for UTF-8.
  992. (version "2.0")
  993. (source (origin
  994. (method url-fetch)
  995. (uri (string-append "http://www.moria.de/~michael/fe/"
  996. "fe-" version ".tar.gz"))
  997. (sha256
  998. (base32
  999. "10mk5wc3dsdp46b3hkjyd740gcdv6m1gvlr3p8xjxf55b3vfs0la"))))
  1000. (build-system gnu-build-system)
  1001. (arguments
  1002. `(#:tests? #f ;no test
  1003. ;; Sendmail is only used to send a crash log. Disable the
  1004. ;; feature since it is (1) undocumented (2) not very useful.
  1005. #:configure-flags (list "--disable-sendmail")
  1006. #:phases
  1007. (modify-phases %standard-phases
  1008. (add-after 'install 'install-doc
  1009. (lambda* (#:key outputs #:allow-other-keys)
  1010. (let* ((out (assoc-ref outputs "out"))
  1011. (doc (string-append out "/share/doc/" ,name "-" ,version)))
  1012. (for-each (lambda (f) (install-file f doc))
  1013. '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
  1014. #t))))))
  1015. (native-inputs
  1016. `(("gettext" ,gettext-minimal)))
  1017. (inputs
  1018. `(("ncurses" ,ncurses)))
  1019. (home-page "http://www.moria.de/~michael/fe/")
  1020. (synopsis "Small folding editor")
  1021. (description "Fe is a small folding editor. It folds
  1022. arbitrary text regions; it is not bound to syntactic units.
  1023. Fe has no configuration or extension language and requires no setup.
  1024. Its user interface is emacs-like and it has menus for the very most
  1025. important functions to help beginners. Further there is a reference
  1026. card. It offers:
  1027. @itemize
  1028. @item Regions and Emacs-like kill ring
  1029. @item Incremental search
  1030. @item Keyboard macros
  1031. @item Editing binary files
  1032. @item Multiple windows and views
  1033. @item Compose function for Latin 1 characters
  1034. @end itemize")
  1035. (license license:gpl2+)))
  1036. (define-public ne
  1037. (package
  1038. (name "ne")
  1039. (version "3.3.1")
  1040. (source (origin
  1041. (method git-fetch)
  1042. (uri (git-reference
  1043. (url "https://github.com/vigna/ne")
  1044. (commit version)))
  1045. (file-name (git-file-name name version))
  1046. (sha256
  1047. (base32
  1048. "0sg2f6lxq6cjkpd3dvlxxns82hvq826rjnams5in97pssmknr77g"))))
  1049. (build-system gnu-build-system)
  1050. (native-inputs
  1051. `(("perl" ,perl)
  1052. ("texinfo" ,texinfo)))
  1053. (inputs
  1054. `(("ncurses" ,ncurses)))
  1055. (arguments
  1056. `(#:tests? #f
  1057. #:make-flags
  1058. (list "CC=gcc"
  1059. (string-append "PREFIX=" (assoc-ref %outputs "out"))
  1060. (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
  1061. "/lib"))
  1062. #:phases
  1063. (modify-phases %standard-phases
  1064. (add-before 'configure 'patch-early-shebang
  1065. (lambda _
  1066. (substitute* "version.pl"
  1067. (("/usr/bin/env .*perl") (which "perl")))))
  1068. (replace 'configure
  1069. (lambda _
  1070. (substitute* "src/makefile"
  1071. (("-lcurses") "-lncurses")))))))
  1072. (home-page "https://ne.di.unimi.it/")
  1073. (synopsis "Text editor with menu bar")
  1074. (description "This package provides a modeless text editor with menu bar.
  1075. It supports syntax highlighting, regular expressions, configurable menus,
  1076. keybindings, autocomplete and unlimited undo. It can pipe a marked block
  1077. of text through any command line filter. It can also open very large binary
  1078. files. It was originally developed on the Amiga 3000T.")
  1079. (license license:gpl3+)))
  1080. (define-public hexer
  1081. (package
  1082. (name "hexer")
  1083. (version "1.0.6")
  1084. (source
  1085. (origin
  1086. (method url-fetch)
  1087. (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
  1088. "hexer-" version ".tar.xz"))
  1089. (sha256
  1090. (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
  1091. (build-system gnu-build-system)
  1092. (arguments
  1093. `(#:tests? #f ;no upstream tests
  1094. #:make-flags
  1095. (list "CC=gcc"
  1096. (string-append "PREFIX=" (assoc-ref %outputs "out"))
  1097. (string-append "LTERMCAP=-lncurses")
  1098. (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
  1099. "/lib"))
  1100. #:phases
  1101. (modify-phases %standard-phases
  1102. (delete 'configure)))) ;no configure script
  1103. (inputs
  1104. `(("ncurses" ,ncurses)))
  1105. (home-page "https://devel.ringlet.net/editors/hexer/")
  1106. (synopsis "Multi buffer editor for binary files with vi-like interface")
  1107. (description "Hexer is a multi-buffer editor for binary files for Unix-like
  1108. systems that displays its buffer(s) as a hex dump. The user interface is kept
  1109. similar to vi/ex.")
  1110. (license license:bsd-3)))
  1111. (define-public virtaal
  1112. (package
  1113. (name "virtaal")
  1114. (version "0.7.1")
  1115. (source (origin
  1116. (method url-fetch)
  1117. (uri (string-append "mirror://sourceforge/translate/Virtaal/"
  1118. version "/virtaal-" version ".tar.bz2"))
  1119. (sha256
  1120. (base32
  1121. "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
  1122. (build-system python-build-system)
  1123. (arguments
  1124. `(#:python ,python-2
  1125. #:use-setuptools? #f
  1126. #:tests? #f ;; Failing tests
  1127. #:phases
  1128. (modify-phases %standard-phases
  1129. (add-before 'build 'configure
  1130. (lambda* (#:key outputs #:allow-other-keys)
  1131. ;; Set data file path to absolute store path.
  1132. (substitute* "virtaal/common/pan_app.py"
  1133. (("file_discovery\\.get_abs_data_filename.*")
  1134. (string-append "os.path.join('"
  1135. (assoc-ref outputs "out")
  1136. "/share', *path_parts)"))))))))
  1137. (inputs
  1138. `(("python2-lxml" ,python2-lxml)
  1139. ("python2-pygtk" ,python2-pygtk)
  1140. ("python2-simplejson" ,python2-simplejson)
  1141. ("python2-translate-toolkit" ,python2-translate-toolkit)
  1142. ("python2-pycurl" ,python2-pycurl)))
  1143. (synopsis "Graphical translation tool")
  1144. (description "Virtaal is a powerful yet simple translation tool with an
  1145. uncluttered user interface. It supports a multitude of translation formats
  1146. provided by the Translate Toolkit, including XLIFF and PO.")
  1147. (home-page "https://virtaal.translatehouse.org/")
  1148. (license license:gpl2+)))