about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2019-02-13 13:44:35 +0000
committerGitHub <noreply@github.com>2019-02-13 13:44:35 +0000
commit96479afd7fd6e297b6bfdd31f7069c9236319707 (patch)
treeafc0a2bd96749557ca1491952fa2a5684d6e8120
parentc00b84adfc1f63f859a9f3042291a1409601f091 (diff)
parent0cb3ee3bdeb333b7e157fc950e8c1163fffcf3a8 (diff)
downloadnixlib-96479afd7fd6e297b6bfdd31f7069c9236319707.tar
nixlib-96479afd7fd6e297b6bfdd31f7069c9236319707.tar.gz
nixlib-96479afd7fd6e297b6bfdd31f7069c9236319707.tar.bz2
nixlib-96479afd7fd6e297b6bfdd31f7069c9236319707.tar.lz
nixlib-96479afd7fd6e297b6bfdd31f7069c9236319707.tar.xz
nixlib-96479afd7fd6e297b6bfdd31f7069c9236319707.tar.zst
nixlib-96479afd7fd6e297b6bfdd31f7069c9236319707.zip
Merge pull request #55680 from teto/lua_whitelist
Lua: autogenerate some more packages
-rw-r--r--maintainers/scripts/luarocks-packages.csv5
-rw-r--r--pkgs/development/lua-modules/generated-packages.nix110
-rw-r--r--pkgs/development/lua-modules/overrides.nix14
-rw-r--r--pkgs/top-level/lua-packages.nix152
4 files changed, 129 insertions, 152 deletions
diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv
index 1144bc723254..0f3db834fc29 100644
--- a/maintainers/scripts/luarocks-packages.csv
+++ b/maintainers/scripts/luarocks-packages.csv
@@ -7,12 +7,17 @@ fifo
 inspect
 lgi
 lpeg_patterns
+lpty
 lrexlib-gnu,
 lrexlib-posix,
 ltermbox,
 lua-cmsgpack,
 lua_cliargs,
+lua-iconv,
 lua-term,
+luabitop,
+luaevent,
+luacheck
 luaffi,http://luarocks.org/dev,
 luuid,
 penlight,
diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix
index b7224aa334db..7da4a9eeddf3 100644
--- a/pkgs/development/lua-modules/generated-packages.nix
+++ b/pkgs/development/lua-modules/generated-packages.nix
@@ -190,6 +190,26 @@ lpeg_patterns = buildLuarocksPackage {
     };
   };
 };
+lpty = buildLuarocksPackage {
+  pname = "lpty";
+  version = "1.2.2-1";
+
+  src =  fetchurl {
+      url    = https://luarocks.org/lpty-1.2.2-1.src.rock;
+      sha256 = "1vxvsjgjfirl6ranz6k4q4y2dnxqh72bndbk400if22x8lqbkxzm";
+   };
+  disabled = ( luaOlder "5.1");
+  propagatedBuildInputs = [lua  ];
+  buildType="make";
+
+  meta = {
+    homepage = "http://www.tset.de/lpty/";
+    description="A simple facility for lua to control other programs via PTYs.";
+    license = {
+      fullName = "MIT";
+    };
+  };
+};
 lrexlib-gnu = buildLuarocksPackage {
   pname = "lrexlib-gnu";
   version = "2.9.0-1";
@@ -300,6 +320,26 @@ lua_cliargs = buildLuarocksPackage {
     };
   };
 };
+lua-iconv = buildLuarocksPackage {
+  pname = "lua-iconv";
+  version = "7-3";
+
+  src =  fetchurl {
+      url    = https://luarocks.org/lua-iconv-7-3.src.rock;
+      sha256 = "03xibhcqwihyjhxnzv367q4bfmzmffxl49lmjsq77g0prw8v0q83";
+   };
+  disabled = ( luaOlder "5.1");
+  propagatedBuildInputs = [lua  ];
+  buildType="builtin";
+
+  meta = {
+    homepage = "http://ittner.github.com/lua-iconv/";
+    description="Lua binding to the iconv";
+    license = {
+      fullName = "MIT/X11";
+    };
+  };
+};
 lua-term = buildLuarocksPackage {
   pname = "lua-term";
   version = "0.7-1";
@@ -326,6 +366,76 @@ lua-term = buildLuarocksPackage {
     };
   };
 };
