1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00

luaPackages: update

This commit is contained in:
Matthieu Coudron 2021-08-16 17:44:40 +02:00
parent 7292ed91df
commit 15e5c92495
6 changed files with 462 additions and 466 deletions

View file

@ -1,89 +1,88 @@
name,server,version,luaversion,maintainers
alt-getopt,,,,arobyn
ansicolors,,,,
bit32,,5.3.0-1,lua5_1,lblasc
argparse,,,,
basexx,,,,
binaryheap,,,,vcunat
busted,,,,
cassowary,,,,marsam alerque
compat53,,0.7-1,,vcunat
cosmo,,,,marsam
coxpcall,,1.17.0-1,,
cqueues,,,,vcunat
cyrussasl,,,,
digestif,,0.2-1,lua5_3,
dkjson,,,,
fifo,,,,
gitsigns.nvim,,,lua5_1,
http,,0.3-0,,vcunat
inspect,,,,
ldbus,http://luarocks.org/dev,,,
ldoc,,,,
lgi,,,,
linenoise,,,,
ljsyscall,,,lua5_1,lblasc
lpeg,,,,vyp
lpeg_patterns,,,,
lpeglabel,,,,
lpty,,,,
lrexlib-gnu,,,,
lrexlib-pcre,,,,vyp
lrexlib-posix,,,,
ltermbox,,,,
lua-cjson,,,,
lua-cmsgpack,,,,
lua-iconv,,,,
lua-lsp,http://luarocks.org/dev,,,
lua-messagepack,,,,
lua-resty-http,,,,
lua-resty-jwt,,,,
lua-resty-openidc,,,,
lua-resty-openssl,,,,
lua-resty-session,,,,
lua-term,,,,
lua-toml,,,,
lua-zlib,,,,koral
lua_cliargs,,,,
luabitop,,,,
luacheck,,,,
luacov,,,,
luadbi,,,,
luadbi-mysql,,,,
luadbi-postgresql,,,,
luadbi-sqlite3,,,,
luadoc,,,,
luaepnf,,,,
luaevent,,,,
luaexpat,,1.3.0-1,,arobyn flosse
luaffi,http://luarocks.org/dev,,,
luafilesystem,,1.7.0-2,,flosse
lualogging,,,,
luaossl,,,lua5_1,
luaposix,,34.1.1-1,,vyp lblasc
luarepl,,,,
luasec,,,,flosse
luasocket,,,,
luasql-sqlite3,,,,vyp
luassert,,,,
luasystem,,,,
luautf8,,,,pstn
luazip,,,,
lua-yajl,,,,pstn
luuid,,,,
luv,,1.30.0-0,,
lyaml,,,,lblasc
markdown,,,,
mediator_lua,,,,
mpack,,,,
moonscript,,,,arobyn
nvim-client,,,,
penlight,,,,
plenary.nvim,,,lua5_1,
rapidjson,,,,
readline,,,,
say,,,,
std._debug,,,,
std.normalize,,,,
stdlib,,,,vyp
vstruct,,,,
name,src,ref,server,version,luaversion,maintainers
alt-getopt,,,,,,arobyn
ansicolors,https://github.com/kikito/ansicolors.lua,,,,,
bit32,,,,5.3.0-1,lua5_1,lblasc
argparse,https://github.com/luarocks/argparse.git,,,,,
basexx,https://github.com/teto/basexx.git,,,,,
binaryheap,https://github.com/Tieske/binaryheap.lua,,,,,vcunat
busted,,,,,,
cassowary,,,,,,marsam alerque
compat53,,,,0.7-1,,vcunat
cosmo,,,,,,marsam
coxpcall,,,,1.17.0-1,,
cqueues,,,,,,vcunat
cyrussasl,https://github.com/JorjBauer/lua-cyrussasl.git,,,,,
digestif,https://github.com/astoff/digestif.git,,,0.2-1,lua5_3,
dkjson,,,,,,
fifo,,,,,,
gitsigns.nvim,https://github.com/lewis6991/gitsigns.nvim.git,,,,lua5_1,
http,,,,0.3-0,,vcunat
inspect,,,,,,
ldbus,,,http://luarocks.org/dev,,,
ldoc,https://github.com/stevedonovan/LDoc.git,,,,,
linenoise,https://github.com/hoelzro/lua-linenoise.git,,,,,
ljsyscall,,,,,lua5_1,lblasc
lpeg,,,,,,vyp
lpeg_patterns,,,,,,
lpeglabel,,,,,,
lpty,,,,,,
lrexlib-gnu,,,,,,
lrexlib-pcre,,,,,,vyp
lrexlib-posix,,,,,,
ltermbox,,,,,,
lua-cjson,,,,,,
lua-cmsgpack,,,,,,
lua-iconv,,,,,,
lua-lsp,,,,,,
lua-messagepack,,,,,,
lua-resty-http,,,,,,
lua-resty-jwt,,,,,,
lua-resty-openidc,,,,,,
lua-resty-openssl,,,,,,
lua-resty-session,,,,,,
lua-term,,,,,,
lua-toml,,,,,,
lua-zlib,,,,,,koral
lua_cliargs,https://github.com/amireh/lua_cliargs.git,,,,,
luabitop,https://github.com/teto/luabitop.git,,,,,
luacheck,,,,,,
luacov,,,,,,
luadbi,,,,,,
luadbi-mysql,,,,,,
luadbi-postgresql,,,,,,
luadbi-sqlite3,,,,,,
luadoc,,,,,,
luaepnf,,,,,,
luaevent,,,,,,
luaexpat,,,,1.3.0-1,,arobyn flosse
luaffi,,,http://luarocks.org/dev,,,
luafilesystem,,,,1.7.0-2,,flosse
lualogging,,,,,,
luaossl,,,,,lua5_1,
luaposix,,,,34.1.1-1,,vyp lblasc
luarepl,,,,,,
luasec,,,,,,flosse
luasocket,,,,,,
luasql-sqlite3,,,,,,vyp
luassert,,,,,,
luasystem,,,,,,
luautf8,,,,,,pstn
luazip,,,,,,
lua-yajl,,,,,,pstn
luuid,,,,,,
luv,,,,1.30.0-0,,
lyaml,,,,,,lblasc
markdown,,,,,,
mediator_lua,,,,,,
mpack,,,,,,
moonscript,,,,,,arobyn
nvim-client,https://github.com/neovim/lua-client.git,,,,,
penlight,https://github.com/Tieske/Penlight.git,,,,,
plenary.nvim,https://github.com/nvim-lua/plenary.nvim.git,,,,lua5_1,
rapidjson,https://github.com/xpol/lua-rapidjson.git,,,,,
readline,,,,,,
say,https://github.com/Olivine-Labs/say.git,,,,,
std._debug,https://github.com/lua-stdlib/_debug.git,,,,,
std.normalize,git://github.com/lua-stdlib/normalize.git,,,,,
stdlib,https://github.com/lua-stdlib/lua-stdlib.git,,,,,vyp
vstruct,https://github.com/ToxicFrog/vstruct.git,,,,,

