lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at release-16.03-start 61 lines 2.5 kB view raw
1{ stdenv, fetchurl, fetchpatch, readline }: 2 3let 4 dsoPatch = fetchurl { 5 url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/lua-arch.patch?h=packages/lua51"; 6 sha256 = "11fcyb4q55p4p7kdb8yp85xlw8imy14kzamp2khvcyxss4vw8ipw"; 7 name = "lua-arch.patch"; 8 }; 9in 10stdenv.mkDerivation rec { 11 name = "lua-5.1.5"; 12 luaversion = "5.1"; 13 14 src = fetchurl { 15 url = "http://www.lua.org/ftp/${name}.tar.gz"; 16 sha256 = "2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333"; 17 }; 18 19 buildInputs = [ readline ]; 20 21 patches = (if stdenv.isDarwin then [ ./5.1.darwin.patch ] else [ dsoPatch ]) 22 ++ [(fetchpatch { 23 name = "CVE-2014-5461.patch"; 24 url = "http://anonscm.debian.org/cgit/pkg-lua/lua5.1.git/plain/debian/patches/" 25 + "0004-Fix-stack-overflow-in-vararg-functions.patch?id=b75a2014db2ad65683521f7bb295bfa37b48b389"; 26 sha256 = "05i5vh53d9i6dy11ibg9i9qpwz5hdm0s8bkx1d9cfcvy80cm4c7f"; 27 })]; 28 29 configurePhase = 30 if stdenv.isDarwin 31 then '' 32 makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2" LDFLAGS="" CC="$CC" ) 33 installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.5.1.5.dylib" INSTALL_DATA='cp -d' ) 34 '' else '' 35 makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC" LDFLAGS="-fPIC" ) 36 installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.5.1 liblua.so.5.1.5" INSTALL_DATA='cp -d' ) 37 ''; 38 39 postInstall = '' 40 mkdir -p "$out/share/doc/lua" "$out/lib/pkgconfig" 41 sed <"etc/lua.pc" >"$out/lib/pkgconfig/lua.pc" -e "s|^prefix=.*|prefix=$out|" 42 mv "doc/"*.{gif,png,css,html} "$out/share/doc/lua/" 43 rmdir $out/{share,lib}/lua/5.1 $out/{share,lib}/lua 44 ''; 45 46 meta = { 47 homepage = "http://www.lua.org"; 48 description = "Powerful, fast, lightweight, embeddable scripting language"; 49 longDescription = '' 50 Lua combines simple procedural syntax with powerful data 51 description constructs based on associative arrays and extensible 52 semantics. Lua is dynamically typed, runs by interpreting bytecode 53 for a register-based virtual machine, and has automatic memory 54 management with incremental garbage collection, making it ideal 55 for configuration, scripting, and rapid prototyping. 56 ''; 57 license = stdenv.lib.licenses.mit; 58 hydraPlatforms = stdenv.lib.platforms.linux; 59 maintainers = [ stdenv.lib.maintainers.simons ]; 60 }; 61}