From b4cde4d7f1fc84f6ff41ad165dab793dedaedfa0 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 7 Apr 2024 14:42:33 +0200 Subject: [PATCH] luaPackages.neorg: init at 9.1.1-1 Co-authored-by: Austin Horstman --- maintainers/scripts/luarocks-packages.csv | 1 + .../editors/vim/plugins/generated.nix | 12 ---------- .../editors/vim/plugins/overrides.nix | 4 +--- .../editors/vim/plugins/vim-plugin-names | 1 - .../lua-modules/generated-packages.nix | 22 +++++++++++++++++++ pkgs/development/lua-modules/overrides.nix | 11 +++++++++- 6 files changed, 34 insertions(+), 17 deletions(-) diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index 4d1ed177c1c4..f502e569aa43 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -114,6 +114,7 @@ middleclass,,,,,, mimetypes,,,,,, mpack,,,,,, moonscript,https://raw.githubusercontent.com/leafo/moonscript/master/moonscript-dev-1.rockspec,,,,,arobyn +neorg,,,,,,GaetanLepage neotest,,,,,,mrcjkb nlua,,,,,,teto nui.nvim,,,,,,mrcjkb diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index 852fa77c6c07..b663442ba90d 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -7443,18 +7443,6 @@ final: prev: meta.homepage = "https://github.com/ii14/neorepl.nvim/"; }; - neorg = buildVimPlugin { - pname = "neorg"; - version = "2024-09-08"; - src = fetchFromGitHub { - owner = "nvim-neorg"; - repo = "neorg"; - rev = "ba35900b21921c439e676b063a79c8fad914eac9"; - sha256 = "12sgvf7zbabxvmdf07cv8rcql6jdgdv5xdcn7v5w42q8lg9mps10"; - }; - meta.homepage = "https://github.com/nvim-neorg/neorg/"; - }; - neorg-telescope = buildVimPlugin { pname = "neorg-telescope"; version = "2024-07-30"; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index ced18c91254d..4fa9b68ad61a 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -1238,9 +1238,7 @@ in dependencies = with self; [ plenary-nvim ]; }; - neorg = super.neorg.overrideAttrs { - dependencies = with self; [ plenary-nvim ]; - }; + neorg = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.neorg; }; neotest = super.neotest.overrideAttrs { dependencies = with self; [ nvim-nio plenary-nvim ]; diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index 8838032be3e1..f52477db72d9 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -623,7 +623,6 @@ https://github.com/neomake/neomake/,, https://github.com/Shougo/neomru.vim/,, https://github.com/rafamadriz/neon/,, https://github.com/ii14/neorepl.nvim/,HEAD, -https://github.com/nvim-neorg/neorg/,, https://github.com/nvim-neorg/neorg-telescope/,HEAD, https://github.com/karb94/neoscroll.nvim/,, https://github.com/Shougo/neosnippet-snippets/,, diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 66711d3709c9..80e23c314d98 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -2718,6 +2718,28 @@ buildLuarocksPackage { }; }) {}; +neorg = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua-utils-nvim, luaOlder, nui-nvim, nvim-nio, pathlib-nvim, plenary-nvim }: +buildLuarocksPackage { + pname = "neorg"; + version = "9.1.1-1"; + knownRockspec = (fetchurl { + url = "mirror://luarocks/neorg-9.1.1-1.rockspec"; + sha256 = "0zafy1hkrvh41vlx1g4rqlcvc4x9pi8dcji30qi0b8lj45pldyr3"; + }).outPath; + src = fetchzip { + url = "https://github.com/nvim-neorg/neorg/archive/v9.1.1.zip"; + sha256 = "18lk22lfzwwn4hy2s035g3kslqmvrr28lm5w9k3dazqwj5nlka3z"; + }; + disabled = luaOlder "5.1"; + propagatedBuildInputs = [ lua-utils-nvim nui-nvim nvim-nio pathlib-nvim plenary-nvim ]; + meta = { + homepage = "https://github.com/nvim-neorg/neorg"; + description = "Modernity meets insane extensibility. The future of organizing your life in Neovim."; + maintainers = with lib.maintainers; [ GaetanLepage ]; + license.fullName = "GPL-3.0"; + }; +}) {}; + neotest = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder, nvim-nio, plenary-nvim }: buildLuarocksPackage { pname = "neotest"; diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 228572dd9f25..58cae66490ce 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -583,7 +583,16 @@ in export HOME=$(mktemp -d) busted --lua=nlua runHook postCheck - ''; + ''; + }); + + neorg = prev.neorg.overrideAttrs (oa: { + postConfigure = '' + cat ''${rockspecFilename} + substituteInPlace ''${rockspecFilename} \ + --replace-fail "'nvim-nio ~> 1.7'," "'nvim-nio >= 1.7'," \ + --replace-fail "'plenary.nvim == 0.1.4'," "'plenary.nvim'," + ''; }); plenary-nvim = prev.plenary-nvim.overrideAttrs (oa: {