lua{54,Jit}Packages.lua-pam: mark as broken

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.

Changed files
+18 -25
pkgs
development
lua-modules
generic
top-level
+16 -20
pkgs/development/lua-modules/generic/default.nix
···
}:
{
-
disabled ? false,
propagatedBuildInputs ? [ ],
makeFlags ? [ ],
...
}@attrs:
-
if disabled then
-
throw "${attrs.name} not supported by interpreter lua-${lua.luaversion}"
-
else
-
toLuaModule (
-
lua.stdenv.mkDerivation (
-
attrs
-
// {
-
name = "lua${lua.luaversion}-" + attrs.pname + "-" + attrs.version;
+
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;
+
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
-
];
-
}
-
)
+
propagatedBuildInputs = propagatedBuildInputs ++ [
+
lua # propagate it for its setup-hook
+
];
+
}
)
+
)
+2 -5
pkgs/top-level/lua-packages.nix
···
buildLuaPackage rec {
pname = "lua-pam";
version = "unstable-2015-07-03";
-
# Needed for `disabled`, overridden in buildLuaPackage
-
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "devurandom";
···
runHook postInstall
'';
-
# The package does not build with lua 5.4 or luaJIT
-
disabled = luaAtLeast "5.4" || isLuaJIT;
-
meta = with lib; {
+
# The package does not build with lua 5.4 or luaJIT
+
broken = luaAtLeast "5.4" || isLuaJIT;
description = "Lua module for PAM authentication";
homepage = "https://github.com/devurandom/lua-pam";
license = licenses.mit;