From f30319b36f78dfd2042babdf9487f589f52127c7 Mon Sep 17 00:00:00 2001 From: "Matthieu C." <886074+teto@users.noreply.github.com> Date: Sat, 15 Feb 2025 17:29:41 +0100 Subject: [PATCH] lua51Packages.lualine-nvim: init vimPlugins.lualine-nvim: use buildNeovimPlugin instead now packaged from lua --- maintainers/scripts/luarocks-packages.csv | 1 + .../editors/vim/plugins/generated.nix | 13 ---------- .../editors/vim/plugins/overrides.nix | 1 + .../editors/vim/plugins/vim-plugin-names | 1 - .../lua-modules/generated-packages.nix | 25 +++++++++++++++++++ pkgs/development/lua-modules/overrides.nix | 16 ++++++++++++ 6 files changed, 43 insertions(+), 14 deletions(-) diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index ac2e23de5076..43768e64261d 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -81,6 +81,7 @@ luaexpat,,,,1.4.1-1,,arobyn flosse luaffi,,,http://luarocks.org/dev,,, luafilesystem,,,,1.8.0-1,,flosse lualdap,,,,,,aanderse +lualine.nvim,,,http://luarocks.org/dev,,, lualogging,,,,,, luaossl,,,,,5.1, luaposix,,,,34.1.1-1,,vyp lblasc diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index f1db474c130a..6ac25f36f2b1 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -7051,19 +7051,6 @@ final: prev: meta.hydraPlatforms = [ ]; }; - lualine-nvim = buildVimPlugin { - pname = "lualine.nvim"; - version = "2025-02-08"; - src = fetchFromGitHub { - owner = "nvim-lualine"; - repo = "lualine.nvim"; - rev = "f4f791f67e70d378a754d02da068231d2352e5bc"; - sha256 = "12jm3vc3mi0p9kjw7g1cd6a9nkgws1mvq2h7lpfmflad8zfmw35q"; - }; - meta.homepage = "https://github.com/nvim-lualine/lualine.nvim/"; - meta.hydraPlatforms = [ ]; - }; - luasnip-latex-snippets-nvim = buildVimPlugin { pname = "luasnip-latex-snippets.nvim"; version = "2024-11-25"; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index ccb33ff54c39..f416081fa9ff 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -4004,6 +4004,7 @@ in "gitsigns-nvim" "image-nvim" "lsp-progress-nvim" + "lualine-nvim" "luasnip" "lush-nvim" "lz-n" diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index 608a12bc4c57..fd6589a25c2c 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -540,7 +540,6 @@ https://github.com/nvimdev/lspsaga.nvim/,, https://github.com/barreiroleo/ltex_extra.nvim/,HEAD, https://github.com/nvim-java/lua-async/,HEAD, https://github.com/arkav/lualine-lsp-progress/,, -https://github.com/nvim-lualine/lualine.nvim/,, https://github.com/evesdropper/luasnip-latex-snippets.nvim/,HEAD, https://github.com/alvarosevilla95/luatab.nvim/,, https://github.com/mkasa/lushtags/,, diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 91584dd50a49..16b190d0e429 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -1946,6 +1946,31 @@ buildLuarocksPackage { }; }) {}; +lualine-nvim = callPackage({ buildLuarocksPackage, fetchFromGitHub, fetchurl, luaOlder, nvim-web-devicons }: +buildLuarocksPackage { + pname = "lualine.nvim"; + version = "scm-1"; + knownRockspec = (fetchurl { + url = "mirror://luarocks/lualine.nvim-scm-1.rockspec"; + sha256 = "1mzsfiq4h95s0nbygwii2w8xs5rixdbha322bvx453k530s2kxxj"; + }).outPath; + src = fetchFromGitHub { + owner = "nvim-lualine"; + repo = "lualine.nvim"; + rev = "f4f791f67e70d378a754d02da068231d2352e5bc"; + hash = "sha256-uAxe3UdNUVfdpQcKvGvQ/E2blGksvMPlTBfEOtgeVYo="; + }; + + disabled = luaOlder "5.1"; + propagatedBuildInputs = [ nvim-web-devicons ]; + + meta = { + homepage = "https://github.com/nvim-lualine/lualine.nvim"; + description = "A blazing fast and easy to configure neovim statusline plugin written in pure lua."; + license.fullName = "MIT"; + }; +}) {}; + lualogging = callPackage({ buildLuarocksPackage, fetchFromGitHub, fetchurl, luasocket }: buildLuarocksPackage { pname = "lualogging"; diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 1c9ba6968104..213e018d75b2 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -58,6 +58,7 @@ zlib, zziplib, writableTmpDirAsHomeHook, + gitMinimal, }: final: prev: @@ -494,6 +495,21 @@ in ]; }); + lualine-nvim = prev.lualine-nvim.overrideAttrs (_: { + doCheck = lua.luaversion == "5.1"; + nativeCheckInputs = [ + final.nlua + final.busted + gitMinimal + ]; + checkPhase = '' + runHook preCheck + export HOME=$(mktemp -d) + busted --lua=nlua --lpath='lua/?.lua' --lpath='lua/?/init.lua' tests/ + runHook postCheck + ''; + }); + luaossl = prev.luaossl.overrideAttrs (_: { externalDeps = [ {