Patchwork Add libtermkey, vis and lua-lpeg packages

login
register
mail settings
Submitter jmi2k@openmailbox.org
Date Dec. 2, 2016, 11:04 p.m.
Message ID <61a19eb41fa4eb66339c14519f0bcefd@openmailbox.org>
Download mbox | patch
Permalink /patch/18149/
State New
Headers show

Comments

jmi2k@openmailbox.org - Dec. 2, 2016, 11:04 p.m.
On 2016-12-02 23:45, jmi2k@openmailbox.org wrote:
> Hello, I made a patch to add vis and its dependencies: libtermkey and
> lua-lpeg; to Guix. Some things have to be polished, but the packages
> work fine.
> 
> José Miguel Sánchez García
Sorry, I made a mistake. Here is the correct version.
Ludovic Courtès - Dec. 4, 2016, 9:24 p.m.
Hello, and welcome!

Thanks for sharing patches!  They are almost ready to be applied, I’ll
just point out a few issues.  You can look at
<https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html>
for more info.

jmi2k@openmailbox.org skribis:

> From 792a9ff128f397bcf9eac1f113e84ebe29f2eb2f Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?=
>  <jmi2k@openmailbox.org>
> Date: Fri, 2 Dec 2016 23:39:08 +0100
> Subject: [PATCH] Add vis, libtermkey and lua-lpeg packages

As noted in the page above, we use “GNU ChangeLog” style for commit
logs.  You can see examples in ‘git log’.

> ---
>  gnu/packages/libtermkey.scm | 36 ++++++++++++++++++++++++++++++++++++
>  gnu/packages/lua-lpeg.scm   | 33 +++++++++++++++++++++++++++++++++
>  gnu/packages/vis.scm        | 37 +++++++++++++++++++++++++++++++++++++

Please make one patch per package.