1 name src ref server version luaversion maintainers
2 alt-getopt arobyn
3 ansicolors https://github.com/kikito/ansicolors.lua
4 bit32 5.3.0-1 lua5_1 lblasc
5 argparse https://github.com/luarocks/argparse.git
6 basexx https://github.com/teto/basexx.git
7 binaryheap https://github.com/Tieske/binaryheap.lua vcunat
8 busted
9 cassowary marsam alerque
10 compat53 0.7-1 vcunat
11 cosmo marsam
12 coxpcall 1.17.0-1
13 cqueues vcunat
14 cyrussasl https://github.com/JorjBauer/lua-cyrussasl.git
15 digestif https://github.com/astoff/digestif.git 0.2-1 lua5_3
16 dkjson
17 fifo
18 gitsigns.nvim https://github.com/lewis6991/gitsigns.nvim.git lua5_1
19 http 0.3-0 vcunat
20 inspect
21 ldbus http://luarocks.org/dev
22 ldoc https://github.com/stevedonovan/LDoc.git
23 lgi linenoise https://github.com/hoelzro/lua-linenoise.git
24 linenoise ljsyscall lua5_1 lblasc
25 ljsyscall lpeg lua5_1 lblasc vyp
26 lpeg lpeg_patterns vyp
27 lpeg_patterns lpeglabel
28 lpeglabel lpty
29 lpty lrexlib-gnu
30 lrexlib-gnu lrexlib-pcre vyp
31 lrexlib-pcre lrexlib-posix vyp
32 lrexlib-posix ltermbox
33 ltermbox lua-cjson
34 lua-cjson lua-cmsgpack
35 lua-cmsgpack lua-iconv
36 lua-iconv lua-lsp
37 lua-lsp lua-messagepack http://luarocks.org/dev
38 lua-messagepack lua-resty-http
39 lua-resty-http lua-resty-jwt
40 lua-resty-jwt lua-resty-openidc
41 lua-resty-openidc lua-resty-openssl
42 lua-resty-openssl lua-resty-session
43 lua-resty-session lua-term
44 lua-term lua-toml
45 lua-toml lua-zlib koral
46 lua-zlib lua_cliargs https://github.com/amireh/lua_cliargs.git koral
47 lua_cliargs luabitop https://github.com/teto/luabitop.git
48 luabitop luacheck
49 luacheck luacov
50 luacov luadbi
51 luadbi luadbi-mysql
52 luadbi-mysql luadbi-postgresql
53 luadbi-postgresql luadbi-sqlite3
54 luadbi-sqlite3 luadoc
55 luadoc luaepnf
56 luaepnf luaevent
57 luaevent luaexpat 1.3.0-1 arobyn flosse
58 luaexpat luaffi http://luarocks.org/dev 1.3.0-1 arobyn flosse
59 luaffi luafilesystem http://luarocks.org/dev 1.7.0-2 flosse
60 luafilesystem lualogging 1.7.0-2 flosse
61 lualogging luaossl lua5_1
62 luaossl luaposix 34.1.1-1 lua5_1 vyp lblasc
63 luaposix luarepl 34.1.1-1 vyp lblasc
64 luarepl luasec flosse
65 luasec luasocket flosse
66 luasocket luasql-sqlite3 vyp
67 luasql-sqlite3 luassert vyp
68 luassert luasystem
69 luasystem luautf8 pstn
70 luautf8 luazip pstn
71 luazip lua-yajl pstn
72 lua-yajl luuid pstn
73 luuid luv 1.30.0-0
74 luv lyaml 1.30.0-0 lblasc
75 lyaml markdown lblasc
76 markdown mediator_lua
77 mediator_lua mpack
78 mpack moonscript arobyn
79 moonscript nvim-client https://github.com/neovim/lua-client.git arobyn
80 nvim-client penlight https://github.com/Tieske/Penlight.git
81 penlight plenary.nvim https://github.com/nvim-lua/plenary.nvim.git lua5_1
82 plenary.nvim rapidjson https://github.com/xpol/lua-rapidjson.git lua5_1
83 rapidjson readline
84 readline say https://github.com/Olivine-Labs/say.git
85 say std._debug https://github.com/lua-stdlib/_debug.git
86 std._debug std.normalize git://github.com/lua-stdlib/normalize.git
87 std.normalize stdlib https://github.com/lua-stdlib/lua-stdlib.git vyp
88 stdlib vstruct https://github.com/ToxicFrog/vstruct.git vyp
vstruct

