luaPackages.libuv: bump to v1.43.0
as required by neovim master
This commit is contained in:
parent
8bb4179147
commit
2e5732b320
|
@ -2029,21 +2029,31 @@ buildLuarocksPackage {
|
|||
}) {};
|
||||
|
||||
luv = callPackage ({ buildLuarocksPackage, luaOlder, luaAtLeast
|
||||
, fetchurl, lua
|
||||
, cmake, fetchurl, lua
|
||||
}:
|
||||
buildLuarocksPackage {
|
||||
pname = "luv";
|
||||
version = "1.43.0-0";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/luv-1.43.0-0.rockspec";
|
||||
url = "https://luarocks.org/luv-1.43.0-0.rockspec";
|
||||
sha256 = "0z5a7yp20xbb3f9w73skm9fj89gxxqv72nrxjq3kycsc6c2v3m8f";
|
||||
}).outPath;
|
||||
src = fetchurl {
|
||||
url = "https://github.com/luvit/luv/releases/download/1.43.0-0/luv-1.43.0-0.tar.gz";
|
||||
sha256 = "1qlx1r79sfn8r20yx19bhdr0v58ykpwgwzy5vma9p2ngrlynyyjn";
|
||||
};
|
||||
|
||||
src = fetchgit ( removeAttrs (builtins.fromJSON ''{
|
||||
"url": "https://github.com/luvit/luv.git",
|
||||
"rev": "1.43.0-0",
|
||||
"date": "2022-03-12T16:05:50+08:00",
|
||||
"path": "/nix/store/d7f3sdw5l0cm8xkjdm4m6jkmx794w48j-luv",
|
||||
"sha256": "sha256-CcUX69XzgWlJEwHUhhtqs9sDA5TNIusKek5yV2Nt3Wc=",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": true,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
'') ["date" "path"]) ;
|
||||
|
||||
disabled = with lua; (luaOlder "5.1");
|
||||
nativeBuildInputs = [ cmake ];
|
||||
propagatedBuildInputs = [ lua ];
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -280,34 +280,47 @@ with prev;
|
|||
'';
|
||||
});
|
||||
|
||||
luv = prev.lib.overrideLuarocks prev.luv (drv: {
|
||||
# Use system libuv instead of building local and statically linking
|
||||
# This is a hacky way to specify -DWITH_SHARED_LIBUV=ON which
|
||||
# is not possible with luarocks and the current luv rockspec
|
||||
# While at it, remove bundled libuv source entirely to be sure.
|
||||
# We may wish to drop bundled lua submodules too...
|
||||
preBuild = ''
|
||||
sed -i 's,\(option(WITH_SHARED_LIBUV.*\)OFF,\1ON,' CMakeLists.txt
|
||||
rm -rf deps/libuv
|
||||
'';
|
||||
|
||||
# as advised in https://github.com/luarocks/luarocks/issues/1402
|
||||
# we shouldn't use luarocks machinery to build complex cmake components
|
||||
libluv = pkgs.stdenv.mkDerivation {
|
||||
|
||||
inherit (prev.luv) pname version meta src;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DBUILD_MODULE=OFF"
|
||||
"-DWITH_SHARED_LIBUV=ON"
|
||||
];
|
||||
|
||||
buildInputs = [ pkgs.libuv ];
|
||||
|
||||
passthru = {
|
||||
libluv = final.luv.overrideAttrs (oa: {
|
||||
preBuild = final.luv.preBuild + ''
|
||||
sed -i 's,\(option(BUILD_MODULE.*\)ON,\1OFF,' CMakeLists.txt
|
||||
sed -i 's,\(option(BUILD_SHARED_LIBS.*\)OFF,\1ON,' CMakeLists.txt
|
||||
sed -i 's,${"\${.*INSTALL_INC_DIR}"},${placeholder "out"}/include/luv,' CMakeLists.txt
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkgs.fixDarwinDylibNames ];
|
||||
|
||||
nativeBuildInputs = [ pkgs.pkg-config pkgs.fixDarwinDylibNames pkgs.cmake ];
|
||||
# Fixup linking libluv.dylib, for some reason it's not linked against lua correctly.
|
||||
NIX_LDFLAGS = pkgs.lib.optionalString pkgs.stdenv.isDarwin
|
||||
(if isLuaJIT then "-lluajit-${lua.luaversion}" else "-llua");
|
||||
});
|
||||
};
|
||||
|
||||
luv = prev.lib.overrideLuarocks prev.luv (drv: {
|
||||
|
||||
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 = ''
|
||||
unset LUA_PATH
|
||||
rm tests/test-{dns,thread}.lua
|
||||
lua tests/run.lua
|
||||
'';
|
||||
|
||||
passthru.libluv = final.libluv;
|
||||
|
||||
});
|
||||
|
||||
lyaml = prev.lib.overrideLuarocks prev.lyaml (oa: {
|
||||
|
|
Loading…
Reference in a new issue