lua: restore knownRockspec and lgi

- fix std._debug build
- fixed std-normalize
- pinned stdlib since the git version  causes issues with awesome

cleanup
This commit is contained in:
Matthieu Coudron 2021-08-30 21:42:52 +02:00
parent 24ac87c440
commit a2fd477970
4 changed files with 754 additions and 281 deletions

View File

@ -20,6 +20,7 @@ http,,,,0.3-0,,vcunat
inspect,,,,,,
ldbus,,,http://luarocks.org/dev,,,
ldoc,https://github.com/stevedonovan/LDoc.git,,,,,
lgi,,,,,,
linenoise,https://github.com/hoelzro/lua-linenoise.git,,,,,
ljsyscall,,,,,lua5_1,lblasc
lpeg,,,,,,vyp
@ -82,5 +83,5 @@ 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
stdlib,,,,41.2.2,,vyp
vstruct,https://github.com/ToxicFrog/vstruct.git,,,,,

1 name src ref server version luaversion maintainers
20 inspect
21 ldbus http://luarocks.org/dev
22 ldoc https://github.com/stevedonovan/LDoc.git
23 lgi
24 linenoise https://github.com/hoelzro/lua-linenoise.git
25 ljsyscall lua5_1 lblasc
26 lpeg vyp
83 say https://github.com/Olivine-Labs/say.git
84 std._debug https://github.com/lua-stdlib/_debug.git
85 std.normalize git://github.com/lua-stdlib/normalize.git
86 stdlib https://github.com/lua-stdlib/lua-stdlib.git 41.2.2 vyp
87 vstruct https://github.com/ToxicFrog/vstruct.git

View File

@ -165,22 +165,8 @@ builtins.removeAttrs attrs ["disabled" "checkInputs" "externalDeps" "extraVariab
# @-patterns do not capture formal argument default values, so we need to
# explicitly inherit this for it to be available as a shell variable in the
# builder
# inherit rockspecFilename;
inherit rocksSubdir;
# enabled only for src.rock
# 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
@ -194,13 +180,13 @@ builtins.removeAttrs attrs ["disabled" "checkInputs" "externalDeps" "extraVariab
+ lib.optionalString (rockspecFilename == null) ''
rockspecFilename="${generatedRockspecFilename}"
''
# + lib.optionalString (knownRockspec != null) ''
+ lib.optionalString (knownRockspec != null) ''
# # prevents the following type of error:
# # Inconsistency between rockspec filename (42fm1b3d7iv6fcbhgm9674as3jh6y2sh-luv-1.22.0-1.rockspec) and its contents (luv-1.22.0-1.rockspec)
# rockspecFilename="$TMP/$(stripHash ''${knownRockspec})"
# cp ''${knownRockspec} "$rockspecFilename"
# ''
# prevents the following type of error:
# Inconsistency between rockspec filename (42fm1b3d7iv6fcbhgm9674as3jh6y2sh-luv-1.22.0-1.rockspec) and its contents (luv-1.22.0-1.rockspec)
rockspecFilename="$TMP/$(stripHash ''${knownRockspec})"
cp ''${knownRockspec} "$rockspecFilename"
''
+ ''
runHook postConfigure
'';
@ -239,9 +225,7 @@ builtins.removeAttrs attrs ["disabled" "checkInputs" "externalDeps" "extraVariab
nix_debug "ROCKSPEC $rockspecFilename"
nix_debug "cwd: $PWD"
set -x
$LUAROCKS make --deps-mode=all --tree=$out ''${rockspecFilename}
set +x
runHook postInstall
'';

File diff suppressed because it is too large Load Diff

View File

@ -114,13 +114,13 @@ 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 = ''
@ -349,6 +349,19 @@ with super;
'';
});
std-_debug = super.std-_debug.overrideAttrs(oa: {
# run make to generate lib/std/_debug/version.lua
preConfigure = ''
make all
'';
});
std-normalize = super.std-normalize.overrideAttrs(oa: {
# run make to generate lib/std/_debug/version.lua
preConfigure = ''
make all
'';
});
# aliases
cjson = super.lua-cjson;