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

@ -346,26 +346,6 @@ 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";
@ -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";
@ -508,20 +508,54 @@ 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";

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";