all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 1/6] gnu: Add libmpack.
@ 2017-01-24 14:40 Ricardo Wurmus
  2017-01-24 14:40 ` [PATCH 2/6] gnu: Add lua-libmpack Ricardo Wurmus
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Ricardo Wurmus @ 2017-01-24 14:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/serialization.scm (libmpack): New variable.
---
 gnu/packages/serialization.scm | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 8db81c581..ab794ef80 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
@@ -129,6 +129,34 @@ such as compact binary encodings, XML, or JSON.")
 serialization.")
     (license license:boost1.0)))
 
+(define-public libmpack
+  (package
+    (name "libmpack")
+    (version "1.0.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/tarruda/libmpack/"
+                                  "archive/" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32 "08kfdl55yf66xk57aqsbf8n45f2jsw2v7qwnaan08ciim77j3sv5"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:test-target "test"
+       #:make-flags
+       (list "CC=gcc"
+             (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (native-inputs
+     `(("libtool" ,libtool)))
+    (home-page "https://github.com/tarruda/libmpack")
+    (synopsis "Small binary serialization library")
+    (description "Libmpack is a small binary serialization and RPC library
+that implements both the msgpack and msgpack-rpc specifications.")
+    (license license:expat)))
+
 (define-public yaml-cpp
   (package
     (name "yaml-cpp")
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/6] gnu: Add lua-libmpack.
  2017-01-24 14:40 [PATCH 1/6] gnu: Add libmpack Ricardo Wurmus
@ 2017-01-24 14:40 ` Ricardo Wurmus
  2017-01-24 18:51   ` Leo Famulari
  2017-01-24 14:40 ` [PATCH 3/6] gnu: Add lua5.2-libmpack Ricardo Wurmus
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Ricardo Wurmus @ 2017-01-24 14:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/serialization.scm (lua-libmpack): New variable.
---
 gnu/packages/serialization.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index ab794ef80..d59ded313 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -24,6 +24,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix utils)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
@@ -32,6 +33,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages lua)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python))
 
@@ -157,6 +159,40 @@ serialization.")
 that implements both the msgpack and msgpack-rpc specifications.")
     (license license:expat)))
 
+(define-public lua-libmpack
+  (package (inherit libmpack)
+    (name "lua-libmpack")
+    (build-system gnu-build-system)
+    (arguments
+     `(;; FIXME: tests require "busted", which is not yet available in Guix.
+       #:tests? #f
+       #:test-target "test"
+       #:make-flags
+       (let* ((lua-version ,(package-version lua))
+              (lua-major+minor ,(version-major+minor (package-version lua))))
+         (list "CC=gcc"
+               "USE_SYSTEM_LUA=yes"
+               (string-append "LUA_VERSION=" lua-version)
+               (string-append "LUA_VERSION_MAJ_MIN=" lua-major+minor)
+               (string-append "PREFIX="
+                              (assoc-ref %outputs "out"))
+               (string-append "LUA_CMOD_INSTALLDIR="
+                              (assoc-ref %outputs "out")
+                              "/lib/lua/" lua-major+minor)
+               ;; This is unnecessary as of upstream commit 02886c13ff8a2,
+               ;; which is not part of the current release.
+               "CFLAGS=-DLUA_C89_NUMBERS -fPIC"))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'chdir
+           (lambda _ (chdir "binding/lua") #t)))))
+    (inputs
+     `(("lua" ,lua)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (synopsis "Lua bindings for the libmpack binary serialization library")))
+
 (define-public yaml-cpp
   (package
     (name "yaml-cpp")
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/6] gnu: Add lua5.2-libmpack.
  2017-01-24 14:40 [PATCH 1/6] gnu: Add libmpack Ricardo Wurmus
  2017-01-24 14:40 ` [PATCH 2/6] gnu: Add lua-libmpack Ricardo Wurmus
@ 2017-01-24 14:40 ` Ricardo Wurmus
  2017-01-24 14:40 ` [PATCH 4/6] gnu: Add lua5.2-bitop Ricardo Wurmus
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Ricardo Wurmus @ 2017-01-24 14:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/serialization.scm (lua5.2-libmpack): New variable.
---
 gnu/packages/serialization.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index d59ded313..9e073b7a9 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -193,6 +193,26 @@ that implements both the msgpack and msgpack-rpc specifications.")
      `(("pkg-config" ,pkg-config)))
     (synopsis "Lua bindings for the libmpack binary serialization library")))
 
+(define-public lua5.2-libmpack
+  (package (inherit lua-libmpack)
+    (name "lua5.2-libmpack")
+    (arguments
+     (substitute-keyword-arguments (package-arguments lua-libmpack)
+       ((#:make-flags flags)
+        `(let* ((lua-version ,(package-version lua-5.2))
+                (lua-major+minor ,(version-major+minor (package-version lua-5.2))))
+           (list "CC=gcc"
+                 "USE_SYSTEM_LUA=yes"
+                 (string-append "LUA_VERSION=" lua-version)
+                 (string-append "LUA_VERSION_MAJ_MIN=" lua-major+minor)
+                 (string-append "PREFIX="
+                                (assoc-ref %outputs "out"))
+                 (string-append "LUA_CMOD_INSTALLDIR="
+                                (assoc-ref %outputs "out")
+                                "/lib/lua/" lua-major+minor))))))
+    (inputs
+     `(("lua" ,lua-5.2)))))
+
 (define-public yaml-cpp
   (package
     (name "yaml-cpp")
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/6] gnu: Add lua5.2-bitop.
  2017-01-24 14:40 [PATCH 1/6] gnu: Add libmpack Ricardo Wurmus
  2017-01-24 14:40 ` [PATCH 2/6] gnu: Add lua-libmpack Ricardo Wurmus
  2017-01-24 14:40 ` [PATCH 3/6] gnu: Add lua5.2-libmpack Ricardo Wurmus
@ 2017-01-24 14:40 ` Ricardo Wurmus
  2017-01-24 18:52   ` Leo Famulari
  2017-01-24 14:40 ` [PATCH 5/6] gnu: Add lua5.2-lpeg Ricardo Wurmus
  2017-01-24 14:40 ` [PATCH 6/6] gnu: Add neovim Ricardo Wurmus
  4 siblings, 1 reply; 14+ messages in thread
From: Ricardo Wurmus @ 2017-01-24 14:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/lua.scm (lua5.2-bitop): New variable.
---
 gnu/packages/lua.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 721eceddf..28f66a596 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -401,3 +401,36 @@ Notable examples are GTK+, GStreamer and Webkit.")
 Grammars (PEGs).")
     (home-page "http://www.inf.puc-rio.br/~roberto/lpeg")
     (license license:expat)))
+
+;; Lua 5.3 is not supported.
+(define-public lua5.2-bitop
+  (package
+    (name "lua5.2-bitop")
+    (version "1.0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://bitop.luajit.org/download/"
+                                  "LuaBitOp-" version ".tar.gz"))
+              (sha256
+               (base32
+                "16fffbrgfcw40kskh2bn9q7m3gajffwd2f35rafynlnd7llwj1qj"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:test-target "test"
+       #:make-flags
+       (list "INSTALL=install -pD"
+             (string-append "INSTALLPATH=printf "
+                            (assoc-ref %outputs "out")
+                            "/lib/lua/"
+                            ,(version-major+minor (package-version lua-5.2))
+                            "/bit/bit.so"))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (inputs `(("lua", lua-5.2)))
+    (home-page "http://bitop.luajit.org/index.html")
+    (synopsis "Bitwise operations on numbers for Lua")
+    (description
+     "Lua BitOp is a C extension module for Lua which adds bitwise operations
+on numbers.")
+    (license license:expat)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 5/6] gnu: Add lua5.2-lpeg.
  2017-01-24 14:40 [PATCH 1/6] gnu: Add libmpack Ricardo Wurmus
                   ` (2 preceding siblings ...)
  2017-01-24 14:40 ` [PATCH 4/6] gnu: Add lua5.2-bitop Ricardo Wurmus
@ 2017-01-24 14:40 ` Ricardo Wurmus
  2017-01-26 18:01   ` Ludovic Courtès
  2017-01-24 14:40 ` [PATCH 6/6] gnu: Add neovim Ricardo Wurmus
  4 siblings, 1 reply; 14+ messages in thread
From: Ricardo Wurmus @ 2017-01-24 14:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/lua.scm (lua5.2-lpeg): New variable.
---
 gnu/packages/lua.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 28f66a596..d0220a3b6 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -402,6 +402,26 @@ Grammars (PEGs).")
     (home-page "http://www.inf.puc-rio.br/~roberto/lpeg")
     (license license:expat)))
 
+(define-public lua5.2-lpeg
+  (package (inherit lua-lpeg)
+    (name "lua5.2-lpeg")
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         ;; `make install` isn't available, so we have to do it manually
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (lua-version ,(version-major+minor (package-version lua-5.2))))
+               (install-file "lpeg.so"
+                             (string-append out "/lib/lua/" lua-version))
+               (install-file "re.lua"
+                             (string-append out "/share/lua/" lua-version))
+               #t))))
+       #:test-target "test"))
+    (inputs `(("lua", lua-5.2)))))
+
 ;; Lua 5.3 is not supported.
 (define-public lua5.2-bitop
   (package
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 6/6] gnu: Add neovim.
  2017-01-24 14:40 [PATCH 1/6] gnu: Add libmpack Ricardo Wurmus
                   ` (3 preceding siblings ...)
  2017-01-24 14:40 ` [PATCH 5/6] gnu: Add lua5.2-lpeg Ricardo Wurmus
@ 2017-01-24 14:40 ` Ricardo Wurmus
  2017-01-24 21:31   ` Ludovic Courtès
  4 siblings, 1 reply; 14+ messages in thread
From: Ricardo Wurmus @ 2017-01-24 14:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/vim.scm (neovim): New variable.
---
 gnu/packages/vim.scm | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index c2c0ccad9..e9aafa16d 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,18 +23,23 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages acl)
   #:use-module (gnu packages admin) ; For GNU hostname
   #:use-module (gnu packages attr)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages jemalloc)
