From 704358dcb586731b83ee3db4a8def665f9d314d6 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Wed, 5 Jun 2019 13:21:38 +0900 Subject: [PATCH] luaPackages.luazip: 2007-10-30 -> 1.2.7 --- maintainers/scripts/luarocks-packages.csv | 1 + .../lua-modules/generated-packages.nix | 19 +++++++++++++ pkgs/development/lua-modules/overrides.nix | 3 +++ pkgs/top-level/lua-packages.nix | 27 ------------------- 4 files changed, 23 insertions(+), 27 deletions(-) diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index c76374022020..a5fa409a301f 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -28,6 +28,7 @@ luabitop,,,, luaevent,,,, luacheck,,,, luaffi,,http://luarocks.org/dev,, +luazip,,,, luuid,,,, markdown,,,, penlight,,,, diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 8797aab422fe..9f24f7efe0ab 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -614,6 +614,25 @@ luaffi = buildLuarocksPackage { }; }; }; +luazip = buildLuarocksPackage { + pname = "luazip"; + version = "1.2.7-1"; + + src = fetchurl { + url = https://luarocks.org/luazip-1.2.7-1.src.rock; + sha256 = "1yprlr1ap6bhshhy88qfphmmyg9zp1py2hj2158iw6vsva0fk03l"; + }; + disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); + propagatedBuildInputs = [ lua ]; + + meta = { + homepage = "https://github.com/mpeterv/luazip"; + description = "Library for reading files inside zip files"; + license = { + fullName = "MIT"; + }; + }; +}; luuid = buildLuarocksPackage { pname = "luuid"; version = "20120509-2"; diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 935de7cf0159..78639b4ffd37 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -46,6 +46,9 @@ with super; lua-iconv = super.lua-iconv.override({ buildInputs = [ pkgs.libiconv ]; }); + luazip = super.luazip.override({ + buildInputs = [ pkgs.zziplib ]; + }); luv = super.luv.overrideAttrs(oa: { # Use system libuv instead of building local and statically linking # This is a hacky way to specify -DWITH_SHARED_LIBUV=ON which diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index 7c9a4bbe5838..b5439e551bac 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -482,33 +482,6 @@ with self; { }; }; - luazip = buildLuaPackage rec { - name = "zip-${version}"; - version = "2007-10-30"; - - src = fetchFromGitHub { - owner = "luaforge"; - repo = "luazip"; - rev = "0b8f5c958e170b1b49f05bc267bc0351ad4dfc44"; - sha256 = "0zrrwhmzny5zbpx91bjbl77gzkvvdi3qhhviliggp0aj8w3faxsr"; - }; - - buildInputs = [ zziplib ]; - - patches = [ ../development/lua-modules/zip.patch ]; - - # Does not currently work under Lua 5.2 or LuaJIT. - disabled = isLua52 || isLua53 || isLuaJIT; - - meta = with stdenv.lib; { - description = "Lua library to read files stored inside zip files"; - homepage = "https://github.com/luaforge/luazip"; - license = licenses.mit; - maintainers = with maintainers; [ vyp ]; - platforms = platforms.linux; - }; - }; - luazlib = buildLuaPackage rec { name = "zlib-${version}"; version = "1.1";