2019-01-30 14:13:15 +00:00
|
|
|
{ lua, writeText, toLuaModule }:
|
2014-09-19 20:40:37 +01:00
|
|
|
|
2019-08-21 14:03:11 +01:00
|
|
|
{ disabled ? false, ... } @ attrs:
|
2014-09-19 20:40:37 +01:00
|
|
|
|
2014-09-23 11:09:36 +01:00
|
|
|
if disabled then
|
|
|
|
throw "${attrs.name} not supported by interpreter lua-${lua.luaversion}"
|
|
|
|
else
|
2019-01-30 14:13:15 +00:00
|
|
|
toLuaModule( lua.stdenv.mkDerivation (
|
2017-09-30 15:36:10 +01:00
|
|
|
{
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
"LUA_LIBDIR=$(out)/lib/lua/${lua.luaversion}"
|
|
|
|
"LUA_INC=-I${lua}/include"
|
|
|
|
];
|
2014-09-23 11:09:36 +01:00
|
|
|
}
|
|
|
|
//
|
|
|
|
attrs
|
|
|
|
//
|
|
|
|
{
|
|
|
|
name = "lua${lua.luaversion}-" + attrs.name;
|
2019-08-21 14:03:11 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
lua # propagate it for its setup-hook
|
|
|
|
];
|
2014-09-23 11:09:36 +01:00
|
|
|
}
|
2019-01-30 14:13:15 +00:00
|
|
|
) )
|