+  #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages ncurses)
@@ -41,8 +47,10 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages ruby)
+  #:use-module (gnu packages serialization)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages terminals)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg))
 
@@ -149,6 +157,78 @@ configuration files.")
        ("tcl" ,tcl)
        ,@(package-inputs vim)))))
 
+(define-public neovim
+  (package
+    (name "neovim")
+    (version "0.1.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/neovim/neovim/"
+                           "archive/v" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0zjbpc4rhv5bcr353xqnbrc36zjvn7qvh8xf6s7n1bdi3788by6q"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:modules ((srfi srfi-26)
+                  (guix build cmake-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'set-lua-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((lua-version "5.2")
+                    (lua-cpath-spec
+                     (lambda (prefix)
+                       (let ((path (string-append prefix "/lib/lua/" lua-version)))
+                         (string-append path "/?.so;" path "/?/?.so"))))
+                    (lua-path-spec
+                     (lambda (prefix)
+                       (let ((path (string-append prefix "/share/lua/" lua-version)))
+                         (string-append path "/?.lua;" path "/?/?.lua"))))
+                    (lua-inputs (map (cute assoc-ref %build-inputs <>)
+                                     '("lua"
+                                       "lua-lpeg"
+                                       "lua-bitop"
+                                       "lua-libmpack"))))
+               (setenv "LUA_PATH"
+                       (string-join (map lua-path-spec lua-inputs) ";"))
+               (setenv "LUA_CPATH"
+                       (string-join (map lua-cpath-spec lua-inputs) ";"))
+               #t))))))
+    (inputs
+     `(("libuv" ,libuv)
+       ("gettext" ,gettext-minimal)
+       ("gperf" ,gperf)
+       ("msgpack" ,msgpack)
+       ("libtermkey" ,libtermkey)
+       ("libvterm" ,libvterm)
+       ("unibilium" ,unibilium)
+       ("jemalloc" ,jemalloc)
+       ("libiconv" ,libiconv)
+       ("lua" ,lua-5.2)
+       ("lua-lpeg" ,lua5.2-lpeg)
+       ("lua-bitop" ,lua5.2-bitop)
+       ("lua-libmpack" ,lua5.2-libmpack)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://neovim.io")
+    (synopsis "Fork of vim focused on extensibility and agility")
+    (description "Neovim is a project that seeks to aggressively
+refactor Vim in order to:
+
+@itemize
+@item Simplify maintenance and encourage contributions
+@item Split the work between multiple developers
+@item Enable advanced external UIs without modifications to the core
+@item Improve extensibility with a new plugin architecture
+@end itemize\n")
+    ;; Neovim is licensed under the terms of the Apache 2.0 license,
+    ;; except for parts that were contributed under the Vim license.
+    (license (list license:asl2.0 license:vim))))
+
 (define-public vifm
   (package
     (name "vifm")
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/6] gnu: Add lua-libmpack.
  2017-01-24 14:40 ` [PATCH 2/6] gnu: Add lua-libmpack Ricardo Wurmus
@ 2017-01-24 18:51   ` Leo Famulari
  2017-01-25  9:18     ` Ricardo Wurmus
  0 siblings, 1 reply; 14+ messages in thread
From: Leo Famulari @ 2017-01-24 18:51 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Tue, Jan 24, 2017 at 03:40:11PM +0100, Ricardo Wurmus wrote:
> * gnu/packages/serialization.scm (lua-libmpack): New variable.

> +               "USE_SYSTEM_LUA=yes"

It doesn't bundle Lua, right? I couldn't find a bundled copy in the
source tarball, so I'm just asking in case I missed something obvious.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/6] gnu: Add lua5.2-bitop.
  2017-01-24 14:40 ` [PATCH 4/6] gnu: Add lua5.2-bitop Ricardo Wurmus
@ 2017-01-24 18:52   ` Leo Famulari
  2017-01-25  9:17     ` Ricardo Wurmus
  0 siblings, 1 reply; 14+ messages in thread
From: Leo Famulari @ 2017-01-24 18:52 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Tue, Jan 24, 2017 at 03:40:13PM +0100, Ricardo Wurmus wrote:
> * gnu/packages/lua.scm (lua5.2-bitop): New variable.

> +    (arguments
> +     `(#:test-target "test"
> +       #:make-flags
> +       (list "INSTALL=install -pD"
> +             (string-append "INSTALLPATH=printf "

What's up with this "printf"? Does it actually execute the value of
INSTALLPATH?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/6] gnu: Add neovim.
  2017-01-24 14:40 ` [PATCH 6/6] gnu: Add neovim Ricardo Wurmus
@ 2017-01-24 21:31   ` Ludovic Courtès
  2017-01-31 20:04     ` Ricardo Wurmus
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2017-01-24 21:31 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> * gnu/packages/vim.scm (neovim): New variable.

[...]

> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'set-lua-paths
> +           (lambda* (#:key inputs #:allow-other-keys)

Maybe add a comment/link about the placeholder thing.

> +    (inputs
> +     `(("libuv" ,libuv)
> +       ("gettext" ,gettext-minimal)
> +       ("gperf" ,gperf)

I’d expect gettext and gperf to be native inputs instead?

Otherwise LGTM, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/6] gnu: Add lua5.2-bitop.
  2017-01-24 18:52   ` Leo Famulari
@ 2017-01-25  9:17     ` Ricardo Wurmus
  0 siblings, 0 replies; 14+ messages in thread
From: Ricardo Wurmus @ 2017-01-25  9:17 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


Leo Famulari <leo@famulari.name> writes:

> On Tue, Jan 24, 2017 at 03:40:13PM +0100, Ricardo Wurmus wrote:
>> * gnu/packages/lua.scm (lua5.2-bitop): New variable.
>
>> +    (arguments
>> +     `(#:test-target "test"
>> +       #:make-flags
>> +       (list "INSTALL=install -pD"
>> +             (string-append "INSTALLPATH=printf "
>
> What's up with this "printf"? Does it actually execute the value of
> INSTALLPATH?

INSTALLPATH defaults to “lua somefile.lua”, and it is applied to the
name of the module (“bit”).  If I just changed INSTALLPATH to a literal
path, the “install” target would try to execute it with “bit” as an
argument.

This is why I’m using “printf”, which when given a string literal
ignores any other arguments.  The result is just the install path.  I
chose this method over patching the Makefile.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/6] gnu: Add lua-libmpack.
  2017-01-24 18:51   ` Leo Famulari
@ 2017-01-25  9:18     ` Ricardo Wurmus
  0 siblings, 0 replies; 14+ messages in thread
From: Ricardo Wurmus @ 2017-01-25  9:18 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


Leo Famulari <leo@famulari.name> writes:

> On Tue, Jan 24, 2017 at 03:40:11PM +0100, Ricardo Wurmus wrote:
>> * gnu/packages/serialization.scm (lua-libmpack): New variable.
>
>> +               "USE_SYSTEM_LUA=yes"
>
> It doesn't bundle Lua, right? I couldn't find a bundled copy in the
> source tarball, so I'm just asking in case I missed something obvious.

It does not.  Without USE_SYSTEM_LUA the build system assumes that we
should use the luarocks package manager.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 5/6] gnu: Add lua5.2-lpeg.
  2017-01-24 14:40 ` [PATCH 5/6] gnu: Add lua5.2-lpeg Ricardo Wurmus
@ 2017-01-26 18:01   ` Ludovic Courtès
  2017-01-31 19:41     ` Ricardo Wurmus
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2017-01-26 18:01 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> * gnu/packages/lua.scm (lua5.2-lpeg): New variable.

I think you didn’t get feedback on this one.

> +(define-public lua5.2-lpeg
> +  (package (inherit lua-lpeg)
> +    (name "lua5.2-lpeg")
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         ;; `make install` isn't available, so we have to do it manually
> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out"))
> +                   (lua-version ,(version-major+minor (package-version lua-5.2))))
> +               (install-file "lpeg.so"
> +                             (string-append out "/lib/lua/" lua-version))
> +               (install-file "re.lua"
> +                             (string-append out "/share/lua/" lua-version))

It would be best to avoid duplicating this phase since the only
difference is the version number.  However, this is currently
inconvenient, so it’s probably fine to keep it, with an “XXX” comment.

To fix it, we’d have to arrange for the phase to stand alone as opposed
to getting the Lua version number from the “host side”.  So it would be
written along the lines of:

  (lambda …
    (let* ((lua (assoc-ref inputs "lua"))
           (lua-version (extract-version lua)))
      …))

The Python stuff uses a similar pattern.  The ‘extract-version’ thing is
necessarily hacky and brittle though.

Alternately, we could pass the info as an environment variable,
something that’s not done anywhere yet.

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 5/6] gnu: Add lua5.2-lpeg.
  2017-01-26 18:01   ` Ludovic Courtès
@ 2017-01-31 19:41     ` Ricardo Wurmus
  0 siblings, 0 replies; 14+ messages in thread
From: Ricardo Wurmus @ 2017-01-31 19:41 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Ludovic Courtès <ludo@gnu.org> writes:

> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
>
>> * gnu/packages/lua.scm (lua5.2-lpeg): New variable.
>
> I think you didn’t get feedback on this one.
>
>> +(define-public lua5.2-lpeg
>> +  (package (inherit lua-lpeg)
>> +    (name "lua5.2-lpeg")
>> +    (arguments
>> +     `(#:phases
>> +       (modify-phases %standard-phases
>> +         (delete 'configure)
>> +         ;; `make install` isn't available, so we have to do it manually
>> +         (replace 'install
>> +           (lambda* (#:key outputs #:allow-other-keys)
>> +             (let ((out (assoc-ref outputs "out"))
>> +                   (lua-version ,(version-major+minor (package-version lua-5.2))))
>> +               (install-file "lpeg.so"
>> +                             (string-append out "/lib/lua/" lua-version))
>> +               (install-file "re.lua"
>> +                             (string-append out "/share/lua/" lua-version))
>
> It would be best to avoid duplicating this phase since the only
> difference is the version number.  However, this is currently
> inconvenient, so it’s probably fine to keep it, with an “XXX” comment.

I agree.  I’ve added an XXX comment explaining why it’s duplicated with
a reference to your email for a proposed change.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/6] gnu: Add neovim.
  2017-01-24 21:31   ` Ludovic Courtès
@ 2017-01-31 20:04     ` Ricardo Wurmus
  0 siblings, 0 replies; 14+ messages in thread
From: Ricardo Wurmus @ 2017-01-31 20:04 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Ludovic Courtès <ludo@gnu.org> writes:

>> +    (inputs
>> +     `(("libuv" ,libuv)
>> +       ("gettext" ,gettext-minimal)
>> +       ("gperf" ,gperf)
>
> I’d expect gettext and gperf to be native inputs instead?

Ah, yes, you’re right.  Pushed it with this change.  Thanks!

-- 
Ricardo

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-01-31 20:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24 14:40 [PATCH 1/6] gnu: Add libmpack Ricardo Wurmus
2017-01-24 14:40 ` [PATCH 2/6] gnu: Add lua-libmpack Ricardo Wurmus
2017-01-24 18:51   ` Leo Famulari
2017-01-25  9:18     ` Ricardo Wurmus
2017-01-24 14:40 ` [PATCH 3/6] gnu: Add lua5.2-libmpack Ricardo Wurmus
2017-01-24 14:40 ` [PATCH 4/6] gnu: Add lua5.2-bitop Ricardo Wurmus
2017-01-24 18:52   ` Leo Famulari
2017-01-25  9:17     ` Ricardo Wurmus
2017-01-24 14:40 ` [PATCH 5/6] gnu: Add lua5.2-lpeg Ricardo Wurmus
2017-01-26 18:01   ` Ludovic Courtès
2017-01-31 19:41     ` Ricardo Wurmus
2017-01-24 14:40 ` [PATCH 6/6] gnu: Add neovim Ricardo Wurmus
2017-01-24 21:31   ` Ludovic Courtès
2017-01-31 20:04     ` Ricardo Wurmus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.