all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* luajit recipe
@ 2014-02-04 21:46 Raimon Grau
  2014-02-04 23:17 ` Ludovic Courtès
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Raimon Grau @ 2014-02-04 21:46 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

Hi,

I've been following this project for some time, and finally got through
using it for a few packages, and made my first recipe.

Here's the luajit recipe. I'd appreciate any comments you have on that
(It's my first (hopefully not the last) contribution to this project).


[-- Attachment #2: luajit.scm --]
[-- Type: text/plain, Size: 2723 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Raimon Grau <raimonster@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages luajit)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages))

(define-public luajit
  (package
    (name "luajit")
    (version "2.0.2")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://luajit.org/download/LuaJIT-"
                                  version ".tar.gz"))
              (sha256
               (base32 "0f3cykihfdn3gi6na9p0xjd4jnv26z18m441n5vyg42q9abh4ln0"))))
    (build-system gnu-build-system)
    (arguments
     '(#:modules ((guix build gnu-build-system)
                  (guix build utils)
                  (srfi srfi-1))
                 #:phases
                 (alist-replace
                  'install
                  (lambda* (#:key system outputs #:allow-other-keys)
                    (let ((out (assoc-ref outputs "out")))
                      (zero? (system* "make" "install"
                                      (string-append " PREFIX=" out)))))
                  (alist-replace
                   'build
                   (lambda* (#:key system outputs #:allow-other-keys)
                     (let ((out (assoc-ref outputs "out")))
                       (zero? (system* "make" (string-append " PREFIX=" out)))))
                   (alist-delete
                    'check
                    (alist-delete 'configure
                                  %standard-phases))))))
    (home-page "http://www.luajit.org/")
    (synopsis "Just in time compiler for Lua programming language version 5.1")
    (description
     "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua
programming language. Lua is a powerful, dynamic and light-weight programming
language. It may be embedded or used as a general-purpose, stand-alone
language.

LuaJIT is Copyright © 2005-2014 Mike Pall")
    (license x11)))

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

* Re: luajit recipe
  2014-02-04 21:46 luajit recipe Raimon Grau
@ 2014-02-04 23:17 ` Ludovic Courtès
  2014-02-04 23:27 ` Andreas Enge
  2014-02-05  1:31 ` Cyril Roelandt
  2 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2014-02-04 23:17 UTC (permalink / raw)
  To: Raimon Grau; +Cc: guix-devel

Hello!

Raimon Grau <raimonster@gmail.com> skribis:

> I've been following this project for some time, and finally got through
> using it for a few packages, and made my first recipe.

Great, welcome aboard!  :-)

Overall this looks good to me,

>     (arguments
>      '(#:modules ((guix build gnu-build-system)
>                   (guix build utils)
>                   (srfi srfi-1))

Actually srfi-1 is not needed because ‘alist-delete’ is re-exported by
(guix build utils), which is used by default.  So the #:modules argument
can be dropped altogether.

>                  #:phases
>                  (alist-replace
>                   'install
>                   (lambda* (#:key system outputs #:allow-other-keys)
>                     (let ((out (assoc-ref outputs "out")))
>                       (zero? (system* "make" "install"
>                                       (string-append " PREFIX=" out)))))
>                   (alist-replace
>                    'build
>                    (lambda* (#:key system outputs #:allow-other-keys)
>                      (let ((out (assoc-ref outputs "out")))
>                        (zero? (system* "make" (string-append " PREFIX=" out)))))
>                    (alist-delete
>                     'check
>                     (alist-delete 'configure
>                                   %standard-phases))))))

This works well, but it can be simplified as:

  #:tests? #f
  #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))

