From e333259769a465709c1b36150a908717824d575f Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 9 Apr 2023 10:24:49 +0300 Subject: [PATCH] luaPackages.lua-curl: init at 0.3.13 --- maintainers/scripts/luarocks-packages.csv | 1 + .../lua-modules/generated-packages.nix | 23 +++++++++++++++++++ pkgs/development/lua-modules/overrides.nix | 7 ++++++ 3 files changed, 31 insertions(+) diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index 514a96700956..e93ceeebc94f 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -40,6 +40,7 @@ lrexlib-pcre,,,,,,vyp lrexlib-posix,,,,,, lua-cjson,,,,,, lua-cmsgpack,,,,,, +lua-curl,,,,,, lua-iconv,,,,,, lua-lsp,,,,,, lua-messagepack,,,,,, diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index f42987787492..10601dbd7a4a 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -1121,6 +1121,29 @@ buildLuarocksPackage { }; }) {}; +lua-curl = callPackage({ lua, buildLuarocksPackage, fetchzip, luaOlder, luaAtLeast }: +buildLuarocksPackage { + pname = "lua-curl"; + version = "0.3.13-1"; + knownRockspec = (fetchurl { + url = "mirror://luarocks/lua-curl-0.3.13-1.rockspec"; + sha256 = "0lz534sm35hxazf1w71hagiyfplhsvzr94i6qyv5chjfabrgbhjn"; + }).outPath; + src = fetchzip { + url = "https://github.com/Lua-cURL/Lua-cURLv3/archive/v0.3.13.zip"; + sha256 = "0gn59bwrnb2mvl8i0ycr6m3jmlgx86xlr9mwnc85zfhj7zhi5anp"; + }; + + disabled = (luaOlder "5.1") || (luaAtLeast "5.5"); + propagatedBuildInputs = [ lua ]; + + meta = { + homepage = "https://github.com/Lua-cURL"; + description = "Lua binding to libcurl"; + license.fullName = "MIT/X11"; + }; +}) {}; + lua-iconv = callPackage({ fetchurl, lua, buildLuarocksPackage, luaOlder }: buildLuarocksPackage { pname = "lua-iconv"; diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 419842a09677..78bb87b66eb4 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -1,6 +1,7 @@ # do not add pkgs, it messes up splicing { stdenv , cmake +, curl , cyrus_sasl , dbus , expat @@ -255,6 +256,12 @@ with prev; ]; }); + lua-curl = prev.luaLib.overrideLuarocks prev.lua-curl (drv: { + buildInputs = [ + curl + ]; + }); + lua-iconv = prev.luaLib.overrideLuarocks prev.lua-iconv (drv: { buildInputs = [ libiconv