diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index 1144bc723254..df403296ccd2 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -13,6 +13,7 @@ ltermbox, lua-cmsgpack, lua_cliargs, lua-term, +luaevent, 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..494a0e34a386 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -326,6 +326,26 @@ 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"; + }; + }; +}; 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..4d2178906c72 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -45,6 +45,17 @@ 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; + }); 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..347393511e6a 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -295,37 +295,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}";