luaPackages.luv: fix build
This commit is contained in:
parent
98a90f0891
commit
98f9f1f054
2 changed files with 12 additions and 7 deletions
|
@ -159,7 +159,6 @@ def generate_pkg_nix(plug: LuaPlugin):
|
|||
'''
|
||||
log.debug("Generating nix expression for %s", plug.name)
|
||||
custom_env = os.environ.copy()
|
||||
# TODO check
|
||||
custom_env['LUAROCKS_CONFIG'] = LUAROCKS_CONFIG
|
||||
|
||||
cmd = [ "luarocks", "nix"]
|
||||
|
|
|
@ -332,15 +332,23 @@ with prev;
|
|||
# we shouldn't use luarocks machinery to build complex cmake components
|
||||
libluv = pkgs.stdenv.mkDerivation {
|
||||
|
||||
inherit (prev.luv) pname version meta src;
|
||||
pname = "libluv";
|
||||
inherit (prev.luv) version meta src;
|
||||
|
||||
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"}"
|
||||
];
|
||||
|
||||
buildInputs = [ pkgs.libuv ];
|
||||
# to make sure we dont use bundled deps
|
||||
postUnpack = ''
|
||||
rm -rf deps/lua deps/libuv
|
||||
'';
|
||||
|
||||
buildInputs = [ pkgs.libuv final.lua ];
|
||||
|
||||
nativeBuildInputs = [ pkgs.pkg-config pkgs.cmake ]
|
||||
++ pkgs.lib.optionals pkgs.stdenv.isDarwin [ pkgs.fixDarwinDylibNames ];
|
||||
|
@ -350,18 +358,16 @@ with prev;
|
|||
|
||||
buildInputs = [ pkgs.pkg-config pkgs.libuv ];
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
# Use system libuv instead of building local and statically linking
|
||||
extraVariables = {
|
||||
"WITH_SHARED_LIBUV" = "ON";
|
||||
};
|
||||
|
||||
# we unset the LUA_PATH since the hook erases the interpreter defaults (To fix)
|
||||
installCheckPhase = ''
|
||||
# tests is not run since they are not part of the tarball anymore
|
||||
preCheck = ''
|
||||
unset LUA_PATH
|
||||
rm tests/test-{dns,thread}.lua
|
||||
lua tests/run.lua
|
||||
'';
|
||||
|
||||
passthru.libluv = final.libluv;
|
||||
|
|
Loading…
Reference in a new issue