unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 8af03183c6e4f492b7336a8b88b6fa86a3b966d0 7618 bytes (raw)
name: gnu/packages/lua.scm 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2014 Raimon Grau <raimonster@gmail.com>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 doncatnip <gnopap@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 lua)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages)
  #:use-module (gnu packages readline)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages libffi)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages gtk))

(define-public lua
  (package
    (name "lua")
    (version "5.2.4")
    (source (origin
             (method url-fetch)
             (uri (string-append "http://www.lua.org/ftp/lua-"
                                 version ".tar.gz"))
             (sha256
              (base32 "0jwznq0l8qg9wh5grwg07b5cy3lzngvl5m2nl1ikp6vqssmf9qmr"))
             (patches (search-patches "lua-pkgconfig.patch"
                                      "lua52-liblua-so.patch"))))
    (build-system gnu-build-system)
    (inputs `(("readline" ,readline)))
    (arguments
     '(#:modules ((guix build gnu-build-system)
                    (guix build utils)
                    (srfi srfi-1))
       #:test-target "test"
       #:phases
       (modify-phases %standard-phases
         (delete 'configure)
         (replace 'build
           (lambda _ (zero? (system*
                              "make" "LDFLAGS=-ldl"
                              "CFLAGS=-fPIC -DLUA_USE_DLOPEN -DLUA_USE_POSIX"
                              "linux"))))
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (zero? (system* "make" "install"
                               (string-append "INSTALL_TOP=" out)
                               (string-append "INSTALL_MAN=" out
                                              "/share/man/man1")))))))))
    (home-page "http://www.lua.org/")
    (synopsis "Embeddable scripting language")
    (description
     "Lua is a powerful, fast, lightweight, embeddable scripting language.  Lua
combines simple procedural syntax with powerful data description constructs
based on associative arrays and extensible semantics.  Lua is dynamically typed,
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 lua-5.1
  (package (inherit lua)
    (version "5.1.5")
    (source (origin
             (method url-fetch)
             (uri (string-append "http://www.lua.org/ftp/lua-"
                                 version ".tar.gz"))
             (sha256
              (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16"))
             (patches (search-patches "lua51-liblua-so.patch"
                                      "lua-CVE-2014-5461.patch"))))))

(define-public luajit
  (package
    (name "luajit")
    (version "2.0.4")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://luajit.org/download/LuaJIT-"
                                  version ".tar.gz"))
              (sha256
               (base32 "0zc0y7p6nx1c0pp4nhgbdgjljpfxsb5kgwp4ysz22l1p2bms83v2"))
              (patches (search-patches "luajit-symlinks.patch"
                                       "luajit-no_ldconfig.patch"))))
    (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)))

(define-public lua-lgi
  (package
    (name "lua-lgi")
    (version "0.9.1")
    (source
      (origin
        (method url-fetch)
        (uri (string-append
              "https://github.com/pavouk/lgi/archive/"
              version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256 (base32 "1fmgdl5y4ph3yc6ycg865s3vai1rjkyda61cgqxk6zd13hmznw0c"))))
    (build-system gnu-build-system)
    (arguments
     '(#:phases
       (modify-phases %standard-phases
         (replace 'configure
           (lambda* (#:key inputs #:allow-other-keys)
             ; needs to load cairo dynamically
             (let* ((cairo (string-append
                             (assoc-ref inputs "cairo") "/lib" )))
               (setenv "LD_LIBRARY_PATH" cairo ))

             ; FIXME: Skip GTK tests:
             ;   gtk3 - can't get it to run with the xorg-server config below
             ;          and some non-gtk tests will also fail
             ;   gtk2 - lots of functions aren't implemented
             ; We choose gtk2 as the lesser evil and simply skip the test.
             ; as of 22/08/2016 awesome is the only package dependent on lgi but
             ; it doesn't need or interact with gtk using lgi.
             (substitute* "./tests/test.lua"
                        (("'gtk.lua',") "-- 'gtk.lua',"))
             ; lua version and therefore install directories are hardcoded
             (substitute* "./lgi/Makefile"
                        (("LUA_VERSION=5.1") "LUA_VERSION=5.2"))

             ;; There must be a running X server during tests.
             (system (format #f "~a/bin/Xvfb :1 &" (assoc-ref inputs "xorg-server")))
             (setenv "DISPLAY" ":1"))))

       #:make-flags
         (let ((out (assoc-ref %outputs "out")))
           (list "CC=gcc"
             (string-append "PREFIX=" (assoc-ref %outputs "out"))))))

    (inputs
     `(("gobject-introspection" ,gobject-introspection)
       ("glib" ,glib)
       ("pango", pango)
       ("gtk", gtk+-2)
       ("lua" ,lua)
       ("cairo" ,cairo)
       ("libffi" ,libffi)
       ("xorg-server", xorg-server)))
    (native-inputs
     `(("pkg-config" ,pkg-config)))
    (home-page "https://github.com/pavouk/lgi/")
    (synopsis "Lua bridge to GObject based libraries")
    (description
     "LGI is gobject-introspection based dynamic Lua binding to GObject
based libraries.  It allows using GObject-based libraries directly from Lua.
Notable examples are GTK+, GStreamer and Webkit.")
    (license expat)))

debug log:

solving 8af0318 ...
found 8af0318 in https://yhetil.org/guix-devel/20160825030933.06c8d523@gmail.com/
found c68a3ff in https://yhetil.org/guix-devel/20160825030933.06c8d523@gmail.com/
found b4b5dee in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 b4b5dee8be4862ab62b9d97552d0bfc69c1cb327	gnu/packages/lua.scm

applying [1/2] https://yhetil.org/guix-devel/20160825030933.06c8d523@gmail.com/
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index b4b5dee..c68a3ff 100644


applying [2/2] https://yhetil.org/guix-devel/20160825030933.06c8d523@gmail.com/
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index c68a3ff..8af0318 100644

Checking patch gnu/packages/lua.scm...
Applied patch gnu/packages/lua.scm cleanly.
Checking patch gnu/packages/lua.scm...
Applied patch gnu/packages/lua.scm cleanly.

index at:
100644 8af03183c6e4f492b7336a8b88b6fa86a3b966d0	gnu/packages/lua.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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).