Files
nixpkgs/pkgs/development/lua-modules/luv/lib.nix
Stanislav Asunkin 642a04a669 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.
2026-04-18 11:06:30 +03:00

43 lines
722 B
Nix

{
lib,
cmake,
fixDarwinDylibNames,
isLuaJIT,
libuv,
lua,
stdenv,
}:
stdenv.mkDerivation {
pname = "libluv";
inherit (lua.pkgs.luv) version src meta;
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DBUILD_MODULE=OFF"
"-DWITH_SHARED_LIBUV=ON"
"-DLUA_BUILD_TYPE=System"
"-DWITH_LUA_ENGINE=${if isLuaJIT then "LuaJit" else "Lua"}"
];
# to make sure we dont use bundled deps
prePatch = ''
rm -rf deps/lua deps/luajit deps/libuv
'';
buildInputs = [
libuv
lua
];
nativeBuildInputs = [
cmake
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ];
passthru.tests = {
# Test luv too
luv = lua.pkgs.luv.passthru.tests.test;
};
}