diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index 38ee02c3cd17..7a61b3ad4a52 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -3,6 +3,7 @@ alt-getopt,,,,,,arobyn ansicolors,,,,,,Freed-Wu argparse,,,,,, basexx,,,,,, +bcrypt,,,,,,ulysseszhan binaryheap,,,,,,vcunat bit32,,,,,5.1,lblasc busted,,,,,, @@ -18,6 +19,8 @@ cyan,,,,,, datafile,,,,,, digestif,,,,,5.3, dkjson,,,,,, +enet,,,,,,ulysseszhan +etlua,,,,,,ulysseszhan fennel,,,,,,misterio77 fidget.nvim,,,,,5.1,mrcjkb fifo,,,,,, @@ -73,6 +76,7 @@ lua_cliargs,,,,,, luabitop,https://raw.githubusercontent.com/teto/luabitop/master/luabitop-1.0.2-3.rockspec,,,,, luacheck,,,,,, luacov,,,,,, +luacov-reporter-lcov,,,,,,ulysseszhan luadbi,,,,,, luadbi-mysql,,,,,, luadbi-postgresql,,,,,, @@ -124,6 +128,7 @@ mpack,,,,,, neorg,,,,,5.1,GaetanLepage neorg-interim-ls,,,,,, neotest,,,,,5.1,mrcjkb +nginx-lua-prometheus,,,,,,ulysseszhan nlua,,,,,,teto nui.nvim,,,,,5.1,mrcjkb nvim-cmp,https://raw.githubusercontent.com/hrsh7th/nvim-cmp/main/nvim-cmp-scm-1.rockspec,,,,5.1, diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index f6b09f37e4d8..531f1101235d 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -136,6 +136,39 @@ final: prev: { } ) { }; + bcrypt = callPackage ( + { + buildLuarocksPackage, + fetchFromGitHub, + fetchurl, + luaOlder, + }: + buildLuarocksPackage { + pname = "bcrypt"; + version = "2.3-1"; + knownRockspec = + (fetchurl { + url = "mirror://luarocks/bcrypt-2.3-1.rockspec"; + sha256 = "1zjy7sflyd50jvp603hmw0sg3rw5xyray0spzv5x5ky9hxivcdrf"; + }).outPath; + src = fetchFromGitHub { + owner = "mikejsavage"; + repo = "lua-bcrypt"; + tag = "v2.3-1"; + hash = "sha256-wd9AbzfD3j9fyTq3toscitPsTEE49YoeSstwfO+3QGo="; + }; + + disabled = luaOlder "5.1"; + + meta = { + homepage = "http://github.com/mikejsavage/lua-bcrypt"; + description = "A Lua wrapper for bcrypt"; + maintainers = with lib.maintainers; [ ulysseszhan ]; + license.fullName = "ISC"; + }; + } + ) { }; + binaryheap = callPackage ( { buildLuarocksPackage, @@ -642,6 +675,72 @@ final: prev: { } ) { }; + enet = callPackage ( + { + buildLuarocksPackage, + fetchFromGitHub, + fetchurl, + luaOlder, + }: + buildLuarocksPackage { + pname = "enet"; + version = "1.2-1"; + knownRockspec = + (fetchurl { + url = "mirror://luarocks/enet-1.2-1.rockspec"; + sha256 = "0jf0qxf3lsrmc1dww7b7i6srqp2cy8caqv9f1rbva7f6rnppxzra"; + }).outPath; + src = fetchFromGitHub { + owner = "leafo"; + repo = "lua-enet"; + tag = "v1.2"; + hash = "sha256-GomfJAPbR+y469LuaNPrkab0Wd3xAsAhT4uqbDo8BUA="; + }; + + disabled = luaOlder "5.1"; + + meta = { + homepage = "http://leafo.net/lua-enet"; + description = "A library for doing network communication in Lua"; + maintainers = with lib.maintainers; [ ulysseszhan ]; + license.fullName = "MIT"; + }; + } + ) { }; + + etlua = callPackage ( + { + buildLuarocksPackage, + fetchFromGitHub, + fetchurl, + luaOlder, + }: + buildLuarocksPackage { + pname = "etlua"; + version = "1.3.0-1"; + knownRockspec = + (fetchurl { + url = "mirror://luarocks/etlua-1.3.0-1.rockspec"; + sha256 = "1g98ibp7n2p4js39din2balncjnxxdbaq6msw92z072s2cccx9cf"; + }).outPath; + src = fetchFromGitHub { + owner = "leafo"; + repo = "etlua"; + tag = "v1.3.0"; + hash = "sha256-CVCNeivP6tefUMseoZjiO5wMYBEPNWMy2+0KnmEIuT0="; + }; + + disabled = luaOlder "5.1"; + + meta = { + homepage = "https://github.com/leafo/etlua"; + description = "Embedded templates for Lua"; + maintainers = with lib.maintainers; [ ulysseszhan ]; + license.fullName = "MIT"; + }; + } + ) { }; + fennel = callPackage ( { buildLuarocksPackage, @@ -2413,6 +2512,39 @@ final: prev: { } ) { }; + luacov-reporter-lcov = callPackage ( + { + buildLuarocksPackage, + fetchurl, + fetchzip, + luaOlder, + luacov, + }: + buildLuarocksPackage { + pname = "luacov-reporter-lcov"; + version = "0.2-0"; + knownRockspec = + (fetchurl { + url = "mirror://luarocks/luacov-reporter-lcov-0.2-0.rockspec"; + sha256 = "16w0vsv9q69zr0rw61x0p3cly755nzi83c83jk579qhxk16ja6c2"; + }).outPath; + src = fetchzip { + url = "https://github.com/daurnimator/luacov-reporter-lcov/archive/v0.2.zip"; + sha256 = "0bw0wyq9zqpcjbqpnlkpxs5g1i015n2rsh0iic4vapmcy7sxlx7w"; + }; + + disabled = luaOlder "5.1"; + propagatedBuildInputs = [ luacov ]; + + meta = { + homepage = "https://github.com/daurnimator/luacov-reporter-lcov"; + description = "A luacov reporter for use with lcov"; + maintainers = with lib.maintainers; [ ulysseszhan ]; + license.fullName = "MIT"; + }; + } + ) { }; + luadbi = callPackage ( { buildLuarocksPackage, @@ -4061,6 +4193,39 @@ final: prev: { } ) { }; + nginx-lua-prometheus = callPackage ( + { + buildLuarocksPackage, + fetchFromGitHub, + fetchurl, + luaOlder, + }: + buildLuarocksPackage { + pname = "nginx-lua-prometheus"; + version = "0.20240525-1"; + knownRockspec = + (fetchurl { + url = "mirror://luarocks/nginx-lua-prometheus-0.20240525-1.rockspec"; + sha256 = "0xw21h7bl7l8kijbmw98v0lc7910r5pwnx7h3w894dv63d413ixr"; + }).outPath; + src = fetchFromGitHub { + owner = "knyar"; + repo = "nginx-lua-prometheus"; + tag = "0.20240525"; + hash = "sha256-ovLpOQKgTfrrgCxCF/OtdPUuAQ9J4RtT9F68Bbzu1XQ="; + }; + + disabled = luaOlder "5.1"; + + meta = { + homepage = "https://github.com/knyar/nginx-lua-prometheus"; + description = "Prometheus metric library for Nginx"; + maintainers = with lib.maintainers; [ ulysseszhan ]; + license.fullName = "MIT"; + }; + } + ) { }; + nlua = callPackage ( { buildLuarocksPackage, diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index a0d13262625d..5d401efb4f74 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -10,6 +10,7 @@ coreutils, curl, dbus, + enet, expat, fd, fetchFromGitHub, @@ -147,6 +148,32 @@ in ''; }); + enet = prev.enet.overrideAttrs (old: { + postPatch = '' + # luaL_checkint is removed in Lua 5.3, and luaL_register is removed in Lua 5.4 + sed -i '/#include "lauxlib.h"/a\ + #if LUA_VERSION_NUM >= 502\ + #define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n)))\ + #define luaL_register(L,n,f) ((n) ? luaL_newlib(L,f) : luaL_setfuncs(L,f,0))\ + #endif + ' enet.c + ''; + buildInputs = old.buildInputs ++ [ enet ]; + }); + + etlua = prev.etlua.overrideAttrs { + postPatch = '' + # unpack was deleted in Lua 5.2 + sed -i '1i unpack = unpack or table.unpack' spec/etlua_spec.moon + ''; + doCheck = luaOlder "5.5"; # some dependency of moonscript does not support Lua 5.5 + preCheck = "moonc spec/etlua_spec.moon"; + nativeCheckInputs = [ + final.bustedCheckHook + final.moonscript + ]; + }; + fzf-lua = prev.fzf-lua.overrideAttrs { # FIXME: https://github.com/NixOS/nixpkgs/issues/431458 # fzf-lua throws `address already in use` on darwin