>     (description
>      "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua
> programming language. Lua is a powerful, dynamic and light-weight programming
> language. It may be embedded or used as a general-purpose, stand-alone
> language.
>
> LuaJIT is Copyright © 2005-2014 Mike Pall")

The description doesn’t contain a copyright statement in general.

Could you send an updated version with these changes in the format
produced by ‘git format-patch’, and using a ChangeLog-style commit log
(see ‘HACKING’ for details)?  That makes it easier to apply the patch.

Let us know if you have any questions.

Thanks!

Ludo’.

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

* Re: luajit recipe
  2014-02-04 21:46 luajit recipe Raimon Grau
  2014-02-04 23:17 ` Ludovic Courtès
@ 2014-02-04 23:27 ` Andreas Enge
  2014-02-05  1:31 ` Cyril Roelandt
  2 siblings, 0 replies; 11+ messages in thread
From: Andreas Enge @ 2014-02-04 23:27 UTC (permalink / raw)
  To: Raimon Grau; +Cc: guix-devel

Hello,

On Tue, Feb 04, 2014 at 10:46:25PM +0100, Raimon Grau wrote:
> Here's the luajit recipe. I'd appreciate any comments you have on that
> (It's my first (hopefully not the last) contribution to this project).

excellent!

Just a few very quick comments:

> (define-module (gnu packages luajit)

If you add a module/file, you also need to "register" it in gnu-system.am.
Here, there is already a module lua in the file lua.scm. It would probably
make sense to add your package there.

>     (description
>      "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua
> programming language. Lua is a powerful, dynamic and light-weight programming
> language. It may be embedded or used as a general-purpose, stand-alone
> language.
> 
> LuaJIT is Copyright © 2005-2014 Mike Pall")

You should write two spaces after the "." at the end of a sentence. I would
drop the second paragraph (which is also likely to change with newer
versions).

I did not check anything else. Thanks for contributing!

Andreas

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

* Re: luajit recipe
  2014-02-04 21:46 luajit recipe Raimon Grau
  2014-02-04 23:17 ` Ludovic Courtès
  2014-02-04 23:27 ` Andreas Enge
@ 2014-02-05  1:31 ` Cyril Roelandt
  2014-02-05 13:54   ` Ludovic Courtès
  2 siblings, 1 reply; 11+ messages in thread
From: Cyril Roelandt @ 2014-02-05  1:31 UTC (permalink / raw)
  To: guix-devel

On 02/04/2014 10:46 PM, Raimon Grau wrote:
> Hi,
>
> I've been following this project for some time, and finally got through
> using it for a few packages, and made my first recipe.
>
> Here's the luajit recipe. I'd appreciate any comments you have on that
> (It's my first (hopefully not the last) contribution to this project).
>


I think you should add this package to gnu/packages/lua.scm rather than 
creating a new file.

Regards,
Cyril Roelandt.

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

* Re: luajit recipe
  2014-02-05  1:31 ` Cyril Roelandt
@ 2014-02-05 13:54   ` Ludovic Courtès
  2014-02-06  0:11     ` Raimon Grau
  0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2014-02-05 13:54 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

Cyril Roelandt <tipecaml@gmail.com> skribis:

> I think you should add this package to gnu/packages/lua.scm rather
> than creating a new file.

Indeed, I had forgotten about that file.

Raimon: could you post an updated patch that does that?

Ludo’.

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

* Re: luajit recipe
  2014-02-05 13:54   ` Ludovic Courtès
@ 2014-02-06  0:11     ` Raimon Grau
  2014-02-06  0:37       ` Cyril Roelandt
  2014-02-06  0:47       ` Raimon Grau
  0 siblings, 2 replies; 11+ messages in thread
From: Raimon Grau @ 2014-02-06  0:11 UTC (permalink / raw)
  To: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Cyril Roelandt <tipecaml@gmail.com> skribis:
>
>> I think you should add this package to gnu/packages/lua.scm rather
>> than creating a new file.
>
> Indeed, I had forgotten about that file.
>
> Raimon: could you post an updated patch that does that?
>
> Ludo’.

The releases of one or the other are not synched at all, and there's
fewer and fewer relation between both implementations, but it probably
makes sense to have them in the same file (as in scheme.scm).

Will do the modifications and send the patch.

Thanks for your inputs!

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

* Re: luajit recipe
  2014-02-06  0:11     ` Raimon Grau
@ 2014-02-06  0:37       ` Cyril Roelandt
  2014-02-06  0:47       ` Raimon Grau
  1 sibling, 0 replies; 11+ messages in thread
From: Cyril Roelandt @ 2014-02-06  0:37 UTC (permalink / raw)
  To: guix-devel; +Cc: raimonster

On 02/06/2014 01:11 AM, Raimon Grau wrote:
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Cyril Roelandt <tipecaml@gmail.com> skribis:
>>
>>> I think you should add this package to gnu/packages/lua.scm rather
>>> than creating a new file.
>>
>> Indeed, I had forgotten about that file.
>>
>> Raimon: could you post an updated patch that does that?
>>
>> Ludo’.
>
> The releases of one or the other are not synched at all, and there's
> fewer and fewer relation between both implementations, but it probably
> makes sense to have them in the same file (as in scheme.scm).
>

Yes. For instance, we have a file named 'version_control.scm' in which 
we put VCS that have nothing in common :)

Cyril Roelandt.

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

* Re: luajit recipe
  2014-02-06  0:11     ` Raimon Grau
  2014-02-06  0:37       ` Cyril Roelandt
@ 2014-02-06  0:47       ` Raimon Grau
  2014-02-06  1:00         ` Cyril Roelandt
  1 sibling, 1 reply; 11+ messages in thread
From: Raimon Grau @ 2014-02-06  0:47 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

Here's the luajit package inside lua.scm .

I hope everything is ok :)

PS: I'm not used to send patches through mail, and gnus is suggesting
text/x-diff mime type and inline (instead of attachment). Which is the
prefered way?


[-- Attachment #2: Add luajit recipe --]
[-- Type: text/x-diff, Size: 1889 bytes --]

From bf7c2156e8bdcbaf9f6c66b74eae6c58de3870d7 Mon Sep 17 00:00:00 2001
From: Raimon Grau <raimonster@gmail.com>
Date: Thu, 6 Feb 2014 01:43:31 +0100
Subject: [PATCH] gnu: Add luajit

---
 gnu/packages/lua.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 14fc28c..b523fe3 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
+;;; Copyright © 2014 Raimon Grau <raimonster@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -61,3 +62,27 @@ runs by interpreting bytecode for a register-based virtual machine, and has
 automatic memory management with incremental garbage collection, making it ideal
 for configuration, scripting, and rapid prototyping.")
     (license x11)))
+
+(define-public luajit
+  (package
+    (name "luajit")
+    (version "2.0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://luajit.org/download/LuaJIT-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32 "0f3cykihfdn3gi6na9p0xjd4jnv26z18m441n5vyg42q9abh4ln0"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases (alist-delete 'configure %standard-phases)
+       #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
+    (home-page "http://www.luajit.org/")
+    (synopsis "Just in time compiler for Lua programming language version 5.1")
+    (description
+     "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua
+programming language. Lua is a powerful, dynamic and light-weight programming
+language.  It may be embedded or used as a general-purpose, stand-alone
+language.")
+    (license x11)))
-- 
1.8.3.2


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

* Re: luajit recipe
  2014-02-06  0:47       ` Raimon Grau
@ 2014-02-06  1:00         ` Cyril Roelandt
  2014-02-06  1:28           ` Raimon Grau
  0 siblings, 1 reply; 11+ messages in thread
From: Cyril Roelandt @ 2014-02-06  1:00 UTC (permalink / raw)
  To: guix-devel; +Cc: raimonster

On 02/06/2014 01:47 AM, Raimon Grau wrote:
> Here's the luajit package inside lua.scm .
>
> I hope everything is ok:)
>
> PS: I'm not used to send patches through mail, and gnus is suggesting
> text/x-diff mime type and inline (instead of attachment). Which is the
> prefered way?
>