View file

@ -1,7 +1,6 @@
#!/usr/bin/env nix-shell
#!nix-shell update-luarocks-shell.nix -i python3
# format:
# $ nix run nixpkgs.python3Packages.black -c black update.py
# type-check:
@ -20,7 +19,7 @@ import logging
import textwrap
from multiprocessing.dummy import Pool
from typing import List, Tuple
from typing import List, Tuple, Optional
from pathlib import Path
log = logging.getLogger()
@ -51,10 +50,21 @@ FOOTER="""
@dataclass
class LuaPlugin:
name: str
version: str
'''Name of the plugin, as seen on luarocks.org'''
src: str
'''address to the git repository'''
ref: str
'''git reference (branch name/tag)'''
version: Optional[str]
'''Set it to pin a package '''
server: str
luaversion: str
maintainers: str
'''luarocks.org registers packages under different manifests.
Its value can be 'http://luarocks.org/dev'
'''
luaversion: Optional[str]
'''Attribue of the lua interpreter if a package is available only for a specific lua version'''
maintainers: Optional[str]
''' Optional string listing maintainers separated by spaces'''
@property
def normalized_name(self) -> str:
@ -150,16 +160,33 @@ def generate_pkg_nix(plug: LuaPlugin):
Our cache key associates "p.name-p.version" to its rockspec
'''
log.debug("Generating nix expression for %s", plug.name)
cmd = [ "luarocks", "nix", plug.name]
cmd = [ "luarocks", "nix"]
if plug.server:
cmd.append(f"--only-server={plug.server}")
if plug.maintainers:
cmd.append(f"--maintainers={plug.maintainers}")
if plug.version:
cmd.append(plug.version)
# updates plugin directly from its repository
print("server: [%s]" % plug.server)
# if plug.server == "src":
if plug.src != "":
if plug.src is None:
msg = "src must be set when 'version' is set to \"src\" for package %s" % plug.name
log.error(msg)
raise RuntimeError(msg)
log.debug("Updating from source %s", plug.src)
cmd.append(plug.src)
# update the plugin from luarocks
else:
cmd.append(plug.name)
if plug.version and plug.version != "src":
cmd.append(plug.version)
#
if plug.server != "src" and plug.server:
cmd.append(f"--only-server={plug.server}")
if plug.luaversion:
with CleanEnvironment():
@ -170,7 +197,7 @@ def generate_pkg_nix(plug: LuaPlugin):
lua_drv_path=subprocess.check_output(cmd2, text=True).strip()
cmd.append(f"--lua-dir={lua_drv_path}/bin")
log.debug("running %s", cmd)
log.debug("running %s", ' '.join(cmd))
output = subprocess.check_output(cmd, text=True)
return (plug, output)
@ -192,3 +219,4 @@ if __name__ == "__main__":
main()
# vim: set ft=python noet fdm=manual fenc=utf-8 ff=unix sts=0 sw=4 ts=4 :

View file

@ -74,7 +74,7 @@ version
# Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
let
generatedRockspecFilename = "${pname}-${version}.rockspec";
generatedRockspecFilename = "${rockspecDir}/${pname}-${version}.rockspec";
# TODO fix warnings "Couldn't load rockspec for ..." during manifest
@ -169,16 +169,17 @@ builtins.removeAttrs attrs ["disabled" "checkInputs" "externalDeps" "extraVariab
inherit rocksSubdir;
# enabled only for src.rock
setSourceRoot= let
# name_only= lib.getName name;
name_only= pname;
in
lib.optionalString (knownRockspec == null) ''
# format is rockspec_basename/source_basename
# rockspec can set it via spec.source.dir
folder=$(find . -mindepth 2 -maxdepth 2 -type d -path '*${name_only}*/*'|head -n1)
sourceRoot="$folder"
'';
# setSourceRoot= let
# # name_only= lib.getName name;
# name_only= pname;
# in
# # if this is a rockFile
# lib.optionalString (knownRockspec == null ) ''
# # format is rockspec_basename/source_basename
# # rockspec can set it via spec.source.dir
# folder=$(find . -mindepth 2 -maxdepth 2 -type d -path '*${name_only}*/*'|head -n1)
# sourceRoot="$folder"
# '';
configurePhase = ''
runHook preConfigure
@ -187,6 +188,7 @@ builtins.removeAttrs attrs ["disabled" "checkInputs" "externalDeps" "extraVariab
${luarocks_content}
EOF
export LUAROCKS_CONFIG="$PWD/${luarocks_config}";
echo "pwd: $PWD"
''
+ lib.optionalString (rockspecFilename == null) ''

File diff suppressed because it is too large Load diff

View file

@ -114,13 +114,18 @@ with super;
pkgs.glib
pkgs.gobject-introspection
];
patches = [
(pkgs.fetchpatch {
name = "lgi-find-cairo-through-typelib.patch";
url = "https://github.com/psychon/lgi/commit/46a163d9925e7877faf8a4f73996a20d7cf9202a.patch";
sha256 = "0gfvvbri9kyzhvq3bvdbj2l6mwvlz040dk4mrd5m9gz79f7w109c";
})
];
# patches = [
# (pkgs.fetchpatch {
# name = "lgi-find-cairo-through-typelib.patch";
# url = "https://github.com/psychon/lgi/commit/46a163d9925e7877faf8a4f73996a20d7cf9202a.patch";
# sha256 = "0gfvvbri9kyzhvq3bvdbj2l6mwvlz040dk4mrd5m9gz79f7w109c";
# })
# ];
# there is only a rockspec.in in the repo, the actual rockspec must be generated
preConfigure = ''
make rock
'';
});
lrexlib-gnu = super.lrexlib-gnu.override({

View file

@ -2,10 +2,19 @@
luarocks.overrideAttrs(old: {
pname = "luarocks-nix";
version = "2021-01-22";
src = fetchFromGitHub {
owner = "nix-community";
repo = "luarocks-nix";
rev = "nix_v3.5.0-1";
sha256 = "sha256-jcgshxAuuc8QizpYL/2K3PKYWiKsnF/8BJAUaryvEvQ=";
};
src = /home/teto/luarocks;
# src = fetchFromGitHub {
# owner = "nix-community";
# repo = "luarocks-nix";
# rev = "test-speedup";
# sha256 = "sha256-AN4D69IUfCnIWmM7CXWmXeNcTgRCIOamfjYEL4ti9CQ=";
# };
patches = [];
# src = builtins.fetchGit {
# url = "https://github.com/nix-community/luarocks-nix.git";
# ref = "test-speedup";
# rev = "f9cb2285fda1d73bfa8ae33b6102b286dbe1f098";
# };
meta.mainProgram = "luarocks";
})