Merge pull request #57945 from teto/lua/std_rename

lua: std._debug / std.normalize rename + move to automated.
This commit is contained in:
Michael Raskin 2019-04-27 06:30:48 +00:00 committed by GitHub
commit eda2463c4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 215 additions and 234 deletions

View File

@ -22,6 +22,8 @@ luaffi,,http://luarocks.org/dev,
luuid,
penlight,
say,
std__debug,std._debug,
std_normalize,std.normalize,
luv,
luasystem,
mediator_lua,,http://luarocks.org/manifests/teto

1 # nix name, luarocks name, server, version/additionnal args
22 luuid,
23 penlight,
24 say,
25 std__debug,std._debug,
26 std_normalize,std.normalize,
27 luv,
28 luasystem,
29 mediator_lua,,http://luarocks.org/manifests/teto

View File

@ -81,7 +81,7 @@ function convert_pkg () {
server=" --server=$3"
fi
version="${3:-}"
version="${4:-}"
echo "looking at $lua_pkg_name (version $version) from server [$server]" >&2
cmd="luarocks nix $server $lua_pkg_name $version"

View File

@ -150,6 +150,9 @@ builtins.removeAttrs attrs ["disabled" "checkInputs"] // {
installPhase = attrs.installPhase or ''
runHook preInstall
# work around failing luarocks test for Write access
mkdir -p $out
# luarocks make assumes sources are available in cwd
# After the build is complete, it also installs the rock.
# If no argument is given, it looks for a rockspec in the current directory

View File

@ -19,8 +19,8 @@ ansicolors = buildLuarocksPackage {
sha256 = "1mhmr090y5394x1j8p44ws17sdwixn5a0r4i052bkfgk3982cqfz";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "https://github.com/kikito/ansicolors.lua";
@ -39,8 +39,8 @@ argparse = buildLuarocksPackage {
sha256 = "10ic5wppyghd1lmgwgl0lb40pv8z9fi9i87080axxg8wsr19y0p4";
};
disabled = ( luaOlder "5.1") || ( luaAtLeast "5.4");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "https://github.com/mpeterv/argparse";
@ -59,8 +59,8 @@ basexx = buildLuarocksPackage {
sha256 = "1px8yrxg1qkk3kzdqj3siry742jdv4ysp2dmicxi15mkynqpjlzz";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "https://github.com/aiq/basexx";
@ -79,8 +79,8 @@ dkjson = buildLuarocksPackage {
sha256 = "1qy9bzqnb9pf9d48hik4iq8h68aw3270kmax7mmpvvpw7kkyp483";
};
disabled = ( luaOlder "5.1") || ( luaAtLeast "5.4");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "http://dkolf.de/src/dkjson-lua.fsl/";
@ -99,8 +99,8 @@ fifo = buildLuarocksPackage {
sha256 = "082c5g1m8brnsqj5gnjs65bm7z50l6b05cfwah14lqaqsr5a5pjk";
};
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "https://github.com/daurnimator/fifo.lua";
@ -119,8 +119,8 @@ inspect = buildLuarocksPackage {
sha256 = "0k4g9ahql83l4r2bykfs6sacf9l1wdpisav2i0z55fyfcdv387za";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "https://github.com/kikito/inspect.lua";
@ -139,8 +139,8 @@ lgi = buildLuarocksPackage {
sha256 = "07ajc5pdavp785mdyy82n0w6d592n96g95cvq025d6i0bcm2cypa";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="make";
propagatedBuildInputs = [ lua ];
buildType = "make";
meta = {
homepage = "https://github.com/pavouk/lgi";
@ -159,8 +159,8 @@ lpeg_patterns = buildLuarocksPackage {
sha256 = "0mlw4nayrsdxrh98i26avz5i4170a9brciybw88kks496ra36v8f";
};
propagatedBuildInputs = [lua lpeg ];
buildType="builtin";
propagatedBuildInputs = [ lua lpeg ];
buildType = "builtin";
meta = {
homepage = "https://github.com/daurnimator/lpeg_patterns/archive/v0.5.zip";
@ -179,8 +179,8 @@ lpty = buildLuarocksPackage {
sha256 = "1vxvsjgjfirl6ranz6k4q4y2dnxqh72bndbk400if22x8lqbkxzm";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="make";
propagatedBuildInputs = [ lua ];
buildType = "make";
meta = {
homepage = "http://www.tset.de/lpty/";
@ -199,8 +199,8 @@ lrexlib-gnu = buildLuarocksPackage {
sha256 = "036rda4rji1pbnbxk1nzjy5zmigdsiacqbzrbvciwq3lrxa2j5s2";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "https://github.com/rrthomas/lrexlib";
@ -219,8 +219,8 @@ lrexlib-posix = buildLuarocksPackage {
sha256 = "0ifpybf4m94g1nk70l0f5m45gph0rbp5wrxrl1hnw8ibv3mc1b1r";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "https://github.com/rrthomas/lrexlib";
@ -239,8 +239,8 @@ ltermbox = buildLuarocksPackage {
sha256 = "08jqlmmskbi1ml1i34dlmg6hxcs60nlm32dahpxhcrgjnfihmyn8";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "http://code.google.com/p/termbox";
@ -254,7 +254,7 @@ lua-cmsgpack = buildLuarocksPackage {
pname = "lua-cmsgpack";
version = "0.4.0-0";
knownRockspec = ( fetchurl {
knownRockspec = (fetchurl {
url = https://luarocks.org/lua-cmsgpack-0.4.0-0.rockspec;
sha256 = "10cvr6knx3qvjcw1q9v05f2qy607mai7lbq321nx682aa0n1fzin";
}).outPath;
@ -269,8 +269,8 @@ lua-cmsgpack = buildLuarocksPackage {
'') ["date"]) ;
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "https://github.com/antirez/lua-cmsgpack";
@ -289,8 +289,8 @@ lua_cliargs = buildLuarocksPackage {
sha256 = "0qqdnw00r16xbyqn4w1xwwpg9i9ppc3c1dcypazjvdxaj899hy9w";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "https://github.com/amireh/lua_cliargs";
@ -309,8 +309,8 @@ lua-iconv = buildLuarocksPackage {
sha256 = "03xibhcqwihyjhxnzv367q4bfmzmffxl49lmjsq77g0prw8v0q83";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "http://ittner.github.com/lua-iconv/";
@ -324,7 +324,7 @@ lua-term = buildLuarocksPackage {
pname = "lua-term";
version = "0.7-1";
knownRockspec = ( fetchurl {
knownRockspec = (fetchurl {
url = https://luarocks.org/lua-term-0.7-1.rockspec;
sha256 = "0r9g5jw7pqr1dyj6w58dqlr7y7l0jp077n8nnji4phf10biyrvg2";
}).outPath;
@ -336,7 +336,7 @@ lua-term = buildLuarocksPackage {
buildType="builtin";
buildType = "builtin";
meta = {
homepage = "https://github.com/hoelzro/lua-term";
@ -346,31 +346,11 @@ lua-term = buildLuarocksPackage {
};
};
};
luaevent = buildLuarocksPackage {
pname = "luaevent";
version = "0.4.6-1";
src = fetchurl {
url = https://luarocks.org/luaevent-0.4.6-1.src.rock;
sha256 = "0chq09nawiz00lxd6pkdqcb8v426gdifjw6js3ql0lx5vqdkb6dz";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
meta = {
homepage = "https://github.com/harningt/luaevent";
description="libevent binding for Lua";
license = {
fullName = "MIT";
};
};
};
luabitop = buildLuarocksPackage {
pname = "luabitop";
version = "1.0.2-3";
knownRockspec = ( fetchurl {
knownRockspec = (fetchurl {
url = https://luarocks.org/luabitop-1.0.2-3.rockspec;
sha256 = "07y2h11hbxmby7kyhy3mda64w83p4a6p7y7rzrjqgc0r56yjxhcc";
}).outPath;
@ -385,8 +365,8 @@ luabitop = buildLuarocksPackage {
'') ["date"]) ;
disabled = ( luaOlder "5.1") || ( luaAtLeast "5.3");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "http://bitop.luajit.org/";
@ -396,6 +376,26 @@ luabitop = buildLuarocksPackage {
};
};
};
luaevent = buildLuarocksPackage {
pname = "luaevent";
version = "0.4.6-1";
src = fetchurl {
url = https://luarocks.org/luaevent-0.4.6-1.src.rock;
sha256 = "0chq09nawiz00lxd6pkdqcb8v426gdifjw6js3ql0lx5vqdkb6dz";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "https://github.com/harningt/luaevent";
description="libevent binding for Lua";
license = {
fullName = "MIT";
};
};
};
luacheck = buildLuarocksPackage {
pname = "luacheck";
version = "0.23.0-1";
@ -405,8 +405,8 @@ luacheck = buildLuarocksPackage {
sha256 = "0akj61c7k1na2mggsckvfn9a3ljfp4agnmr9gp3mac4vin99a1cl";
};
disabled = ( luaOlder "5.1") || ( luaAtLeast "5.4");
propagatedBuildInputs = [lua argparse luafilesystem ];
buildType="builtin";
propagatedBuildInputs = [ lua argparse luafilesystem ];
buildType = "builtin";
meta = {
homepage = "https://github.com/mpeterv/luacheck";
@ -425,8 +425,8 @@ luaffi = buildLuarocksPackage {
sha256 = "0dia66w8sgzw26bwy36gzyb2hyv7kh9n95lh5dl0158rqa6fsf26";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "https://github.com/facebook/luaffifb";
@ -445,8 +445,8 @@ luuid = buildLuarocksPackage {
sha256 = "08q54x0m51w89np3n117h2a153wsgv3qayabd8cz6i55qm544hkg";
};
disabled = ( luaOlder "5.2") || ( luaAtLeast "5.4");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#luuid";
@ -460,7 +460,7 @@ penlight = buildLuarocksPackage {
pname = "penlight";
version = "1.5.4-1";
knownRockspec = ( fetchurl {
knownRockspec = (fetchurl {
url = https://luarocks.org/penlight-1.5.4-1.rockspec;
sha256 = "07mhsk9kmdxg4i2w4mrnnd2zs34bgggi9gigfplakxin96sa6c0p";
}).outPath;
@ -471,8 +471,8 @@ penlight = buildLuarocksPackage {
};
propagatedBuildInputs = [luafilesystem ];
buildType="builtin";
propagatedBuildInputs = [ luafilesystem ];
buildType = "builtin";
meta = {
homepage = "http://stevedonovan.github.com/Penlight";
@ -486,7 +486,7 @@ say = buildLuarocksPackage {
pname = "say";
version = "1.3-1";
knownRockspec = ( fetchurl {
knownRockspec = (fetchurl {
url = https://luarocks.org/say-1.3-1.rockspec;
sha256 = "0bknglb0qwd6r703wp3hcb6z2xxd14kq4md3sg9al3b28fzxbhdv";
}).outPath;
@ -497,8 +497,8 @@ say = buildLuarocksPackage {
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "http://olivinelabs.com/busted/";
@ -508,23 +508,57 @@ say = buildLuarocksPackage {
};
};
};
luv = buildLuarocksPackage {
pname = "luv";
version = "1.22.0-1";
knownRockspec = ( fetchurl {
url = https://luarocks.org/luv-1.22.0-1.rockspec;
sha256 = "0yxjy9wj4aqbv1my8fkciy2xar5si6bcsszipgyls24rl6lnmga3";
}).outPath;
std__debug = buildLuarocksPackage {
pname = "std._debug";
version = "1.0.1-1";
src = fetchurl {
url = https://github.com/luvit/luv/releases/download/1.22.0-1/luv-1.22.0-1.tar.gz;
sha256 = "1xvz4a0r6kd1xqxwm55g9n6imprxb79600x7dhyillrz7p5nm217";
url = https://luarocks.org/std._debug-1.0.1-1.src.rock;
sha256 = "1qkcc5rph3ns9mzrfsa1671pb3hzbzfnaxvyw7zdly2b7ll88svz";
};
disabled = ( luaOlder "5.1") || ( luaAtLeast "5.5");
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "http://lua-stdlib.github.io/_debug";
description="Debug Hints Library";
license = {
fullName = "MIT/X11";
};
};
};
std_normalize = buildLuarocksPackage {
pname = "std.normalize";
version = "2.0.2-1";
src = fetchurl {
url = https://luarocks.org/std.normalize-2.0.2-1.src.rock;
sha256 = "0yn60zqnxflhhlv6xk6w0ifdfxk1qcg8gq1wnrrbwsxwpipsrfjh";
};
disabled = ( luaOlder "5.1") || ( luaAtLeast "5.4");
propagatedBuildInputs = [ lua std__debug ];
buildType = "builtin";
meta = {
homepage = "https://lua-stdlib.github.io/normalize";
description="Normalized Lua Functions";
license = {
fullName = "MIT/X11";
};
};
};
luv = buildLuarocksPackage {
pname = "luv";
version = "1.26.0-0";
src = fetchurl {
url = https://luarocks.org/luv-1.26.0-0.src.rock;
sha256 = "005yzcxlribnc45qr1g7q4psakximb9fbz07k6yzy1d94mhcxxr7";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="cmake";
propagatedBuildInputs = [ lua ];
buildType = "cmake";
meta = {
homepage = "https://github.com/luvit/luv";
@ -543,8 +577,8 @@ luasystem = buildLuarocksPackage {
sha256 = "091xmp8cijgj0yzfsjrn7vljwznjnjn278ay7z9pjwpwiva0diyi";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "http://olivinelabs.com/luasystem/";
@ -563,8 +597,8 @@ mediator_lua = buildLuarocksPackage {
sha256 = "18j49vvs94yfk4fw0xsq4v3j4difr6c99gfba0kxairmcqamd1if";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua ];
buildType="builtin";
propagatedBuildInputs = [ lua ];
buildType = "builtin";
meta = {
homepage = "http://olivinelabs.com/mediator_lua/";
@ -584,7 +618,7 @@ mpack = buildLuarocksPackage {
};
buildType="builtin";
buildType = "builtin";
meta = {
homepage = "https://github.com/libmpack/libmpack-lua/releases/download/1.0.7/libmpack-lua-1.0.7.tar.gz";
@ -603,8 +637,8 @@ nvim-client = buildLuarocksPackage {
sha256 = "1p57mrvm0ny3yi5cydr3z9qwzyg124rjp5w7vdflf2i23z39mkma";
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua mpack luv coxpcall ];
buildType="builtin";
propagatedBuildInputs = [ lua mpack luv coxpcall ];
buildType = "builtin";
meta = {
homepage = "https://github.com/neovim/lua-client/archive/0.1.0-1.tar.gz";
@ -618,7 +652,7 @@ busted = buildLuarocksPackage {
pname = "busted";
version = "2.0.rc13-0";
knownRockspec = ( fetchurl {
knownRockspec = (fetchurl {
url = https://luarocks.org/busted-2.0.rc13-0.rockspec;
sha256 = "0hrvhg1324q5ra6cpjh1y3by6lrzs0ljah4jl48l8xlgw1z9z1q5";
}).outPath;
@ -629,8 +663,8 @@ busted = buildLuarocksPackage {
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua lua_cliargs luafilesystem luasystem dkjson say luassert lua-term penlight mediator_lua ];
buildType="builtin";
propagatedBuildInputs = [ lua lua_cliargs luafilesystem luasystem dkjson say luassert lua-term penlight mediator_lua ];
buildType = "builtin";
meta = {
homepage = "http://olivinelabs.com/busted/";
@ -644,7 +678,7 @@ luassert = buildLuarocksPackage {
pname = "luassert";
version = "1.7.11-0";
knownRockspec = ( fetchurl {
knownRockspec = (fetchurl {
url = https://luarocks.org/luassert-1.7.11-0.rockspec;
sha256 = "12zgybcv8acjzvjdbxd1764s1vxbksxdv9fkvsymcsdmppxkbd0s";
}).outPath;
@ -655,8 +689,8 @@ luassert = buildLuarocksPackage {
};
disabled = ( luaOlder "5.1");
propagatedBuildInputs = [lua say ];
buildType="builtin";
propagatedBuildInputs = [ lua say ];
buildType = "builtin";
meta = {
homepage = "http://olivinelabs.com/busted/";
@ -676,7 +710,7 @@ coxpcall = buildLuarocksPackage {
};
buildType="builtin";
buildType = "builtin";
meta = {
homepage = "http://keplerproject.github.io/coxpcall";

View File

@ -386,7 +386,7 @@ with self; {
sha256 = "0p5583vidsm7s97zihf47c34vscwgbl86axrnj44j328v45kxb2z";
};
propagatedBuildInputs = [ std.normalize bit32 ];
propagatedBuildInputs = [ std_normalize bit32 ];
buildPhase = ''
${lua}/bin/lua build-aux/luke \
@ -782,64 +782,6 @@ with self; {
};
};
std._debug = buildLuaPackage rec {
name = "std._debug-${version}";
version = "1.0";
src = fetchFromGitHub {
owner = "lua-stdlib";
repo = "_debug";
rev = "v${version}";
sha256 = "01kfs6k9j9zy4bvk13jx18ssfsmhlciyrni1x32qmxxf4wxyi65n";
};
# No Makefile.
dontBuild = true;
installPhase = ''
mkdir -p $out/share/lua/${lua.luaversion}/std
cp -r lib/std/_debug $out/share/lua/${lua.luaversion}/std/
'';
meta = with stdenv.lib; {
description = "Manage an overall debug state, and associated hint substates.";
homepage = https://lua-stdlib.github.io/_debug;
license = licenses.mit;
maintainers = with maintainers; [ lblasc ];
platforms = platforms.unix;
};
};
std.normalize = buildLuaPackage rec {
name = "std.normalize-${version}";
version = "2.0.1";
src = fetchFromGitHub {
owner = "lua-stdlib";
repo = "normalize";
rev = "v${version}";
sha256 = "1yz96r28d2wcgky6by92a21755bf4wzpn65rdv2ps0fxywgw5rda";
};
propagatedBuildInputs = [ std._debug ];
# No Makefile.
dontBuild = true;
installPhase = ''
mkdir -p $out/share/lua/${lua.luaversion}/std
cp -r lib/std/normalize $out/share/lua/${lua.luaversion}/std/
'';
meta = with stdenv.lib; {
description = "Normalized Lua Functions";
homepage = https://lua-stdlib.github.io/normalize;
license = licenses.mit;
maintainers = with maintainers; [ lblasc ];
platforms = platforms.unix;
};
};
vicious = toLuaModule(stdenv.mkDerivation rec {
name = "vicious-${version}";
version = "2.3.1";