git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #62756 from teto/luaposix

Luaposix and mpack updates

commit6cd4281c5e444c0ed07f2e8e2f89a7b241715c2e authorMatthieu Coudron <mattator@gmail.com> dateThu 6 Jun 2019, 15:14 (7 years ago) parent8b3d0b02d77d62
3 files changed+29−75
maintainers/scripts/luarocks-packages.csv+2−1 pkgs/development/lua-modules/generated-packages.nix+27−2 pkgs/top-level/lua-packages.nix−72
maintainers/scripts/luarocks-packages.csv+2−1
@@ -29,6 +29,7 @@ luabitop,,,,,
2929luaevent,,,,,
3030luacheck,,,,,
3131luaffi,,http://luarocks.org/dev,,,
32+luaposix,,,,,vyp lblasc
3233luazip,,,,,
3334luuid,,,,,
3435markdown,,,,,
@@ -40,7 +41,7 @@ std_normalize,std.normalize,,,,
4041luv,,,,,
4142luasystem,,,,,
4243mediator_lua,,http://luarocks.org/manifests/teto,,,
43−mpack,,http://luarocks.org/manifests/teto,,,
44+mpack,,,,,
4445nvim-client,,,,,
4546busted,,http://luarocks.org/manifests/teto,,,
4647luassert,,,,,
pkgs/development/lua-modules/generated-packages.nix+27−2
@@ -633,6 +633,25 @@ luaffi = buildLuarocksPackage {
633633 };
634634 };
635635};
636+luaposix = buildLuarocksPackage {
637+ pname = "luaposix";
638+ version = "34.0.4-1";
639+
640+ src = fetchurl {
641+ url = https://luarocks.org/luaposix-34.0.4-1.src.rock;
642+ sha256 = "0yrm5cn2iyd0zjd4liyj27srphvy0gjrjx572swar6zqr4dwjqp2";
643+ };
644+ disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
645+ propagatedBuildInputs = [ bit32 lua std_normalize ];
646+
647+ meta = {
648+ homepage = "http://github.com/luaposix/luaposix/";
649+ description = "Lua bindings for POSIX";
650+ license = {
651+ fullName = "MIT/X11";
652+ };
653+ };
654+};
636655luazip = buildLuarocksPackage {
637656 pname = "luazip";
638657 version = "1.2.7-1";
@@ -857,11 +876,17 @@ mpack = buildLuarocksPackage {
857876 pname = "mpack";
858877 version = "1.0.7-0";
859878
879+ knownRockspec = (fetchurl {
880+ url = https://luarocks.org/mpack-1.0.7-0.rockspec;
881+ sha256 = "1sdw8qsni3g3fx9jnc5g64nxfw6v3n1rrw1xa3bkwc9wk815lqnz";
882+ }).outPath;
883+
860884 src = fetchurl {
861− url = http://luarocks.org/manifests/teto/mpack-1.0.7-0.src.rock;
862− sha256 = "0nq4ixaminkc7fwfpivysyv0al3j5dffsvgdrnwnqdg3w7jgfbw7";
885+ url = https://github.com/libmpack/libmpack-lua/releases/download/1.0.7/libmpack-lua-1.0.7.tar.gz;
886+ sha256 = "1s4712ig3l4ds65pmlyg3r5zids2snn1rv8vsmmk27a4lf258mk8";
863887 };
864888
889+
865890 meta = {
866891 homepage = "https://github.com/libmpack/libmpack-lua/releases/download/1.0.7/libmpack-lua-1.0.7.tar.gz";
867892 description = "Lua binding to libmpack";
pkgs/top-level/lua-packages.nix−72
@@ -345,40 +345,6 @@ with self; {
345345 };
346346 };
347347
348− luaposix = buildLuaPackage rec {
349− name = "posix-${version}";
350− version = "34.0.4";
351−
352− src = fetchFromGitHub {
353− owner = "luaposix";
354− repo = "luaposix";
355− rev = "release-v${version}";
356− sha256 = "0p5583vidsm7s97zihf47c34vscwgbl86axrnj44j328v45kxb2z";
357− };
358−
359− propagatedBuildInputs = [ std_normalize bit32 ];
360−
361− buildPhase = ''
362− ${lua}/bin/lua build-aux/luke \
363− package="luaposix" \
364− version="${version}"
365− '';
366−
367− installPhase = ''
368− ${lua}/bin/lua build-aux/luke install --quiet \
369− INST_LIBDIR="$out/lib/lua/${lua.luaversion}" \
370− INST_LUADIR="$out/share/lua/${lua.luaversion}"
371− '';
372−
373− meta = with stdenv.lib; {
374− description = "Lua bindings for POSIX API";
375− homepage = "https://github.com/luaposix/luaposix";
376− license = licenses.mit;
377− maintainers = with maintainers; [ vyp lblasc ];
378− platforms = platforms.unix;
379− };
380− };
381−
382348 luasec = buildLuaPackage rec {
383349 name = "sec-0.8";
384350
@@ -620,44 +586,6 @@ with self; {
620586 };
621587 };
622588
623− mpack = buildLuaPackage rec {
624− name = "mpack-${version}";
625− version = "1.0.7";
626−
627− src = fetchFromGitHub {
628− owner = "libmpack";
629− repo = "libmpack-lua";
630− rev = version;
631− sha256 = "0l4k7qmwaa0zpxrlp27yp4pbbyiz3zgxywkm543q6wkzn6wmq8l8";
632− };
633−
634− nativeBuildInputs = [ pkgconfig ];
635− buildInputs = [ libmpack ];
636− dontBuild = true;
637−
638− postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
639− substituteInPlace Makefile \
640− --replace '-shared' '-bundle -undefined dynamic_lookup -all_load'
641− '';
642−
643− installFlags = [
644− "USE_SYSTEM_LUA=yes"
645− "USE_SYSTEM_MPACK=yes"
646− "MPACK_LUA_VERSION=${lua.version}"
647− "LUA_CMOD_INSTALLDIR=$(out)/lib/lua/${lua.luaversion}"
648− ];
649−
650− hardeningDisable = [ "fortify" ];
651−
652− meta = with stdenv.lib; {
653− description = "Lua bindings for libmpack";
654− homepage = "https://github.com/libmpack/libmpack-lua";
655− license = licenses.mit;
656− maintainers = with maintainers; [ vyp ];
657− platforms = with platforms; linux ++ darwin;
658− };
659− };
660−
661589 vicious = toLuaModule(stdenv.mkDerivation rec {
662590 name = "vicious-${version}";
663591 version = "2.3.1";