unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Lassieur" <clement@lassieur.org>
To: 29425@debbugs.gnu.org
Subject: [bug#29425] [PATCH] gnu: Add lua5.1-bitop.
Date: Sat, 25 Nov 2017 03:20:54 +0100	[thread overview]
Message-ID: <20171125022054.31445-1-clement@lassieur.org> (raw)
In-Reply-To: <87shd373gp.fsf@gnu.org>

* gnu/packages/lua.scm (lua5.1-bitop): New variable.
(make-lua-bitop): New procedure.
---
 gnu/packages/lua.scm | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index c8bc4ef85..9708b6012 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -415,9 +415,9 @@ Grammars (PEGs).")
     (inputs `(("lua", lua-5.2)))))
 
 ;; Lua 5.3 is not supported.
-(define-public lua5.2-bitop
+(define (make-lua-bitop name lua)
   (package
-    (name "lua5.2-bitop")
+    (name name)
     (version "1.0.2")
     (source (origin
               (method url-fetch)
@@ -434,15 +434,21 @@ Grammars (PEGs).")
              (string-append "INSTALLPATH=printf "
                             (assoc-ref %outputs "out")
                             "/lib/lua/"
-                            ,(version-major+minor (package-version lua-5.2))
+                            ,(version-major+minor (package-version lua))
                             "/bit/bit.so"))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))
-    (inputs `(("lua", lua-5.2)))
+    (inputs `(("lua", lua)))
     (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)))
+
+(define-public lua5.2-bitop
+  (make-lua-bitop "lua5.2-bitop" lua-5.2))
+
+(define-public lua5.1-bitop
+  (make-lua-bitop "lua5.1-bitop" lua-5.1))
-- 
2.15.0

  reply	other threads:[~2017-11-25  2:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-24 16:48 [bug#29425] Prosody patches Clément Lassieur
2017-11-24 16:52 ` [bug#29425] [PATCH 1/6] gnu: Add lua5.1-bitop Clément Lassieur
2017-11-24 16:52   ` [bug#29425] [PATCH 2/6] gnu: prosody: Add lua5.1-bitop to inputs Clément Lassieur
2017-11-24 21:48     ` Ludovic Courtès
2017-11-24 16:52   ` [bug#29425] [PATCH 3/6] services: prosody: Adapt to Prosody 0.10.0 Clément Lassieur
2017-11-24 21:49     ` Ludovic Courtès
2017-11-25  2:22       ` Clément Lassieur
2017-11-24 16:52   ` [bug#29425] [PATCH 4/6] services: prosody: Add support for http-external-url Clément Lassieur
2017-11-24 21:50     ` Ludovic Courtès
2017-11-24 16:52   ` [bug#29425] [PATCH 5/6] services: prosody: Add support for http-max-content-size Clément Lassieur
2017-11-24 21:50     ` Ludovic Courtès
2017-11-24 16:52   ` [bug#29425] [PATCH 6/6] services: prosody: Allow to add raw content to the config file Clément Lassieur
2017-11-24 21:50     ` Ludovic Courtès
2017-11-24 21:48   ` [bug#29425] [PATCH 1/6] gnu: Add lua5.1-bitop Ludovic Courtès
2017-11-25  2:20     ` Clément Lassieur [this message]
2017-11-25 16:24       ` [bug#29425] [PATCH] " Leo Famulari
2017-11-26 14:18         ` Clément Lassieur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171125022054.31445-1-clement@lassieur.org \
    --to=clement@lassieur.org \
    --cc=29425@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).