guix-commits
[Top][All Lists]
Advanced

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

03/04: gnu: Add lua-ldoc.


From: guix-commits
Subject: 03/04: gnu: Add lua-ldoc.
Date: Fri, 7 Feb 2020 18:18:41 -0500 (EST)

ngz pushed a commit to branch master
in repository guix.

commit 4898e06abcdfc17146b6a0640a50fdefcf4f8431
Author: Nicolas Goaziou <address@hidden>
AuthorDate: Fri Feb 7 23:56:36 2020 +0100

    gnu: Add lua-ldoc.
    
    * gnu/packages/lua.scm (lua-ldoc): New variable.
---
 gnu/packages/lua.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index ee7480a..45e08e0 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -380,6 +380,55 @@ path management.  Much of the functionality is inspired by 
the Python
 standard libraries.")
     (license license:expat)))
 
+(define-public lua-ldoc
+  (package
+    (name "lua-ldoc")
+    (version "1.4.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/stevedonovan/LDoc.git";)
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1h0cf7bp4am54r0j8lhjs2l1c7q5vz74ba0jvw9qdbaqimls46g8"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("lua" ,lua)))
+    (propagated-inputs
+     `(("lua-penlight" ,lua-penlight)))
+    (arguments
+     `(#:tests? #f                 ;tests must run after installation.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-installation-directory
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (lua-version ,(version-major+minor (package-version lua))))
+               (substitute* "makefile"
+                 (("LUA=.*") "#\n")
+                 (("(LUA_PREFIX=).*" _ prefix)
+                  (string-append prefix out "\n"))
+                 (("(LUA_BINDIR=).*" _ prefix)
+                  (string-append prefix out "/bin\n"))
+                 (("(LUA_SHAREDIR=).*" _ prefix)
+                  (string-append prefix out "/share/lua/" lua-version "\n"))))
+             #t))
+         (delete 'configure)
+         (add-before 'install 'create-bin-directory
+           (lambda* (#:key outputs #:allow-other-keys)
+             (mkdir-p (string-append (assoc-ref outputs "out") "/bin"))
+             #t)))))
+    (home-page "http://stevedonovan.github.io/ldoc/";)
+    (synopsis "Lua documentation generator")
+    (description
+     "LDoc is a LuaDoc-compatible documentation generation system for
+Lua source code.  It parses the declaration and documentation comments
+in a set of Lua source files and produces a set of XHTML pages
+describing the commented declarations and functions.")
+    (license license:expat)))
+
 (define (make-lua-lgi name lua)
   (package
     (name name)



reply via email to

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