+luaevent = buildLuarocksPackage {
+  pname = "luaevent";
+  version = "0.4.6-1";
+
+  src =  fetchurl {
+      url    = https://luarocks.org/luaevent-0.4.6-1.src.rock;
+      sha256 = "0chq09nawiz00lxd6pkdqcb8v426gdifjw6js3ql0lx5vqdkb6dz";
+   };
+  disabled = ( luaOlder "5.1");
+  propagatedBuildInputs = [lua  ];
+  buildType="builtin";
+
+  meta = {
+    homepage = "https://github.com/harningt/luaevent";
+    description="libevent binding for Lua";
+    license = {
+      fullName = "MIT";
+    };
+  };
+};
+luabitop = buildLuarocksPackage {
+  pname = "luabitop";
+  version = "1.0.2-3";
+
+  knownRockspec = ( fetchurl {
+      url    = https://luarocks.org/luabitop-1.0.2-3.rockspec;
+      sha256 = "07y2h11hbxmby7kyhy3mda64w83p4a6p7y7rzrjqgc0r56yjxhcc";
+   }).outPath;
+
+   src =  fetchgit ( removeAttrs (builtins.fromJSON ''{
+  "url": "git://github.com/LuaDist/luabitop.git",
+  "rev": "81bb23b0e737805442033535de8e6d204d0e5381",
+  "date": "2013-02-18T16:36:42+01:00",
+  "sha256": "0lsc556hlkddjbmcdbg7wc2g55bfy743p8ywdzl8x7kk847r043q",
+  "fetchSubmodules": true
+}
+ '') ["date"]) ;
+
+  disabled = ( luaOlder "5.1") || ( luaAtLeast "5.3");
+  propagatedBuildInputs = [lua  ];
+  buildType="builtin";
+
+  meta = {
+    homepage = "http://bitop.luajit.org/";
+    description="Lua Bit Operations Module";
+    license = {
+      fullName = "MIT/X license";
+    };
+  };
+};
+luacheck = buildLuarocksPackage {
+  pname = "luacheck";
+  version = "0.23.0-1";
+
+  src =  fetchurl {
+      url    = https://luarocks.org/luacheck-0.23.0-1.src.rock;
+      sha256 = "0akj61c7k1na2mggsckvfn9a3ljfp4agnmr9gp3mac4vin99a1cl";
+   };
+  disabled = ( luaOlder "5.1") || ( luaAtLeast "5.4");
+  propagatedBuildInputs = [lua argparse luafilesystem  ];
+  buildType="builtin";
+
+  meta = {
+    homepage = "https://github.com/mpeterv/luacheck";
+    description="A static analyzer and a linter for Lua";
+    license = {
+      fullName = "MIT";
+    };
+  };
+};
 luaffi = buildLuarocksPackage {
   pname = "luaffi";
   version = "scm-1";
diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix
index 1fcc49bf5468..b78f7f9c0079 100644
--- a/pkgs/development/lua-modules/overrides.nix
+++ b/pkgs/development/lua-modules/overrides.nix
@@ -45,6 +45,20 @@ with super;
   lrexlib-gnu = super.lrexlib-gnu.override({
     buildInputs = [ pkgs.gnulib ];
   });
+  luaevent = super.luaevent.override({
+    buildInputs = with pkgs; [ libevent.dev libevent ];
+    propagatedBuildInputs = [ luasocket ];
+    extraConfig = ''
+      variables={
+        EVENT_INCDIR="${pkgs.libevent.dev}/include";
+        EVENT_LIBDIR="${pkgs.libevent}/lib";
+      }
+    '';
+    disabled= luaOlder "5.1" || luaAtLeast "5.4" || isLuaJIT;
+  });
+  lua-iconv = super.lua-iconv.override({
+    buildInputs = [ pkgs.libiconv ];
+  });
   luv = super.luv.overrideAttrs(oa: {
     propagatedBuildInputs = oa.propagatedBuildInputs ++ [ pkgs.libuv ];
   });
diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix
index 7a1738b0f3ee..ed0b919fd690 100644
--- a/pkgs/top-level/lua-packages.nix
+++ b/pkgs/top-level/lua-packages.nix
@@ -167,43 +167,6 @@ with self; {
     };
   };
 
-  luabitop = buildLuaPackage rec {
-    version = "1.0.2";
-    name = "bitop-${version}";
-
-    src = fetchurl {
-      url = "http://bitop.luajit.org/download/LuaBitOp-${version}.tar.gz";
-      sha256 = "16fffbrgfcw40kskh2bn9q7m3gajffwd2f35rafynlnd7llwj1qj";
-    };
-
-    buildFlags = stdenv.lib.optionalString stdenv.isDarwin "macosx";
-
-    disabled = isLua53;
-
-    postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
-      substituteInPlace Makefile --replace 10.4 10.5
-    '';
-
-    preBuild = ''
-      makeFlagsArray=(
-        ${stdenv.lib.optionalString stdenv.cc.isClang "CC=$CC"}
-        INCLUDES="-I${lua}/include"
-        LUA="${lua}/bin/lua");
-    '';
-
-    installPhase = ''
-      mkdir -p $out/lib/lua/${lua.luaversion}
-      install -p bit.so $out/lib/lua/${lua.luaversion}
-    '';
-
-    meta = with stdenv.lib; {
-      description = "C extension module for Lua which adds bitwise operations on numbers";
-      homepage = "http://bitop.luajit.org";
-      license = licenses.mit;
-      maintainers = with maintainers; [ ];
-    };
-  };
-
   http = buildLuaPackage rec {
     version = "0.2";
     name = "http-${version}";
@@ -236,36 +199,6 @@ with self; {
     };
   };
 
