1{stdenv, fetchurl}:
2
3stdenv.mkDerivation {
4 name = "lua-4.0.1";
5
6 src = fetchurl {
7 url = http://www.lua.org/ftp/lua-4.0.1.tar.gz;
8 md5 = "a31d963dbdf727f9b34eee1e0d29132c";
9 };
10
11 configurePhase = "sed -i -e 's/CFLAGS= -O2/CFLAGS = -O3 -fPIC/' config";
12 buildFlags = "all so sobin";
13 installFlags = "INSTALL_ROOT=$$out";
14
15 hardeningDisable = stdenv.lib.optional stdenv.isi686 "stackprotector";
16
17 meta = {
18 homepage = "http://www.lua.org";
19 description = "Powerful, fast, lightweight, embeddable scripting language";
20 longDescription = ''
21 Lua combines simple procedural syntax with powerful data
22 description constructs based on associative arrays and extensible
23 semantics. Lua is dynamically typed, runs by interpreting bytecode
24 for a register-based virtual machine, and has automatic memory
25 management with incremental garbage collection, making it ideal
26 for configuration, scripting, and rapid prototyping.
27 '';
28 license = stdenv.lib.licenses.mit;
29 platforms = stdenv.lib.platforms.linux;
30 branch = "4";
31 };
32}