summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2019-06-06 12:00:49 +0900
committerMatthieu Coudron <mattator@gmail.com>2019-06-06 12:12:15 +0900
commitdbf4c8051a022585fb4a923b0a57996fa406e9ae (patch)
tree26368c5ea84cd7719786ee242b2e97316dbf69b0
parent7a35dcef0a3157e925c511cce3cc3ecddd20aba9 (diff)
downloadnixpkgs-dbf4c8051a022585fb4a923b0a57996fa406e9ae.tar
nixpkgs-dbf4c8051a022585fb4a923b0a57996fa406e9ae.tar.gz
nixpkgs-dbf4c8051a022585fb4a923b0a57996fa406e9ae.tar.bz2
nixpkgs-dbf4c8051a022585fb4a923b0a57996fa406e9ae.tar.lz
nixpkgs-dbf4c8051a022585fb4a923b0a57996fa406e9ae.tar.xz
nixpkgs-dbf4c8051a022585fb4a923b0a57996fa406e9ae.tar.zst
nixpkgs-dbf4c8051a022585fb4a923b0a57996fa406e9ae.zip
luaPackages.lua-zlib: 1.1 -> 1.2
Renamed from luazlib to luarocks name lua-zlib.
Move to generated.
-rw-r--r--maintainers/scripts/luarocks-packages.csv1
-rw-r--r--pkgs/development/lua-modules/generated-packages.nix19
-rw-r--r--pkgs/development/lua-modules/overrides.nix4
-rw-r--r--pkgs/tools/typesetting/sile/default.nix4
-rw-r--r--pkgs/top-level/all-packages.nix2
-rw-r--r--pkgs/top-level/lua-packages.nix37
6 files changed, 27 insertions, 40 deletions
diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv
index a5fa409a301..ccd45462f9c 100644
--- a/maintainers/scripts/luarocks-packages.csv
+++ b/maintainers/scripts/luarocks-packages.csv
@@ -24,6 +24,7 @@ lua-lsp,,http://luarocks.org/dev,,
 lua-messagepack,,,,
 lua-term,,,,
 lua-toml,,,,
+lua-zlib,,,,
 luabitop,,,,
 luaevent,,,,
 luacheck,,,,
diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix
index 9f24f7efe0a..1cf47fe2222 100644
--- a/pkgs/development/lua-modules/generated-packages.nix
+++ b/pkgs/development/lua-modules/generated-packages.nix
@@ -528,6 +528,25 @@ lua-toml = buildLuarocksPackage {
     };
   };
 };
+lua-zlib = buildLuarocksPackage {
+  pname = "lua-zlib";
+  version = "1.2-0";
+
+  src = fetchurl {
+    url    = https://luarocks.org/lua-zlib-1.2-0.src.rock;
+    sha256 = "0qa0vnx45nxdj6fqag6fr627zsnd2bmrr9bdbm8jv6lcnyi6nhs2";
+  };
+  disabled = (luaOlder "5.1");
+  propagatedBuildInputs = [ lua ];
+
+  meta = {
+    homepage = "https://github.com/brimworks/lua-zlib";
+    description = "Simple streaming interface to zlib for Lua.";
+    license = {
+      fullName = "MIT";
+    };
+  };
+};
 luabitop = buildLuarocksPackage {
   pname = "luabitop";
   version = "1.0.2-3";
diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix
index 78639b4ffd3..e00a5b904c5 100644
--- a/pkgs/development/lua-modules/overrides.nix
+++ b/pkgs/development/lua-modules/overrides.nix
@@ -32,6 +32,10 @@ with super;
   lrexlib-gnu = super.lrexlib-gnu.override({
     buildInputs = [ pkgs.gnulib ];
   });
+  lua-zlib = super.lua-zlib.override({
+    buildInputs = [ pkgs.zlib.dev ];
+    disabled=luaOlder "5.1" || luaAtLeast "5.4";
+  });
   luaevent = super.luaevent.override({
     buildInputs = with pkgs; [ libevent.dev libevent ];
     propagatedBuildInputs = [ luasocket ];
diff --git a/pkgs/tools/typesetting/sile/default.nix b/pkgs/tools/typesetting/sile/default.nix
index c507db3cf1f..71c2131e57d 100644
--- a/pkgs/tools/typesetting/sile/default.nix
+++ b/pkgs/tools/typesetting/sile/default.nix
@@ -1,5 +1,5 @@
 { stdenv, darwin, fetchurl, makeWrapper, pkgconfig
-, harfbuzz, icu, lpeg, luaexpat, luazlib, luafilesystem, luasocket, luasec
+, harfbuzz, icu, lpeg, luaexpat, lua-zlib, luafilesystem, luasocket, luasec
 , fontconfig, lua, libiconv
 , makeFontsConf, gentium, gentium-book-basic, dejavu_fonts
 }:
@@ -8,7 +8,7 @@ with stdenv.lib;
 
 let
 
-  libs          = [ lpeg luaexpat luazlib luafilesystem luasocket luasec ];
+  libs          = [ lpeg luaexpat lua-zlib luafilesystem luasocket luasec ];
   getPath       = lib : type : "${lib}/lib/lua/${lua.luaversion}/?.${type};${lib}/share/lua/${lua.luaversion}/?.${type}";
   getLuaPath    = lib : getPath lib "lua";
   getLuaCPath   = lib : getPath lib "so";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 747ece02d4a..7b0e1cf58d6 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5838,7 +5838,7 @@ in
   silc_server = callPackage ../servers/silc-server { };
 
   sile = callPackage ../tools/typesetting/sile {
-  inherit (lua52Packages) lua luaexpat luazlib luafilesystem lpeg luasocket luasec;
+  inherit (lua52Packages) lua luaexpat lua-zlib luafilesystem lpeg luasocket luasec;
   };
 
   silver-searcher = callPackage ../tools/text/silver-searcher { };
diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix
index b5439e551ba..bc8d6313579 100644
--- a/pkgs/top-level/lua-packages.nix
+++ b/pkgs/top-level/lua-packages.nix
@@ -482,43 +482,6 @@ with self; {
     };
   };
 
-  luazlib = buildLuaPackage rec {
-    name = "zlib-${version}";
-    version = "1.1";
-
-    src = fetchFromGitHub {
-      owner = "brimworks";
-      repo = "lua-zlib";
-      rev = "v${version}";
-      sha256 = "1520lk4xpf094xn2zallqgqhs0zb4w61l49knv9y8pmhkdkxzzgy";
-    };
-
-    buildInputs = [ zlib ];
-
-    preConfigure = ''
-      substituteInPlace Makefile --replace gcc cc --replace "-llua" ""
-    '';
-
-    preBuild = ''
-      makeFlagsArray=(
-        ${platformString}
-        LUAPATH="$out/share/lua/${lua.luaversion}"
-        LUACPATH="$out/lib/lua/${lua.luaversion}"
-        INCDIR="-I${lua}/include"
-        LIBDIR="-L${lua}/lib");
-    '';
-
-    preInstall = "mkdir -p $out/lib/lua/${lua.luaversion}";
-
-    meta = with stdenv.lib; {
-      description = "Simple streaming interface to zlib for Lua";
-      homepage = https://github.com/brimworks/lua-zlib;
-      license = licenses.mit;
-      maintainers = with maintainers; [ koral ];
-      platforms = platforms.unix;
-    };
-  };
-
 
   luastdlib = buildLuaPackage rec {
     name = "stdlib-${version}";