mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
lua*Packages.compat53: init at 0.7
The manual compilation is weird, but there's only a rockspec upstream, and I don't know how to use that well inside the nix build.
This commit is contained in:
parent
837a9a4677
commit
597a5936d3
1 changed files with 38 additions and 0 deletions
|
@ -72,6 +72,44 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
compat53 = buildLuaPackage rec {
|
||||
version = "0.7";
|
||||
name = "compat53-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "keplerproject";
|
||||
repo = "lua-compat-5.3";
|
||||
rev = "v${version}";
|
||||
sha256 = "02a14nvn7aggg1yikj9h3dcf8aqjbxlws1bfvqbpfxv9d5phnrpz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
postConfigure = ''
|
||||
CFLAGS+=" -shared $(pkg-config --libs ${if isLuaJIT then "luajit" else "lua"})"
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
cc lstrlib.c $CFLAGS -o string.so
|
||||
cc ltablib.c $CFLAGS -o table.so
|
||||
cc lutf8lib.c $CFLAGS -o utf8.so
|
||||
'';
|
||||
|
||||
# There's no need to separate *.lua and *.so, I guess? TODO: conventions?
|
||||
installPhase = ''
|
||||
install -Dt "$out/lib/lua/${lua.luaversion}/compat53" \
|
||||
compat53/*.lua *.so
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Compatibility module providing Lua-5.3-style APIs for Lua 5.2 and 5.1";
|
||||
homepage = "https://github.com/keplerproject/lua-compat-5.3";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ vcunat ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
cqueues = buildLuaPackage rec {
|
||||
name = "cqueues-${version}";
|
||||
version = "20171014";
|
||||
|
|
Loading…
Reference in a new issue