guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/05: gnu: Add lua-filesystem and lua5.2-filesystem.


From: guix-commits
Subject: 03/05: gnu: Add lua-filesystem and lua5.2-filesystem.
Date: Tue, 8 Jan 2019 09:24:00 -0500 (EST)

snape pushed a commit to branch master
in repository guix.

commit d994325747486e7beddbf03255c8c95d58d08dc8
Author: Clément Lassieur <address@hidden>
Date:   Tue Jan 8 13:49:29 2019 +0100

    gnu: Add lua-filesystem and lua5.2-filesystem.
    
    * gnu/packages/lua.scm (lua-filesystem, lua5.2-filesystem): New variables.
    (make-lua-filesystem): New procedure.
    (lua-filesystem, lua5.1-filesystem, lua5.2-filesystem): Call it.
---
 gnu/packages/lua.scm | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 3669aaf..5e73f1e 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -244,9 +244,9 @@ handy.")
 (define-public lua5.2-socket
   (make-lua-socket "lua5.2-socket" lua-5.2))
 
-(define-public lua5.1-filesystem
+(define (make-lua-filesystem name lua)
   (package
-    (name "lua5.1-filesystem")
+    (name name)
     (version "1.6.3")
     (source (origin
               (method url-fetch)
@@ -260,13 +260,16 @@ handy.")
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
-       (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       (let ((out (assoc-ref %outputs "out"))
+             (lua-version ,(version-major+minor (package-version lua))))
+         (list (string-append "PREFIX=" out)
+               (string-append "LUA_LIBDIR=" out "/lib/lua/" lua-version)))
        #:test-target "test"
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))
     (inputs
-     `(("lua" ,lua-5.1)))
+     `(("lua" ,lua)))
     (home-page "https://keplerproject.github.io/luafilesystem/index.html";)
     (synopsis "File system library for Lua")
     (description "LuaFileSystem is a Lua library developed to complement the
@@ -275,6 +278,15 @@ distribution.  LuaFileSystem offers a portable way to 
access the underlying
 directory structure and file attributes.")
     (license (package-license lua-5.1))))
 
+(define-public lua-filesystem
+  (make-lua-filesystem "lua-filesystem" lua))
+
+(define-public lua5.1-filesystem
+  (make-lua-filesystem "lua5.1-filesystem" lua-5.1))
+
+(define-public lua5.2-filesystem
+  (make-lua-filesystem "lua5.2-filesystem" lua-5.2))
+
 (define-public lua5.1-sec
   (package
     (name "lua5.1-sec")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]