From 373b41e152ff81bfd4b4bfa5ada79c5ebe5869f2 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Fri, 18 Jul 2025 22:03:52 +0200 Subject: [PATCH] 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. (cherry picked from commit 236cf1200e7870aa589405d2c8437de74437e565) --- .../lua-modules/generic/default.nix | 36 +++++++++---------- pkgs/top-level/lua-packages.nix | 7 ++-- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/pkgs/development/lua-modules/generic/default.nix b/pkgs/development/lua-modules/generic/default.nix index 565852bb0812..0a3275e49bdc 100644 --- a/pkgs/development/lua-modules/generic/default.nix +++ b/pkgs/development/lua-modules/generic/default.nix @@ -5,31 +5,27 @@ }: { - 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 + ]; + } ) +) diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index 1cd461efa91f..477e51215339 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -121,8 +121,6 @@ rec { buildLuaPackage rec { pname = "lua-pam"; version = "unstable-2015-07-03"; - # Needed for `disabled`, overridden in buildLuaPackage - name = "${pname}-${version}"; src = fetchFromGitHub { owner = "devurandom"; @@ -147,10 +145,9 @@ rec { 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;