Have you tried using git send-email ?

>
> 0001-gnu-Add-luajit.patch
>
>
>  From bf7c2156e8bdcbaf9f6c66b74eae6c58de3870d7 Mon Sep 17 00:00:00 2001
> From: Raimon Grau<raimonster@gmail.com>
> Date: Thu, 6 Feb 2014 01:43:31 +0100
> Subject: [PATCH] gnu: Add luajit
>
> ---
>   gnu/packages/lua.scm | 25 +++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
> index 14fc28c..b523fe3 100644
> --- a/gnu/packages/lua.scm
> +++ b/gnu/packages/lua.scm
> @@ -1,5 +1,6 @@
>   ;;; GNU Guix --- Functional package management for GNU
>   ;;; Copyright © 2013 Cyril Roelandt<tipecaml@gmail.com>
> +;;; Copyright © 2014 Raimon Grau<raimonster@gmail.com>
>   ;;;
>   ;;; This file is part of GNU Guix.
>   ;;;
> @@ -61,3 +62,27 @@ runs by interpreting bytecode for a register-based virtual machine, and has
>   automatic memory management with incremental garbage collection, making it ideal
>   for configuration, scripting, and rapid prototyping.")
>       (license x11)))
> +
> +(define-public luajit
> +  (package
> +    (name "luajit")
> +    (version "2.0.2")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append"http://luajit.org/download/LuaJIT-"
> +                                  version ".tar.gz"))
> +              (sha256
> +               (base32 "0f3cykihfdn3gi6na9p0xjd4jnv26z18m441n5vyg42q9abh4ln0"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     '(#:tests? #f

Please add a comment explaining why you disabled the tests.

> +       #:phases (alist-delete 'configure %standard-phases)
> +       #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
> +    (home-page"http://www.luajit.org/")
> +    (synopsis "Just in time compiler for Lua programming language version 5.1")
> +    (description
> +     "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua
> +programming language. Lua is a powerful, dynamic and light-weight programming
> +language.  It may be embedded or used as a general-purpose, stand-alone
> +language.")
> +    (license x11)))
> -- 1.8.3.2


Cyril.

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

* Re: luajit recipe
  2014-02-06  1:00         ` Cyril Roelandt
@ 2014-02-06  1:28           ` Raimon Grau
  2014-02-06 18:09             ` Ludovic Courtès
  0 siblings, 1 reply; 11+ messages in thread
From: Raimon Grau @ 2014-02-06  1:28 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

Cyril Roelandt <tipecaml@gmail.com> writes:
>
> Please add a comment explaining why you disabled the tests.
>

Luajit just doesn't come with any tests in the distribution, and 'make
test' doesn't exist.  Added a comment in the code.


[-- Attachment #2: luajit recipe --]
[-- Type: text/x-diff, Size: 1948 bytes --]

From 922d9b5e0e4d8332e3f742d1e7954feb93dbdabe Mon Sep 17 00:00:00 2001
From: Raimon Grau <raimonster@gmail.com>
Date: Thu, 6 Feb 2014 01:43:31 +0100
Subject: [PATCH] gnu: Add luajit

---
 gnu/packages/lua.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 14fc28c..81caa26 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
+;;; Copyright © 2014 Raimon Grau <raimonster@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -61,3 +62,27 @@ runs by interpreting bytecode for a register-based virtual machine, and has
 automatic memory management with incremental garbage collection, making it ideal
 for configuration, scripting, and rapid prototyping.")
     (license x11)))
+
+(define-public luajit
+  (package
+    (name "luajit")
+    (version "2.0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://luajit.org/download/LuaJIT-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32 "0f3cykihfdn3gi6na9p0xjd4jnv26z18m441n5vyg42q9abh4ln0"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f                      ;luajit is distributed without tests
+       #:phases (alist-delete 'configure %standard-phases)
+       #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
+    (home-page "http://www.luajit.org/")
+    (synopsis "Just in time compiler for Lua programming language version 5.1")
+    (description
+     "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua
+programming language.  Lua is a powerful, dynamic and light-weight programming
+language.  It may be embedded or used as a general-purpose, stand-alone
+language.")
+    (license x11)))
-- 
1.8.3.2


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

* Re: luajit recipe
  2014-02-06  1:28           ` Raimon Grau
@ 2014-02-06 18:09             ` Ludovic Courtès
  0 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2014-02-06 18:09 UTC (permalink / raw)
  To: Raimon Grau; +Cc: guix-devel

Raimon Grau <raimonster@gmail.com> skribis:

> From 922d9b5e0e4d8332e3f742d1e7954feb93dbdabe Mon Sep 17 00:00:00 2001
> From: Raimon Grau <raimonster@gmail.com>
> Date: Thu, 6 Feb 2014 01:43:31 +0100
> Subject: [PATCH] gnu: Add luajit

Applied, thanks!

Note that I added a GNU ChangeLog-style commit entry–see ‘HACKING’ for
details.

Ludo’.

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

end of thread, other threads:[~2014-02-06 18:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 21:46 luajit recipe Raimon Grau
2014-02-04 23:17 ` Ludovic Courtès
2014-02-04 23:27 ` Andreas Enge
2014-02-05  1:31 ` Cyril Roelandt
2014-02-05 13:54   ` Ludovic Courtès
2014-02-06  0:11     ` Raimon Grau
2014-02-06  0:37       ` Cyril Roelandt
2014-02-06  0:47       ` Raimon Grau
2014-02-06  1:00         ` Cyril Roelandt
2014-02-06  1:28           ` Raimon Grau
2014-02-06 18:09             ` Ludovic Courtès

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.