luaPackages.luv: 1.48.0-2 -> 1.50.0-1 (#393966)

authored by Gaétan Lepage and committed by GitHub d12267ab 4ff605f9

+134 -85
-1
maintainers/scripts/luarocks-packages.csv
··· 106 106 lusc_luv,,,,,, 107 107 lush.nvim,,,https://luarocks.org/dev,,,teto 108 108 luuid,,,,20120509-2,, 109 - luv,,,,1.48.0-2,, 110 109 lyaml,,,,,,lblasc 111 110 lz.n,,,,,,mrcjkb 112 111 lze,,,,,,birdee
-31
pkgs/development/lua-modules/generated-packages.nix
··· 3491 3491 } 3492 3492 ) { }; 3493 3493 3494 - luv = callPackage ( 3495 - { 3496 - buildLuarocksPackage, 3497 - cmake, 3498 - fetchurl, 3499 - luaOlder, 3500 - }: 3501 - buildLuarocksPackage { 3502 - pname = "luv"; 3503 - version = "1.48.0-2"; 3504 - knownRockspec = 3505 - (fetchurl { 3506 - url = "mirror://luarocks/luv-1.48.0-2.rockspec"; 3507 - sha256 = "0353bjn9z90a1hd7rksdfrd9fbdd31hbvdaxr1fb0fh0bc1cpy94"; 3508 - }).outPath; 3509 - src = fetchurl { 3510 - url = "https://github.com/luvit/luv/releases/download/1.48.0-2/luv-1.48.0-2.tar.gz"; 3511 - sha256 = "0yivq14dw0vjyl8ibrgdgrj9fbhjyy4yf3m4jc15bxmlxggisfic"; 3512 - }; 3513 - 3514 - disabled = luaOlder "5.1"; 3515 - nativeBuildInputs = [ cmake ]; 3516 - 3517 - meta = { 3518 - homepage = "https://github.com/luvit/luv"; 3519 - description = "Bare libuv bindings for lua"; 3520 - license.fullName = "Apache 2.0"; 3521 - }; 3522 - } 3523 - ) { }; 3524 - 3525 3494 lyaml = callPackage ( 3526 3495 { 3527 3496 buildLuarocksPackage,
+95
pkgs/development/lua-modules/luv/default.nix
··· 1 + { 2 + lib, 3 + buildLuarocksPackage, 4 + cmake, 5 + fetchFromGitHub, 6 + libuv, 7 + lua, 8 + luaOlder, 9 + nix-update-script, 10 + runCommand, 11 + }: 12 + 13 + buildLuarocksPackage rec { 14 + pname = "luv"; 15 + version = "1.50.0-1"; 16 + 17 + src = fetchFromGitHub { 18 + owner = "luvit"; 19 + repo = "luv"; 20 + rev = version; 21 + # Need deps/lua-compat-5.3 only 22 + fetchSubmodules = true; 23 + hash = "sha256-PS3+qpELpX0tr7UqrlnE4NYScJb50j+9J4fbH9CTr/s="; 24 + }; 25 + 26 + # to make sure we dont use bundled deps 27 + prePatch = '' 28 + rm -rf deps/lua deps/luajit deps/libuv 29 + ''; 30 + 31 + buildInputs = [ libuv ]; 32 + nativeBuildInputs = [ cmake ]; 33 + 34 + # Need to specify WITH_SHARED_LIBUV=ON cmake flag, but 35 + # Luarocks doesn't take cmake variables from luarocks config. 36 + # Need to specify it in rockspec. See https://github.com/luarocks/luarocks/issues/1160. 37 + knownRockspec = runCommand "luv-${version}.rockspec" { } '' 38 + patch ${src}/luv-scm-0.rockspec -o - > $out <<'EOF' 39 + --- a/luv-scm-0.rockspec 40 + +++ b/luv-scm-0.rockspec 41 + @@ -1,5 +1,5 @@ 42 + package = "luv" 43 + -version = "scm-0" 44 + +version = "${version}" 45 + source = { 46 + url = 'git://github.com/luvit/luv.git' 47 + } 48 + @@ -24,6 +24,7 @@ 49 + build = 50 + type = 'cmake', 51 + variables = { 52 + + WITH_SHARED_LIBUV="ON", 53 + CMAKE_C_FLAGS="$(CFLAGS)", 54 + CMAKE_MODULE_LINKER_FLAGS="$(LIBFLAG)", 55 + LUA_LIBDIR="$(LUA_LIBDIR)", 56 + EOF 57 + ''; 58 + 59 + doInstallCheck = true; 60 + installCheckPhase = '' 61 + rm tests/test-{dns,thread,tty}.lua 62 + luarocks test 63 + ''; 64 + 65 + disabled = luaOlder "5.1"; 66 + 67 + passthru = { 68 + tests.test = 69 + runCommand "luv-${version}-test" 70 + { 71 + nativeBuildInputs = [ (lua.withPackages (ps: [ ps.luv ])) ]; 72 + } 73 + '' 74 + lua <<EOF 75 + local uv = require("luv") 76 + assert(uv.fs_mkdir(assert(uv.os_getenv("out")), 493)) 77 + print(uv.version_string()) 78 + EOF 79 + ''; 80 + 81 + updateScript = nix-update-script { }; 82 + }; 83 + 84 + meta = { 85 + homepage = "https://github.com/luvit/luv"; 86 + description = "Bare libuv bindings for lua"; 87 + longDescription = '' 88 + This library makes libuv available to lua scripts. It was made for the luvit 89 + project but should usable from nearly any lua project. 90 + ''; 91 + license = lib.licenses.asl20; 92 + maintainers = with lib.maintainers; [ stasjok ]; 93 + platforms = lua.meta.platforms; 94 + }; 95 + }
+36
pkgs/development/lua-modules/luv/lib.nix
··· 1 + { 2 + lib, 3 + cmake, 4 + fixDarwinDylibNames, 5 + isLuaJIT, 6 + libuv, 7 + lua, 8 + stdenv, 9 + }: 10 + 11 + stdenv.mkDerivation { 12 + pname = "libluv"; 13 + inherit (lua.pkgs.luv) version src meta; 14 + 15 + cmakeFlags = [ 16 + "-DBUILD_SHARED_LIBS=ON" 17 + "-DBUILD_MODULE=OFF" 18 + "-DWITH_SHARED_LIBUV=ON" 19 + "-DLUA_BUILD_TYPE=System" 20 + "-DWITH_LUA_ENGINE=${if isLuaJIT then "LuaJit" else "Lua"}" 21 + ]; 22 + 23 + # to make sure we dont use bundled deps 24 + prePatch = '' 25 + rm -rf deps/lua deps/luajit deps/libuv 26 + ''; 27 + 28 + buildInputs = [ 29 + libuv 30 + lua 31 + ]; 32 + 33 + nativeBuildInputs = [ 34 + cmake 35 + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; 36 + }
-53
pkgs/development/lua-modules/overrides.nix
··· 15 15 fetchFromGitHub, 16 16 fetchpatch, 17 17 fetchurl, 18 - fixDarwinDylibNames, 19 18 fzf, 20 19 glib, 21 20 glibc, ··· 33 32 libpsl, 34 33 libpq, 35 34 libuuid, 36 - libuv, 37 35 libxcrypt, 38 36 libyaml, 39 37 lua-language-server, ··· 843 841 rm tests/plenary/job_spec.lua tests/plenary/scandir_spec.lua tests/plenary/curl_spec.lua 844 842 make test 845 843 runHook postCheck 846 - ''; 847 - }); 848 - 849 - # as advised in https://github.com/luarocks/luarocks/issues/1402#issuecomment-1080616570 850 - # we shouldn't use luarocks machinery to build complex cmake components 851 - libluv = stdenv.mkDerivation { 852 - 853 - pname = "libluv"; 854 - inherit (prev.luv) version meta src; 855 - 856 - cmakeFlags = [ 857 - "-DBUILD_SHARED_LIBS=ON" 858 - "-DBUILD_MODULE=OFF" 859 - "-DWITH_SHARED_LIBUV=ON" 860 - "-DLUA_BUILD_TYPE=System" 861 - "-DWITH_LUA_ENGINE=${if isLuaJIT then "LuaJit" else "Lua"}" 862 - ]; 863 - 864 - # to make sure we dont use bundled deps 865 - postUnpack = '' 866 - rm -rf deps/lua deps/libuv 867 - ''; 868 - 869 - buildInputs = [ 870 - libuv 871 - final.lua 872 - ]; 873 - 874 - nativeBuildInputs = [ 875 - pkg-config 876 - cmake 877 - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; 878 - }; 879 - 880 - luv = prev.luv.overrideAttrs (oa: { 881 - 882 - nativeBuildInputs = oa.nativeBuildInputs ++ [ pkg-config ]; 883 - buildInputs = [ libuv ]; 884 - 885 - # Use system libuv instead of building local and statically linking 886 - luarocksConfig = lib.recursiveUpdate oa.luarocksConfig { 887 - variables = { 888 - WITH_SHARED_LIBUV = "ON"; 889 - }; 890 - }; 891 - 892 - # we unset the LUA_PATH since the hook erases the interpreter defaults (To fix) 893 - # tests is not run since they are not part of the tarball anymore 894 - preCheck = '' 895 - unset LUA_PATH 896 - rm tests/test-{dns,thread}.lua 897 844 ''; 898 845 }); 899 846
+3
pkgs/top-level/lua-packages.nix
··· 205 205 } 206 206 ) { }; 207 207 208 + luv = callPackage ../development/lua-modules/luv { }; 209 + libluv = callPackage ../development/lua-modules/luv/lib.nix { }; 210 + 208 211 luxio = callPackage ( 209 212 { 210 213 fetchurl,