aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2016-12-30 02:15:59 +1100
committerMarius Bakke <mbakke@fastmail.com>2017-01-26 21:16:57 +0100
commit5613ea79fccc5a5befafea313cb81010c5f5a8dd (patch)
treedf28a4713f425ce4a97d596bc579e57903215ac1
parent5bbb224916b14131d5676980f3ab4992c4349455 (diff)
downloadpatches-5613ea79fccc5a5befafea313cb81010c5f5a8dd.tar
patches-5613ea79fccc5a5befafea313cb81010c5f5a8dd.tar.gz
gnu: Add kakoune.
* gnu/packages/text-editors.scm (kakoune): New variable. Signed-off-by: Marius Bakke <mbakke@fastmail.com>
-rw-r--r--gnu/packages/text-editors.scm73
1 files changed, 72 insertions, 1 deletions
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 4e2324dbea..3b61d538c4 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org>
+;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,13 +20,18 @@
(define-module (gnu packages text-editors)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
+ #:use-module (gnu packages boost)
+ #:use-module (gnu packages documentation)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages lua)
#:use-module (gnu packages ncurses)
- #:use-module (gnu packages terminals))
+ #:use-module (gnu packages ruby)
+ #:use-module (gnu packages xml))
(define-public vis
(package
@@ -75,3 +81,68 @@ based command language.")
(license (list license:isc ; Main distribution.
license:public-domain ; map.[ch]
license:expat)))) ; lexers and libutf.[ch]
+
+(define-public kakoune
+ (let ((commit "125c8b7e80995732e0d8c87b82040025748f1b4f")
+ (revision "1"))
+ (package
+ (name "kakoune")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source
+ (origin
+ (file-name (string-append "kakoune-" version "-checkout"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mawww/kakoune.git")
+ (commit commit)))
+ (sha256
+ (base32
+ "19qs99l8r9p1vi5pxxx9an22fvi7xx40qw3jh2cnh2mbacawvdyb"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ ;; Boost is compiled with the older ABI, so we can't use
+ ;; the new ABI if we want to link againt it.
+ "CPPFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda _
+ ;; kakoune uses confstr with _CS_PATH to find out where to find
+ ;; a posix shell, but this doesn't work in the build
+ ;; environment. This substitution just replaces that result
+ ;; with the "sh" path.
+ (substitute* "src/shell_manager.cc"
+ (("if \\(m_shell.empty\\(\\)\\)" line)
+ (string-append "m_shell = \"" (which "sh")
+ "\";\n " line)))
+ ;; Kakoune uses 'gzip' to compress its manpages. Make sure
+ ;; timestamps are not preserved for reproducibility.
+ (substitute* "src/Makefile"
+ (("gzip -f") "gzip -f --no-name"))
+ #t))
+ (delete 'configure)
+ ;; kakoune requires us to be in the src/ directory to build
+ (add-before 'build 'chdir
+ (lambda _ (chdir "src") #t))
+ (add-before 'check 'fix-test-permissions
+ (lambda _
+ ;; Out git downloader doesn't give us write permissions, but
+ ;; without them the tests fail.
+ (zero? (system* "chmod" "-R" "u+w" "../test")))))))
+ (native-inputs `(("gcc" ,gcc-5)
+ ("libxslt" ,libxslt)
+ ("asciidoc" ,asciidoc)
+ ("ruby" ,ruby)))
+ (inputs `(("gcc:lib" ,gcc-5 "lib")
+ ("ncurses" ,ncurses)
+ ("boost" ,boost)))
+ (synopsis "Vim-inspired code editor")
+ (description
+ "Kakoune is a code editor heavily inspired by Vim, as such most of its
+commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
+editing language\" model. Kakoune has a strong focus on interactivity, most
+commands provide immediate and incremental results, while still being
+competitive (as in keystroke count) with Vim.")
+ (home-page "http://kakoune.org/")
+ (license license:unlicense))))