lua51Packages.libluv: cross-test with lua51Packages.luv

Update bot creates PRs for `lua51Packages.libluv` even though the main
package is luv. This commit adds luv to libluv's tests to ensure that
both are tested during automatic updates.
This commit is contained in:
Stanislav Asunkin
2026-04-18 11:06:30 +03:00
parent 9a1f54e48f
commit 642a04a669
2 changed files with 22 additions and 12 deletions
+17 -12
View File
@@ -68,18 +68,23 @@ buildLuarocksPackage rec {
disabled = luaOlder "5.1";
passthru = {
tests.test =
runCommand "luv-${version}-test"
{
nativeBuildInputs = [ (lua.withPackages (ps: [ ps.luv ])) ];
}
''
lua <<EOF
local uv = require("luv")
assert(uv.fs_mkdir(assert(uv.os_getenv("out")), 493))
print(uv.version_string())
EOF
'';
tests = {
test =
runCommand "luv-${version}-test"
{
nativeBuildInputs = [ (lua.withPackages (ps: [ ps.luv ])) ];
}
''
lua <<EOF
local uv = require("luv")
assert(uv.fs_mkdir(assert(uv.os_getenv("out")), 493))
print(uv.version_string())
EOF
'';
# Test libluv too
inherit (lua.pkgs) libluv;
};
updateScript = nix-update-script { };
};
+5
View File
@@ -34,4 +34,9 @@ stdenv.mkDerivation {
cmake
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ];
passthru.tests = {
# Test luv too
luv = lua.pkgs.luv.passthru.tests.test;
};
}