From feae5405da2fc6c0f184698ead363e56f9db7bd4 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 6 Sep 2022 02:18:21 +0200 Subject: [PATCH] luaPackages: update and adding a few neovim plugins - had to disable the failing lush-nvim tests (it can't find vim.api.nvim_command for a myssterious reason). --- maintainers/scripts/luarocks-packages.csv | 1 + .../lua-modules/generated-packages.nix | 162 +++++++++++++----- pkgs/development/lua-modules/overrides.nix | 4 + 3 files changed, 127 insertions(+), 40 deletions(-) diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index 6e867e7fc539..650a7d94c4de 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -78,6 +78,7 @@ luazip,,,,,, lua-yajl,,,,,,pstn luuid,,,,,, luv,,,,1.43.0-0,, +lush.nvim,https://github.com/rktjmp/lush.nvim,,,,,teto lyaml,,,,,,lblasc markdown,,,,,, mediator_lua,,,,,, diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index cb81b97d0327..2065c3ebd2d5 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -153,7 +153,7 @@ buildLuarocksPackage { }) {}; busted = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, luasystem, lua-term, luassert, mediator_lua, say, dkjson, penlight, luafilesystem, lua, lua_cliargs +, fetchgit, penlight, luafilesystem, dkjson, lua_cliargs, lua, say, mediator_lua, luasystem, lua-term, luassert }: buildLuarocksPackage { pname = "busted"; @@ -176,7 +176,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ luasystem lua-term luassert mediator_lua say dkjson penlight luafilesystem lua lua_cliargs ]; + propagatedBuildInputs = [ penlight luafilesystem dkjson lua_cliargs lua say mediator_lua luasystem lua-term luassert ]; meta = { homepage = "https://lunarmodules.github.io/busted/"; @@ -186,7 +186,7 @@ buildLuarocksPackage { }) {}; cassowary = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, lua, penlight +, fetchgit, penlight, lua }: buildLuarocksPackage { pname = "cassowary"; @@ -209,7 +209,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ lua penlight ]; + propagatedBuildInputs = [ penlight lua ]; meta = { homepage = "https://github.com/sile-typesetter/cassowary.lua"; @@ -220,7 +220,7 @@ buildLuarocksPackage { }) {}; cldr = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, lua, penlight +, fetchgit, penlight, lua }: buildLuarocksPackage { pname = "cldr"; @@ -243,7 +243,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ lua penlight ]; + propagatedBuildInputs = [ penlight lua ]; meta = { homepage = "https://github.com/alerque/cldr-lua"; @@ -399,7 +399,7 @@ buildLuarocksPackage { }) {}; digestif = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, lua, lpeg +, fetchgit, lpeg, lua }: buildLuarocksPackage { pname = "digestif"; @@ -419,7 +419,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.3"); - propagatedBuildInputs = [ lua lpeg ]; + propagatedBuildInputs = [ lpeg lua ]; meta = { homepage = "https://github.com/astoff/digestif/"; @@ -478,7 +478,7 @@ buildLuarocksPackage { }) {}; fluent = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, luaepnf, cldr, lua, penlight +, fetchgit, penlight, cldr, luaepnf, lua }: buildLuarocksPackage { pname = "fluent"; @@ -501,7 +501,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ luaepnf cldr lua penlight ]; + propagatedBuildInputs = [ penlight cldr luaepnf lua ]; meta = { homepage = "https://github.com/alerque/fluent-lua"; @@ -542,7 +542,7 @@ buildLuarocksPackage { }) {}; http = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchzip, luaossl, cqueues, compat53, lpeg, fifo, binaryheap, lpeg_patterns, basexx, bit32, lua +, fetchzip, basexx, lpeg_patterns, compat53, bit32, fifo, lua, binaryheap, cqueues, lpeg, luaossl }: buildLuarocksPackage { pname = "http"; @@ -557,7 +557,7 @@ buildLuarocksPackage { }; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ luaossl cqueues compat53 lpeg fifo binaryheap lpeg_patterns basexx bit32 lua ]; + propagatedBuildInputs = [ basexx lpeg_patterns compat53 bit32 fifo lua binaryheap cqueues lpeg luaossl ]; meta = { homepage = "https://github.com/daurnimator/lua-http"; @@ -626,7 +626,7 @@ buildLuarocksPackage { }) {}; ldoc = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, markdown, penlight +, fetchgit, penlight, markdown }: buildLuarocksPackage { pname = "ldoc"; @@ -645,7 +645,7 @@ buildLuarocksPackage { } '') ["date" "path"]) ; - propagatedBuildInputs = [ markdown penlight ]; + propagatedBuildInputs = [ penlight markdown ]; meta = { homepage = "https://github.com/lunarmodules/LDoc"; @@ -847,7 +847,7 @@ buildLuarocksPackage { }) {}; lpeg_patterns = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchzip, lpeg, lua +, fetchzip, lua, lpeg }: buildLuarocksPackage { pname = "lpeg_patterns"; @@ -861,7 +861,7 @@ buildLuarocksPackage { sha256 = "1s3c179a64r45ffkawv9dnxw4mzwkzj00nr9z2gs5haajgpjivw6"; }; - propagatedBuildInputs = [ lpeg lua ]; + propagatedBuildInputs = [ lua lpeg ]; meta = { homepage = "https://github.com/daurnimator/lpeg_patterns/archive/v0.5.zip"; @@ -1112,7 +1112,7 @@ buildLuarocksPackage { }) {}; lua-lsp = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, dkjson, inspect, lua, lpeglabel +, fetchgit, lua, inspect, lpeglabel, dkjson }: buildLuarocksPackage { pname = "lua-lsp"; @@ -1135,7 +1135,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1") || (luaAtLeast "5.4"); - propagatedBuildInputs = [ dkjson inspect lua lpeglabel ]; + propagatedBuildInputs = [ lua inspect lpeglabel dkjson ]; meta = { homepage = "https://github.com/Alloyed/lua-lsp"; @@ -1237,7 +1237,7 @@ buildLuarocksPackage { }) {}; lua-resty-jwt = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, lua-resty-openssl, lua +, fetchgit, lua, lua-resty-openssl }: buildLuarocksPackage { pname = "lua-resty-jwt"; @@ -1260,7 +1260,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ lua-resty-openssl lua ]; + propagatedBuildInputs = [ lua lua-resty-openssl ]; meta = { homepage = "https://github.com/cdbattags/lua-resty-jwt"; @@ -1270,7 +1270,7 @@ buildLuarocksPackage { }) {}; lua-resty-openidc = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, lua-resty-session, lua-resty-jwt, lua-resty-http, lua +, fetchgit, lua-resty-http, lua-resty-jwt, lua-resty-session, lua }: buildLuarocksPackage { pname = "lua-resty-openidc"; @@ -1293,7 +1293,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ lua-resty-session lua-resty-jwt lua-resty-http lua ]; + propagatedBuildInputs = [ lua-resty-http lua-resty-jwt lua-resty-session lua ]; meta = { homepage = "https://github.com/zmartzone/lua-resty-openidc"; @@ -1572,7 +1572,7 @@ buildLuarocksPackage { }) {}; luacheck = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, argparse, luafilesystem, lua +, fetchgit, lua, luafilesystem, argparse }: buildLuarocksPackage { pname = "luacheck"; @@ -1595,7 +1595,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ argparse luafilesystem lua ]; + propagatedBuildInputs = [ lua luafilesystem argparse ]; meta = { homepage = "https://github.com/lunarmodules/luacheck"; @@ -1671,7 +1671,7 @@ buildLuarocksPackage { }) {}; luadbi-mysql = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, luadbi, lua +, fetchgit, lua, luadbi }: buildLuarocksPackage { pname = "luadbi-mysql"; @@ -1694,7 +1694,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1") || (luaAtLeast "5.4"); - propagatedBuildInputs = [ luadbi lua ]; + propagatedBuildInputs = [ lua luadbi ]; meta = { homepage = "https://github.com/mwild1/luadbi"; @@ -1704,7 +1704,7 @@ buildLuarocksPackage { }) {}; luadbi-postgresql = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, lua, luadbi +, fetchgit, luadbi, lua }: buildLuarocksPackage { pname = "luadbi-postgresql"; @@ -1727,7 +1727,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1") || (luaAtLeast "5.4"); - propagatedBuildInputs = [ lua luadbi ]; + propagatedBuildInputs = [ luadbi lua ]; meta = { homepage = "https://github.com/mwild1/luadbi"; @@ -1985,7 +1985,7 @@ buildLuarocksPackage { }) {}; luaposix = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchzip, bit32, lua +, fetchzip, lua, bit32 }: buildLuarocksPackage { pname = "luaposix"; @@ -2000,7 +2000,7 @@ buildLuarocksPackage { }; disabled = with lua; (luaOlder "5.1") || (luaAtLeast "5.4"); - propagatedBuildInputs = [ bit32 lua ]; + propagatedBuildInputs = [ lua bit32 ]; meta = { homepage = "http://github.com/luaposix/luaposix/"; @@ -2036,7 +2036,7 @@ buildLuarocksPackage { }) {}; luasec = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, luasocket, lua +, fetchgit, lua, luasocket }: buildLuarocksPackage { pname = "luasec"; @@ -2059,7 +2059,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ luasocket lua ]; + propagatedBuildInputs = [ lua luasocket ]; meta = { homepage = "https://github.com/brunoos/luasec/wiki"; @@ -2304,6 +2304,38 @@ buildLuarocksPackage { }; }) {}; +lush-nvim = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast +, fetchgit, lua +, moonscript}: +buildLuarocksPackage { + pname = "lush.nvim"; + version = "scm-1"; + + src = fetchgit ( removeAttrs (builtins.fromJSON ''{ + "url": "https://github.com/rktjmp/lush.nvim", + "rev": "6b9f399245de7bea8dac2c3bf91096ffdedfcbb7", + "date": "2022-08-10T01:43:55+10:00", + "path": "/nix/store/ljfhbz8s6pjnngbixk3m6ivpb7nx1gv0-lush.nvim", + "sha256": "0rb77rwmbm438bmbjfk5hwrrcn5sihsa1413bdpc27rw3rrn8v8z", + "fetchLFS": false, + "fetchSubmodules": true, + "deepClone": false, + "leaveDotGit": false +} + '') ["date" "path"]) ; + + disabled = with lua; (luaOlder "5.1") || (luaAtLeast "5.4"); + propagatedBuildInputs = [ lua ]; + checkInputs = [ moonscript ]; + + meta = { + homepage = "https://github.com/rktjmp/lush.nvim"; + description = "Define Neovim themes as a DSL in lua, with real-time feedback."; + maintainers = with lib.maintainers; [ teto ]; + license.fullName = "MIT/X11"; + }; +}) {}; + luuid = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast , fetchurl, lua }: @@ -2440,7 +2472,7 @@ buildLuarocksPackage { }) {}; moonscript = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, lua, luafilesystem, argparse, lpeg +, fetchgit, lua, luafilesystem, lpeg, argparse }: buildLuarocksPackage { pname = "moonscript"; @@ -2460,7 +2492,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ lua luafilesystem argparse lpeg ]; + propagatedBuildInputs = [ lua luafilesystem lpeg argparse ]; meta = { homepage = "http://moonscript.org"; @@ -2493,7 +2525,7 @@ buildLuarocksPackage { }) {}; nvim-client = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchurl, luv, mpack, lua, coxpcall +, fetchurl, coxpcall, luv, mpack, lua }: buildLuarocksPackage { pname = "nvim-client"; @@ -2505,7 +2537,7 @@ buildLuarocksPackage { }; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ luv mpack lua coxpcall ]; + propagatedBuildInputs = [ coxpcall luv mpack lua ]; meta = { homepage = "https://github.com/neovim/lua-client"; @@ -2514,8 +2546,33 @@ buildLuarocksPackage { }; }) {}; +nvim-cmp = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast +, fetchzip, lua +}: +buildLuarocksPackage { + pname = "nvim-cmp"; + version = "0.0.1-2"; + knownRockspec = (fetchurl { + url = "mirror://luarocks/nvim-cmp-0.0.1-2.rockspec"; + sha256 = "0jx4i2rnc7zmy1bbqp6fqymlklc7xvqyv35prjl3ld05c4dpg7nq"; + }).outPath; + src = fetchzip { + url = "http://github.com/hrsh7th/nvim-cmp/archive/v0.0.1.zip"; + sha256 = "0649n476jd6dqd79fmywmigz19sb0s344ablwr25gr23fp46hzaz"; + }; + + disabled = with lua; (luaOlder "5.1") || (luaAtLeast "5.4"); + propagatedBuildInputs = [ lua ]; + + meta = { + homepage = "https://github.com/hrsh7th/nvim-cmp"; + description = "A completion plugin for neovim"; + license.fullName = "MIT"; + }; +}) {}; + penlight = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, lua, luafilesystem +, fetchgit, luafilesystem, lua , busted}: buildLuarocksPackage { pname = "penlight"; @@ -2535,7 +2592,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ lua luafilesystem ]; + propagatedBuildInputs = [ luafilesystem lua ]; checkInputs = [ busted ]; meta = { @@ -2632,6 +2689,31 @@ buildLuarocksPackage { }; }) {}; +rest-nvim = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast +, fetchzip, lua, plenary-nvim +}: +buildLuarocksPackage { + pname = "rest.nvim"; + version = "0.1-2"; + knownRockspec = (fetchurl { + url = "mirror://luarocks/rest.nvim-0.1-2.rockspec"; + sha256 = "0l8k91483nz75ijgnyfb8r7mynsaps7ikvjkziimf62bv7aks3qh"; + }).outPath; + src = fetchzip { + url = "http://github.com/rest-nvim/rest.nvim/archive/0.1.zip"; + sha256 = "0yf1a1cjrrzw0wmjgg48g3qn9kfxn7hv38yx88l1sc1r1nsfijrq"; + }; + + disabled = with lua; (luaOlder "5.1") || (luaAtLeast "5.4"); + propagatedBuildInputs = [ lua plenary-nvim ]; + + meta = { + homepage = "https://github.com/rest-nvim/rest.nvim"; + description = "A fast Neovim http client written in Lua"; + license.fullName = "MIT"; + }; +}) {}; + say = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast , fetchgit, lua , busted}: @@ -2817,7 +2899,7 @@ buildLuarocksPackage { }) {}; tl = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, argparse, compat53, luafilesystem +, fetchgit, compat53, luafilesystem, argparse , dkjson}: buildLuarocksPackage { pname = "tl"; @@ -2839,7 +2921,7 @@ buildLuarocksPackage { } '') ["date" "path"]) ; - propagatedBuildInputs = [ argparse compat53 luafilesystem ]; + propagatedBuildInputs = [ compat53 luafilesystem argparse ]; checkInputs = [ dkjson ]; meta = { diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 60fcf2ca1ca5..1e46a23a21cc 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -94,6 +94,10 @@ with prev; ]; }); + lush-nvim = prev.lib.overrideLuarocks prev.lush-nvim (drv: rec { + doCheck = false; + }); + ljsyscall = prev.lib.overrideLuarocks prev.ljsyscall (drv: rec { version = "unstable-20180515"; # package hasn't seen any release for a long time