Assertion throws err message on fail in buildLuaPackage

This commit is contained in:
wyvie 2014-09-23 14:09:36 +04:00 committed by Domen Kožar
parent 164e68c7d3
commit 111b5aa38c
2 changed files with 19 additions and 19 deletions

View File

@ -2,22 +2,23 @@ lua:
{ buildInputs ? [], disabled ? false, ... } @ attrs: { buildInputs ? [], disabled ? false, ... } @ attrs:
assert !disabled; if disabled then
throw "${attrs.name} not supported by interpreter lua-${lua.luaversion}"
else
lua.stdenv.mkDerivation ({
lua.stdenv.mkDerivation ({ preBuild = ''
makeFlagsArray=(
preBuild = '' PREFIX=$out
makeFlagsArray=( LUA_LIBDIR="$out/lib/lua/${lua.luaversion}"
PREFIX=$out LUA_INC="-I${lua}/include");
LUA_LIBDIR="$out/lib/lua/${lua.luaversion}" '';
LUA_INC="-I${lua}/include"); }
''; //
} attrs
// //
attrs {
// name = "lua${lua.luaversion}-" + attrs.name;
{ buildInputs = buildInputs ++ [ lua ];
name = "lua${lua.luaversion}-" + attrs.name; }
buildInputs = buildInputs ++ [ lua ]; )
}
)

View File

@ -8,7 +8,6 @@
{fetchurl, stdenv, lua}: {fetchurl, stdenv, lua}:
let self = _self; _self = with self; { let self = _self; _self = with self; {
inherit (stdenv.lib) maintainers; inherit (stdenv.lib) maintainers;
#define build lua package function #define build lua package function