luaPackages.{bcrypt,enet,etlua,luacov-reporter-lcov,nginx-lua-prometheus}: init (#501454)

This commit is contained in:
Matthieu Coudron 2026-03-21 00:34:49 +00:00 committed by GitHub
commit 28afc93f3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 197 additions and 0 deletions

View file

@ -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,

1 name rockspec ref server version luaversion maintainers
3 ansicolors Freed-Wu
4 argparse
5 basexx
6 bcrypt ulysseszhan
7 binaryheap vcunat
8 bit32 5.1 lblasc
9 busted
19 datafile
20 digestif 5.3
21 dkjson
22 enet ulysseszhan
23 etlua ulysseszhan
24 fennel misterio77
25 fidget.nvim 5.1 mrcjkb
26 fifo
76 luabitop https://raw.githubusercontent.com/teto/luabitop/master/luabitop-1.0.2-3.rockspec
77 luacheck
78 luacov
79 luacov-reporter-lcov ulysseszhan
80 luadbi
81 luadbi-mysql
82 luadbi-postgresql
128 neorg 5.1 GaetanLepage
129 neorg-interim-ls
130 neotest 5.1 mrcjkb
131 nginx-lua-prometheus ulysseszhan
132 nlua teto
133 nui.nvim 5.1 mrcjkb
134 nvim-cmp https://raw.githubusercontent.com/hrsh7th/nvim-cmp/main/nvim-cmp-scm-1.rockspec 5.1

View file

@ -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,

View file

@ -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