mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
Removes the roll-your-own-broken-attribute that `disabled` was. The
advantage of `meta.broken`: It can be caught and properly handled by CI,
while the custom `throw` can not.
(cherry picked from commit 236cf1200e)
32 lines
565 B
Nix
32 lines
565 B
Nix
{
|
|
lua,
|
|
writeText,
|
|
toLuaModule,
|
|
}:
|
|
|
|
{
|
|
propagatedBuildInputs ? [ ],
|
|
makeFlags ? [ ],
|
|
...
|
|
}@attrs:
|
|
|
|
toLuaModule (
|
|
lua.stdenv.mkDerivation (
|
|
attrs
|
|
// {
|
|
name = "lua${lua.luaversion}-" + attrs.pname + "-" + attrs.version;
|
|
|
|
makeFlags = [
|
|
"PREFIX=$(out)"
|
|
"LUA_INC=-I${lua}/include"
|
|
"LUA_LIBDIR=$(out)/lib/lua/${lua.luaversion}"
|
|
"LUA_VERSION=${lua.luaversion}"
|
|
] ++ makeFlags;
|
|
|
|
propagatedBuildInputs = propagatedBuildInputs ++ [
|
|
lua # propagate it for its setup-hook
|
|
];
|
|
}
|
|
)
|
|
)
|