> +++ b/gnu/packages/libtermkey.scm
> @@ -0,0 +1,36 @@
> +(define-module (gnu packages libtermkey)

Could you add the license header (as in the other files) with a
copyright line for yourself?

> +    (description (string-append
> +      "Libtermkey handles all the necessary logic to recognise special keys, "
> +      "UTF-8 combining, and so on, with a simple interface."))

Please use a literal string instead of ‘string-append’.  That way the
description will be picked up for translation.

Also, if you haven’t done already, make sure to run ‘guix lint’ for
these packages.  It’s usually a good way to catch tiny issues.

Could you send updated patches?  If minor problems remain we can fix
them for you if you want.

Thank you!

Ludo’.

Patch

From 792a9ff128f397bcf9eac1f113e84ebe29f2eb2f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?=
 <jmi2k@openmailbox.org>
Date: Fri, 2 Dec 2016 23:39:08 +0100
Subject: [PATCH] Add vis, libtermkey and lua-lpeg packages

---
 gnu/packages/libtermkey.scm | 36 ++++++++++++++++++++++++++++++++++++
 gnu/packages/lua-lpeg.scm   | 33 +++++++++++++++++++++++++++++++++
 gnu/packages/vis.scm        | 37 +++++++++++++++++++++++++++++++++++++
 3 files changed, 106 insertions(+)
 create mode 100644 gnu/packages/libtermkey.scm
 create mode 100644 gnu/packages/lua-lpeg.scm
 create mode 100644 gnu/packages/vis.scm

diff --git a/gnu/packages/libtermkey.scm b/gnu/packages/libtermkey.scm
new file mode 100644
index 0000000..361dfa4
--- /dev/null
+++ b/gnu/packages/libtermkey.scm
@@ -0,0 +1,36 @@ 
+(define-module (gnu packages libtermkey)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix licenses)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pkg-config))
+
+(define-public libtermkey
+  (package
+    (name "libtermkey")
+    (version "0.18")
+    (source (origin
+              (method url-fetch)
+              (uri "http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.18.tar.gz")
+              (sha256
+                (base32 "09ir16kaarv55mnc4jn2sqnjjhzpb1aha51wpd9ayif887g4d5r3"))))
+    (build-system gnu-build-system)
+    (arguments '(
+      #:make-flags (list
+        "CC=gcc"
+        (string-append "PREFIX=" (assoc-ref %outputs "out")))
+      #:phases (modify-phases %standard-phases
+        (delete 'configure))
+      #:tests? #f))
+    (inputs `())
+    (native-inputs `(("libtool", libtool)
+                     ("ncurses", ncurses)
+                     ("pkg-config", pkg-config)))
+    (synopsis "Keyboard entry processing libary for terminal-based programs")
+    (description (string-append
+      "Libtermkey handles all the necessary logic to recognise special keys, "
+      "UTF-8 combining, and so on, with a simple interface."))
+    (home-page "http://www.leonerd.org.uk/code/libtermkey")
+    (license expat)))
diff --git a/gnu/packages/lua-lpeg.scm b/gnu/packages/lua-lpeg.scm
new file mode 100644
index 0000000..9eb2035
--- /dev/null
+++ b/gnu/packages/lua-lpeg.scm
@@ -0,0 +1,33 @@ 
+(define-module (gnu packages lua-lpeg)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix licenses)
+  #:use-module (gnu packages lua))
+
+(define-public lua-lpeg
+  (package
+    (name "lua-lpeg")
+    (version "1.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.0.tar.gz")
+              (sha256
+                (base32 "13mz18s359wlkwm9d9iqlyyrrwjc6iqfpa99ai0icam2b3khl68h"))))
+    (build-system gnu-build-system)
+    (arguments '(
+      #:make-flags '("LUADIR=/usr/include")
+      #:phases (modify-phases %standard-phases
+        (delete 'configure)
+        (replace 'install (lambda _
+          (let* ((out (assoc-ref %outputs "out")))
+            (install-file "lpeg.so" (string-append out "/usr/lib/lua/5.3"))
+            (install-file "re.lua" (string-append out "/usr/share/lua/5.3"))))))
+      #:tests? #f))
+    (inputs `(("lua", lua)))
+    (synopsis "Pattern-matching library for Lua")
+    (description (string-append
+      "LPeg is a pattern-matching library for Lua, based on Parsing Expression "
+      "Grammars (PEGs)."))
+    (home-page "http://www.inf.puc-rio.br/~roberto/lpeg")
+    (license expat)))
diff --git a/gnu/packages/vis.scm b/gnu/packages/vis.scm
new file mode 100644
index 0000000..aa80115
--- /dev/null
+++ b/gnu/packages/vis.scm
@@ -0,0 +1,37 @@ 
+(define-module (gnu packages vis)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix licenses)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages libtermkey)
+  #:use-module (gnu packages lua)
+  #:use-module (gnu packages lua-lpeg))
+
+(define-public vis
+  (package
+    (name "vis")
+    (version "0.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "git://github.com/martanne/vis.git")
+                     (commit "v0.2")))
+              (sha256
+                (base32 "05pxycrhx297hdwkgky00g9s78dqcaam3lhp3ba903ma605dn34f"))))
+    (build-system gnu-build-system)
+    (arguments '(
+      #:make-flags '("CFLAGS=-pie")
+      #:tests? #f))
+    (inputs `(("lua", lua)))
+    (native-inputs `(("ncurses", ncurses)
+                     ("libtermkey", libtermkey)
+                     ("lua-lpeg", lua-lpeg)))
+    (synopsis "Vim-like text editor")
+    (description (string-append
+      "Vis aims to e a modern, legacy free, simple yet efficient vim-like text "
+      "editor. It extends vim's modal editing with built-in support for "
+      "multiple cursors/selecctions and combines it with sam's structural "
+      "regular expression based command language."))
+    (home-page "https://github.com/martanne/vis")
+    (license isc)))
-- 
2.9.2