New package: lua-zip-1.2.3

Closes #4138
This commit is contained in:
wyvie 2014-09-18 11:09:43 +04:00 committed by Mateusz Kowalczyk
parent 95c72a5f60
commit 4d5336316c
3 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,28 @@
{ pkgs, stdenv, fetchurl, lua5_1, zziplib }:
stdenv.mkDerivation rec {
version = "1.2.3";
name = "lua-zip-${version}";
isLibrary = true;
src = fetchurl {
url = "https://github.com/luaforge/luazip/archive/0b8f5c958e170b1b49f05bc267bc0351ad4dfc44.zip";
sha256 = "beb9260d606fdd5304aa958d95f0d3c20be7ca0a2cff44e7b75281c138a76a50";
};
buildInputs = [ pkgs.unzip lua5_1 zziplib ];
preBuild = ''
makeFlagsArray=(
PREFIX=$out
LUA_LIBDIR="$out/lib/lua/${lua5_1.luaversion}"
LUA_INC="-I${lua5_1}/include");
'';
patches = [ ./zip.patch ];
meta = {
homepage = "https://github.com/luaforge/luazip";
hydraPlatforms = stdenv.lib.platforms.linux;
license = stdenv.lib.licenses.mit;
};
}

View File

@ -0,0 +1,23 @@
--- a/Makefile 2007-10-30 01:59:10.000000000 +0300
+++ b/Makefile 2014-09-18 11:04:53.176320021 +0400
@@ -6,10 +6,6 @@
include $(CONFIG)
-ifeq "$(LUA_VERSION_NUM)" "500"
-COMPAT_O= $(COMPAT_DIR)/compat-5.1.o
-endif
-
SRCS= src/lua$T.c
OBJS= src/lua$T.o $(COMPAT_O)
@@ -19,9 +15,6 @@
src/$(LIBNAME): $(OBJS)
export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS) -lzzip
-$(COMPAT_DIR)/compat-5.1.o: $(COMPAT_DIR)/compat-5.1.c
- $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c
-
install: src/$(LIBNAME)
mkdir -p $(LUA_LIBDIR)
cp src/$(LIBNAME) $(LUA_LIBDIR)

View File

@ -3721,6 +3721,7 @@ let
lua5_expat = callPackage ../development/interpreters/lua-5/expat.nix {};
lua5_filesystem = callPackage ../development/interpreters/lua-5/filesystem.nix {};
lua51_filesystem = lua5_filesystem.override { lua5=lua5_1; };
lua51_zip = callPackage ../development/interpreters/lua-5/zip.nix { };
lua5_sec = callPackage ../development/interpreters/lua-5/sec.nix { };
luarocks = callPackage ../development/tools/misc/luarocks {