-  luacheck = buildLuaPackage rec {
-    pname = "luacheck";
-    version = "0.20.0";
-    name = "${pname}-${version}";
-
-    src = fetchFromGitHub {
-      owner = "mpeterv";
-      repo = "luacheck";
-      rev = "${version}";
-      sha256 = "0ahfkmqcjhlb7r99bswy1sly6d7p4pyw5f4x4fxnxzjhbq0c5qcs";
-    };
-
-    propagatedBuildInputs = [ lua ];
-
-    # No Makefile.
-    dontBuild = true;
-
-    installPhase = ''
-      ${lua}/bin/lua install.lua $out
-    '';
-
-    meta = with stdenv.lib; {
-      description = "A tool for linting and static analysis of Lua code";
-      homepage = https://github.com/mpeterv/luacheck;
-      license = licenses.mit;
-      maintainers = with maintainers; [ vyp ];
-      platforms = platforms.unix;
-    };
-  };
-
   luacyrussasl = buildLuaPackage rec {
     version = "1.1.0";
     name = "lua-cyrussasl-${version}";
@@ -295,37 +228,6 @@ with self; {
     };
   };
 
-  luaevent = buildLuaPackage rec {
-    version = "0.4.4";
-    name = "luaevent-${version}";
-
-    src = fetchFromGitHub {
-      owner = "harningt";
-      repo = "luaevent";
-      rev = "v${version}";
-      sha256 = "1krzxr0jkv3gmhpckp02byhdd9s5dd0hpyqc8irc8i79dd8x0p53";
-    };
-
-    preBuild = ''
-      makeFlagsArray=(
-        INSTALL_DIR_LUA="$out/share/lua/${lua.luaversion}"
-        INSTALL_DIR_BIN="$out/lib/lua/${lua.luaversion}"
-        LUA_INC_DIR="${lua}/include"
-      );
-    '';
-
-    buildInputs = [ libevent ];
-
-    propagatedBuildInputs = [ luasocket ];
-
-    meta = with stdenv.lib; {
-      homepage = http://luaforge.net/projects/luaevent/;
-      description = "Binding of libevent to Lua";
-      license = licenses.mit;
-      maintainers = with maintainers; [ koral ];
-    };
-  };
-
   luaexpat = buildLuaPackage rec {
     version = "1.3.0";
     name = "expat-${version}";
@@ -482,60 +384,6 @@ with self; {
     };
   };
 
-  lpty = buildLuaPackage rec {
-    version = "1.2.1";
-    name = "lpty-${version}";
-
-    src = fetchurl {
-      url = "http://www.tset.de/downloads/lpty-${version}-1.tar.gz";
-      sha256 = "0rgvbpymcgdkzdwfag607xfscs9xyqxg0dj0qr5fv906mi183gs6";
-    };
-
-    preBuild = ''
-      makeFlagsArray=(
-        INST_LIBDIR="$out/lib/lua/${lua.luaversion}"
-        INST_LUADIR="$out/share/lua/${lua.luaversion}"
-        LUA_BINDIR="${lua}/bin"
-        LUA_INCDIR="-I${lua}/include"
-        LUA_LIBDIR="-L${lua}/lib"
-        );
-    '';
-
-    meta = with stdenv.lib; {
-      description = "PTY control for Lua";
-      homepage = "http://www.tset.de/lpty";
-      license = licenses.mit;
-      maintainers = with maintainers; [ vyp ];
-      platforms = platforms.linux;
-    };
-  };
-
-  lua-iconv = buildLuaPackage rec {
-    name = "lua-iconv-${version}";
-    version = "7";
-
-    src = fetchFromGitHub {
-      owner = "ittner";
-      repo = "lua-iconv";
-      rev = name;
-      sha256 = "0rd76966qlxfp8ypkyrbif76nxnm1acclqwfs45wz3972jsk654i";
-    };
-
-    preBuild = ''
-      makeFlagsArray=(
-        INSTALL_PATH="$out/lib/lua/${lua.luaversion}"
-      );
-    '';
-
-    meta = with stdenv.lib; {
-      description = "Lua bindings for POSIX iconv";
-      homepage = "https://ittner.github.io/lua-iconv/";
-      license = licenses.mit;
-      maintainers = with maintainers; [ richardipsum ];
-      platforms = platforms.unix;
-    };
-  };
-
   luasec = buildLuaPackage rec {
     name = "sec-0.6";