push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
{
lib,
fetchFromGitHub,
nix-update-script,
rustPlatform,
vimUtils,
}:
let
version = "0.1.161";
src = fetchFromGitHub {
owner = "autozimu";
repo = "LanguageClient-neovim";
tag = version;
hash = "sha256-Z9S2ie9RxJCIbmjSV/Tto4lK04cZfWmK3IAy8YaySVI=";
};
LanguageClient-neovim-bin = rustPlatform.buildRustPackage {
pname = "LanguageClient-neovim-bin";
inherit version src;
cargoPatches = [
./traitobject.patch
];
cargoHash = "sha256-43alR84MktYTmsKeUMm4gK8AjUIkGqcsuFeQPusBKD0=";
};
in
vimUtils.buildVimPlugin {
pname = "LanguageClient-neovim";
inherit version src;
propagatedBuildInputs = [ LanguageClient-neovim-bin ];
preFixup = ''
substituteInPlace "$out"/autoload/LanguageClient.vim \
--replace-fail \
"let l:path = s:root . '/bin/'" \
"let l:path = '${LanguageClient-neovim-bin}' . '/bin/'"
'';
passthru = {
updateScript = nix-update-script {
extraArgs = [ "--version-regex=(\\d+\\.\\d+\\.\\d+)" ];
attrPath = "vimPlugins.LanguageClient-neovim.LanguageClient-neovim-bin";
};
# needed for the update script
inherit LanguageClient-neovim-bin;
};
meta = {
homepage = "https://github.com/autozimu/LanguageClient-neovim/";
changelog = "https://github.com/autozimu/LanguageClient-neovim/releases/tag/${src.tag}";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,15 @@
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1026,9 +1028,9 @@ dependencies = [
[[package]]
name = "traitobject"
-version = "0.1.0"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079"
+checksum = "04a79e25382e2e852e8da874249358d382ebaf259d0d34e75d8db16a7efabbc7"
[[package]]
name = "treediff"

View File

@@ -0,0 +1,103 @@
{
lib,
fetchFromGitHub,
nix-update-script,
openssl,
pkg-config,
rustPlatform,
stdenv,
vimPlugins,
vimUtils,
makeWrapper,
pkgs,
}:
let
version = "0.0.27-unstable-2025-10-06";
src = fetchFromGitHub {
owner = "yetone";
repo = "avante.nvim";
rev = "a7052aca0bdfb93e524f0536ac80e6c542962f47";
hash = "sha256-crtzBzRcpuqQdqymUJMAxky1Lfk+6YY0YifThHXz7Rw=";
};
avante-nvim-lib = rustPlatform.buildRustPackage {
pname = "avante-nvim-lib";
inherit version src;
cargoHash = "sha256-pTWCT2s820mjnfTscFnoSKC37RE7DAPKxP71QuM+JXQ=";
nativeBuildInputs = [
pkg-config
makeWrapper
pkgs.perl
];
buildInputs = [
openssl
];
buildFeatures = [ "luajit" ];
checkFlags = [
# Disabled because they access the network.
"--skip=test_hf"
"--skip=test_public_url"
"--skip=test_roundtrip"
"--skip=test_fetch_md"
];
};
in
vimUtils.buildVimPlugin {
pname = "avante.nvim";
inherit version src;
dependencies = with vimPlugins; [
dressing-nvim
img-clip-nvim
nui-nvim
nvim-treesitter
plenary-nvim
];
postInstall =
let
ext = stdenv.hostPlatform.extensions.sharedLibrary;
in
''
mkdir -p $out/build
ln -s ${avante-nvim-lib}/lib/libavante_repo_map${ext} $out/build/avante_repo_map${ext}
ln -s ${avante-nvim-lib}/lib/libavante_templates${ext} $out/build/avante_templates${ext}
ln -s ${avante-nvim-lib}/lib/libavante_tokenizers${ext} $out/build/avante_tokenizers${ext}
ln -s ${avante-nvim-lib}/lib/libavante_html2md${ext} $out/build/avante_html2md${ext}
'';
passthru = {
updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
attrPath = "vimPlugins.avante-nvim.avante-nvim-lib";
};
# needed for the update script
inherit avante-nvim-lib;
};
nvimSkipModules = [
# Requires setup with corresponding provider
"avante.providers.azure"
"avante.providers.copilot"
"avante.providers.gemini"
"avante.providers.ollama"
"avante.providers.vertex"
"avante.providers.vertex_claude"
];
meta = {
description = "Neovim plugin designed to emulate the behaviour of the Cursor AI IDE";
homepage = "https://github.com/yetone/avante.nvim";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
ttrei
aarnphm
jackcres
];
};
}

View File

@@ -0,0 +1,21 @@
{
vimUtils,
fetchFromGitHub,
}:
vimUtils.buildVimPlugin rec {
pname = "bitbake-vim";
version = "2.10.4";
# The tags are very messy on the upstream repo. We prefer disabling automatic updates for this plugin.
# nixpkgs-update: no auto update
src = fetchFromGitHub {
owner = "openembedded";
repo = "bitbake";
tag = version;
hash = "sha256-gdxPnRhd4Hj1PWgCU5A/+639ndJXlkdArOBZt6eiZWA=";
};
sourceRoot = "source/contrib/vim";
meta.homepage = "https://github.com/openembedded/bitbake/";
}

View File

@@ -0,0 +1,68 @@
{
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
vimUtils,
nix-update-script,
gitMinimal,
}:
let
version = "1.7.0";
src = fetchFromGitHub {
owner = "Saghen";
repo = "blink.cmp";
tag = "v${version}";
hash = "sha256-eMUOjG2CtedCGVU1Pdp8PCCgGoFbjeVvK7lMS8E+ogg=";
};
blink-fuzzy-lib = rustPlatform.buildRustPackage {
inherit version src;
pname = "blink-fuzzy-lib";
cargoHash = "sha256-zWZHT+Y8ENN/nFEtJnkEUHXRuU6FUQ/ITHo+V4zJ6f8=";
nativeBuildInputs = [ gitMinimal ];
env = {
# TODO: remove this if plugin stops using nightly rust
RUSTC_BOOTSTRAP = true;
};
};
in
vimUtils.buildVimPlugin {
pname = "blink.cmp";
inherit version src;
preInstall =
let
ext = stdenv.hostPlatform.extensions.sharedLibrary;
in
''
mkdir -p target/release
ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy${ext} target/release/libblink_cmp_fuzzy${ext}
'';
passthru = {
updateScript = nix-update-script {
attrPath = "vimPlugins.blink-cmp.blink-fuzzy-lib";
};
# needed for the update script
inherit blink-fuzzy-lib;
};
meta = {
description = "Performant, batteries-included completion plugin for Neovim";
homepage = "https://github.com/saghen/blink.cmp";
changelog = "https://github.com/Saghen/blink.cmp/blob/v${version}/CHANGELOG.md";
maintainers = with lib.maintainers; [
balssh
redxtech
llakala
];
};
nvimSkipModules = [
# Module for reproducing issues
"repro"
];
}

View File

@@ -0,0 +1,62 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
vimUtils,
stdenv,
nix-update-script,
}:
let
version = "0.3.0";
src = fetchFromGitHub {
owner = "Saghen";
repo = "blink.pairs";
tag = "v${version}";
hash = "sha256-RTY/uGviyHlO+ZmLwOC5BabKr+kRDAXGZNdS9fVRPWA=";
};
blink-pairs-lib = rustPlatform.buildRustPackage {
pname = "blink-pairs";
inherit version src;
cargoHash = "sha256-j+zk0UMjvaVgsdF5iaRVO4Puf/XtGu08Cs92jKPaM1g=";
env.RUSTC_BOOTSTRAP = 1;
nativeBuildInputs = [
pkg-config
];
};
in
vimUtils.buildVimPlugin {
pname = "blink.pairs";
inherit version src;
preInstall =
let
ext = stdenv.hostPlatform.extensions.sharedLibrary;
in
''
mkdir -p target/release
ln -s ${blink-pairs-lib}/lib/libblink_pairs${ext} target/release/
'';
passthru = {
updateScript = nix-update-script {
attrPath = "vimPlugins.blink-pairs.blink-pairs-lib";
};
# needed for the update script
inherit blink-pairs-lib;
};
meta = {
description = "Rainbow highlighting and intelligent auto-pairs for Neovim";
homepage = "https://github.com/Saghen/blink.pairs";
changelog = "https://github.com/Saghen/blink.pairs/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ isabelroses ];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
fetchFromSourcehut,
nix-update-script,
vimUtils,
}:
vimUtils.buildVimPlugin {
pname = "clangd_extensions.nvim";
version = "0-unstable-2025-01-27";
src = fetchFromSourcehut {
owner = "~p00f";
repo = "clangd_extensions.nvim";
rev = "db28f29be928d18cbfb86fbfb9f83f584f658feb";
hash = "sha256-XdA638W0Zb85v5uAUNpvUiiQXGKOM2xykD2ClLk8Qpo=";
};
passthru.updateScript = nix-update-script { };
meta = {
description = "Clangd's off-spec features for neovim's LSP client";
homepage = "https://git.sr.ht/~p00f/clangd_extensions.nvim";
license = lib.licenses.mit;
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
vimUtils,
fetchFromGitea,
nix-update-script,
vimPlugins,
}:
vimUtils.buildVimPlugin {
pname = "cmp-async-path";
version = "0-unstable-2025-04-13";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "FelipeLema";
repo = "cmp-async-path";
rev = "0ed1492f59e730c366d261a5ad822fa37e44c325";
hash = "sha256-J1Iw7yNfvWq7Jul25Eyx4qk9lSiLpZt4TRvTYi1DXtk=";
};
checkInputs = [ vimPlugins.nvim-cmp ];
passthru.updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
};
meta = {
description = "Nvim-cmp source for filesystem paths with async processing";
homepage = "https://codeberg.org/FelipeLema/cmp-async-path/";
license = lib.licenses.mit;
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
pkg-config,
rustPlatform,
vimUtils,
libuv,
}:
let
version = "1.6.3";
src = fetchFromGitHub {
owner = "mistricky";
repo = "codesnap.nvim";
tag = "v${version}";
hash = "sha256-VHH1jQczzNFiH+5YflhU9vVCkEUoKciV/Z/n9DEZwiY=";
};
codesnap-lib = rustPlatform.buildRustPackage {
pname = "codesnap-lib";
inherit version src;
sourceRoot = "${src.name}/generator";
cargoHash = "sha256-tg4BO4tPzHhJTowL7RiAuBo4i440FehpGmnz9stTxfI=";
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
];
buildInputs = [
libuv.dev
];
};
in
vimUtils.buildVimPlugin {
pname = "codesnap.nvim";
inherit version src;
# - Remove the shipped pre-built binaries
# - Copy the resulting binary from the codesnap-lib derivation
# Note: the destination should be generator.so, even on darwin
# https://github.com/mistricky/codesnap.nvim/blob/main/scripts/build_generator.sh
postInstall =
let
extension = if stdenv.hostPlatform.isDarwin then "dylib" else "so";
in
''
rm -r $out/lua/*.so
cp ${codesnap-lib}/lib/libgenerator.${extension} $out/lua/generator.so
'';
passthru = {
updateScript = nix-update-script {
attrPath = "vimPlugins.codesnap-nvim.codesnap-lib";
};
# needed for the update script
inherit codesnap-lib;
};
meta = {
homepage = "https://github.com/mistricky/codesnap.nvim/";
changelog = "https://github.com/mistricky/codesnap.nvim/releases/tag/${src.tag}";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,70 @@
{
lib,
fetchFromGitHub,
rustPlatform,
versionCheckHook,
nix-update-script,
vimUtils,
}:
let
version = "2.2.7";
src = fetchFromGitHub {
owner = "vyfor";
repo = "cord.nvim";
tag = "v${version}";
hash = "sha256-SONErPOIaRltx51+GCsGtR0FDSWp/36x3lDbYLSMxXM=";
};
cord-server = rustPlatform.buildRustPackage {
pname = "cord";
inherit src version;
# The version in .github/server-version.txt differs from the one in Cargo.toml
postPatch = ''
substituteInPlace .github/server-version.txt \
--replace-fail "2.2.6" "${version}"
'';
cargoHash = "sha256-14u3rhpDYNKZ4YLoGp6OPeeXDo3EzGYO3yhE9BkDSC0=";
# cord depends on nightly features
RUSTC_BOOTSTRAP = 1;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = false;
meta.mainProgram = "cord";
};
in
vimUtils.buildVimPlugin {
pname = "cord.nvim";
inherit version src;
# Patch the logic used to find the path to the cord server
# This still lets the user set config.advanced.server.executable_path
# https://github.com/vyfor/cord.nvim/blob/v2.2.3/lua/cord/server/fs/init.lua#L10-L15
postPatch = ''
substituteInPlace lua/cord/server/fs/init.lua \
--replace-fail \
"or M.get_data_path()" \
"or '${cord-server}'"
'';
passthru = {
updateScript = nix-update-script {
attrPath = "vimPlugins.cord-nvim.cord-nvim-rust";
};
# needed for the update script
inherit cord-server;
};
meta = {
homepage = "https://github.com/vyfor/cord.nvim";
license = lib.licenses.asl20;
changelog = "https://github.com/vyfor/cord.nvim/releases/tag/v${version}";
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}

View File

@@ -0,0 +1,14 @@
{
vimUtils,
ethersync,
}:
vimUtils.buildVimPlugin rec {
inherit (ethersync)
pname
version
src
meta
;
sourceRoot = "${src.name}/nvim-plugin";
}

View File

@@ -0,0 +1,14 @@
{
vimUtils,
fzf,
}:
# Mainly used as a dependency for fzf-vim. Wraps the fzf program as a vim
# plugin, since part of the fzf vim plugin is included in the main fzf
# program.
vimUtils.buildVimPlugin {
inherit (fzf) src version;
pname = "fzf";
postInstall = ''
ln -s ${fzf}/bin/fzf $target/bin/fzf
'';
}

View File

@@ -0,0 +1,29 @@
{
lib,
vimUtils,
fetchFromGitLab,
nix-update-script,
}:
let
version = "0.1.1";
in
vimUtils.buildVimPlugin {
pname = "gitlab.vim";
inherit version;
src = fetchFromGitLab {
owner = "gitlab-org/editor-extensions";
repo = "gitlab.vim";
rev = "v${version}";
hash = "sha256-W/FV+i/QJYX6A8uyxAQN4ov1kMd9UFCghFmSQp1kbnM=";
};
passthru.updateScript = nix-update-script { };
meta = {
description = "Integrate GitLab Duo with Neovim";
homepage = "https://gitlab.com/gitlab-org/editor-extensions/gitlab.vim";
license = lib.licenses.mit;
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
vimUtils,
fetchFromSourcehut,
nix-update-script,
}:
vimUtils.buildVimPlugin {
pname = "hare.vim";
version = "0-unstable-2025-04-24";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "hare.vim";
rev = "41b8b615f46a39d807a9a069039aac79c925c389";
hash = "sha256-GPFoQI6tipcLzkvjaeufmMrNnQM46lPas9D1SwzjKF4=";
};
passthru.updateScript = nix-update-script { };
meta = {
description = "Hare programming in Vim";
homepage = "https://git.sr.ht/~sircmpwn/hare.vim";
license = lib.licenses.vim;
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,11 @@
{
vimUtils,
hurl,
}:
vimUtils.buildVimPlugin {
pname = "hurl";
inherit (hurl) version;
# https://hurl.dev/
src = "${hurl.src}/contrib/vim";
}

View File

@@ -0,0 +1,27 @@
{
lib,
fetchFromGitea,
vimUtils,
nix-update-script,
}:
vimUtils.buildVimPlugin {
pname = "jsonfly.nvim";
version = "0-unstable-2025-06-07";
src = fetchFromGitea {
domain = "git.myzel394.app";
owner = "Myzel394";
repo = "jsonfly.nvim";
rev = "db4394d856059d99d82ea2c75d033721e9dcb1fc";
hash = "sha256-PmYm+vZ0XONoHUo08haBozbXRpN+/LAlr6Fyg7anTNw=";
};
passthru.updateScript = nix-update-script { };
meta = {
description = "Search blazingly fast for JSON / XML / YAML keys via Telescope";
homepage = "https://git.myzel394.app/Myzel394/jsonfly.nvim";
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ myzel394 ];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
vimUtils,
fetchFromSourcehut,
nix-update-script,
}:
let
version = "3.0.0";
in
vimUtils.buildVimPlugin {
pname = "lsp_lines.nvim";
inherit version;
src = fetchFromSourcehut {
owner = "~whynothugo";
repo = "lsp_lines.nvim";
rev = "v${version}";
hash = "sha256-QsvmPOer7JgO7Y+N/iaNJD7Kmy69gnlV4CeyaQesNvA=";
};
passthru.updateScript = nix-update-script { };
meta = {
description = "Neovim diagnostics using virtual lines";
homepage = "https://git.sr.ht/~whynothugo/lsp_lines.nvim";
license = lib.licenses.mit;
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,10 @@
{
lib,
vimUtils,
meson,
}:
vimUtils.buildVimPlugin {
inherit (meson) pname version src;
preInstall = "cd data/syntax-highlighting/vim";
meta.maintainers = with lib.maintainers; [ vcunat ];
}

View File

@@ -0,0 +1,362 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "bitflags"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "bstr"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
dependencies = [
"memchr",
]
[[package]]
name = "cc"
version = "1.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e"
dependencies = [
"shlex",
]
[[package]]
name = "either"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "erased-serde"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c"
dependencies = [
"serde",
]
[[package]]
name = "errno"
version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
dependencies = [
"libc",
"windows-sys",
]
[[package]]
name = "home"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
dependencies = [
"windows-sys",
]
[[package]]
name = "libc"
version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "linux-raw-sys"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]]
name = "lua-src"
version = "546.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2da0daa7eee611a4c30c8f5ee31af55266e26e573971ba9336d2993e2da129b2"
dependencies = [
"cc",
]
[[package]]
name = "luajit-src"
version = "210.4.8+resty107baaf"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e05167e8b2a2185758d83ed23541e5bd8bce37072e4204e0ef2c9b322bc87c4e"
dependencies = [
"cc",
"which",
]
[[package]]
name = "memchr"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "mlua"
version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bb37b0ba91f017aa7ca2b98ef99496827770cd635b4a932a6047c5b4bbe678e"
dependencies = [
"bstr",
"cc",
"erased-serde",
"lua-src",
"luajit-src",
"mlua_derive",
"num-traits",
"once_cell",
"pkg-config",
"rustc-hash",
"serde",
]
[[package]]
name = "mlua_derive"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9214e60d3cf1643013b107330fcd374ccec1e4ba1eef76e7e5da5e8202e71c0"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "moveline"
version = "0.3.1"
dependencies = [
"mlua",
"nvim-utils",
]
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "nvim-utils"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a9a92389a7a9f1352c8e4f739f854d09430e5b13007a22ad71bb68cea656031"
dependencies = [
"mlua",
"nvim-utils-macros",
"serde",
]
[[package]]
name = "nvim-utils-macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "786ceed33fafdafb3933d708ddbb669eb41949b8d52c58e13fb5ec5b815da06a"
dependencies = [
"mlua",
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "once_cell"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "pkg-config"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
[[package]]
name = "proc-macro2"
version = "1.0.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rustc-hash"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustix"
version = "0.38.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
dependencies = [
"bitflags",
"errno",
"libc",
"linux-raw-sys",
"windows-sys",
]
[[package]]
name = "serde"
version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.90",
]
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "syn"
version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "syn"
version = "2.0.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "which"
version = "4.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
dependencies = [
"either",
"home",
"once_cell",
"rustix",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"

View File

@@ -0,0 +1,54 @@
{
lib,
fetchFromGitHub,
rustPlatform,
vimUtils,
stdenv,
}:
let
version = "0.3.1-unstable-2023-07-06";
src = fetchFromGitHub {
owner = "willothy";
repo = "moveline.nvim";
rev = "570603637be8af20e97b91cf554fef29cab73ca6";
hash = "sha256-hq/n48JC1EgJbmb6b/1jQ8MNhbcsJD3wIYaKE1UiU30=";
};
moveline-lib = rustPlatform.buildRustPackage {
inherit src version;
pname = "moveline-lib";
# Upstream doesn't contain a cargo lock
cargoLock = {
lockFile = ./Cargo.lock;
};
postPatch = ''
ln -s ${./Cargo.lock} Cargo.lock
'';
};
in
vimUtils.buildVimPlugin {
inherit src version;
pname = "moveline-nvim";
preInstall =
# https://github.com/neovim/neovim/issues/21749
# Need to still copy generated library as `so` because neovim doesn't check for `dylib`
let
ext = stdenv.hostPlatform.extensions.sharedLibrary;
in
''
mkdir -p lua
ln -s ${moveline-lib}/lib/libmoveline${ext} lua/moveline.so
'';
# Plugin generates a non lua file output that needs to be manually required
nvimRequireCheck = "moveline";
meta = {
description = "Neovim plugin for moving lines up and down";
homepage = "https://github.com/willothy/moveline.nvim";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ redxtech ];
};
}

View File

@@ -0,0 +1 @@
{ notmuch }: notmuch.vim

View File

@@ -0,0 +1,70 @@
{
lib,
buildGoModule,
fetchFromGitHub,
arrow-cpp,
duckdb,
nix-update-script,
stdenv,
vimPlugins,
vimUtils,
}:
let
version = "0.1.9";
src = fetchFromGitHub {
owner = "kndndrj";
repo = "nvim-dbee";
tag = "v${version}";
hash = "sha256-AOime4vG0NFcUvsd9Iw5SxR7WaeCsoCRU6h5+vSkt4M=";
};
dbee-bin = buildGoModule {
pname = "dbee-bin";
inherit version;
inherit src;
sourceRoot = "${src.name}/dbee";
vendorHash = "sha256-U/3WZJ/+Bm0ghjeNUILsnlZnjIwk3ySaX3Rd4L9Z62A=";
buildInputs = [
arrow-cpp
duckdb
];
# Tests attempt to access `/etc/protocols` which is forbidden in the sandbox
doCheck = !stdenv.hostPlatform.isDarwin;
meta.mainProgram = "dbee";
};
in
vimUtils.buildVimPlugin {
pname = "nvim-dbee";
inherit version src;
postPatch = ''
substituteInPlace lua/dbee/install/init.lua \
--replace-fail 'return vim.fn.stdpath("data") .. "/dbee/bin"' 'return "${dbee-bin}/bin"'
'';
preFixup = ''
mkdir $target/bin
ln -s ${lib.getExe dbee-bin} $target/bin/dbee
'';
passthru = {
updateScript = nix-update-script {
attrPath = "vimPlugins.nvim-dbee.dbee-bin";
};
# needed for the update script
inherit dbee-bin;
};
dependencies = [ vimPlugins.nui-nvim ];
meta = {
description = "Interactive database client for neovim";
homepage = "https://github.com/kndndrj/nvim-dbee";
changelog = "https://github.com/kndndrj/nvim-dbee/releases/tag/v${version}";
maintainers = with lib.maintainers; [ perchun ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
vimUtils,
fetchFromGitLab,
nix-update-script,
}:
vimUtils.buildVimPlugin {
pname = "nvim-julia-autotest";
version = "0-unstable-2022-10-31";
src = fetchFromGitLab {
owner = "usmcamp0811";
repo = "nvim-julia-autotest";
rev = "b74e2f9c961e604cb56cc23f87188348bfa0f33f";
hash = "sha256-IaNsbBe5q7PB9Q/N/Z9nEnP6jlkQ6+xlkC0TCFnJpkk=";
};
passthru.updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
};
meta = {
description = "Automatically run Julia tests when you save runtest.jl file";
homepage = "https://gitlab.com/usmcamp0811/nvim-julia-autotest";
license = lib.licenses.gpl3;
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
fetchFromGitHub,
nix-update-script,
rustPlatform,
vimPlugins,
vimUtils,
}:
let
version = "0-unstable-2025-05-13";
src = fetchFromGitHub {
owner = "nvim-pack";
repo = "nvim-spectre";
rev = "72f56f7585903cd7bf92c665351aa585e150af0f";
hash = "sha256-WPEizIClDmseDEhomCasLx/zfAMT7lq7ZBnfc/a8CuA=";
};
spectre_oxi = rustPlatform.buildRustPackage {
pname = "spectre_oxi";
inherit version src;
sourceRoot = "${src.name}/spectre_oxi";
cargoHash = "sha256-0szVL45QRo3AuBMf+WQ0QF0CS1B9HWPxfF6l6TJtv6Q=";
preCheck = ''
mkdir tests/tmp/
'';
checkFlags = [
# Flaky test (https://github.com/nvim-pack/nvim-spectre/issues/244)
"--skip=tests::test_replace_simple"
];
};
in
vimUtils.buildVimPlugin {
pname = "nvim-spectre";
inherit version src;
dependencies = [ vimPlugins.plenary-nvim ];
postInstall = ''
ln -s ${spectre_oxi}/lib/libspectre_oxi.* $out/lua/spectre_oxi.so
'';
passthru = {
updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
attrPath = "vimPlugins.nvim-spectre.spectre_oxi";
};
# needed for the update script
inherit spectre_oxi;
};
meta = {
homepage = "https://github.com/nvim-pack/nvim-spectre/";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,5 @@
{
lib,
vimPlugins,
}:
lib.recurseIntoAttrs vimPlugins.nvim-treesitter.grammarPlugins

View File

@@ -0,0 +1 @@
{ parinfer-rust }: parinfer-rust

View File

@@ -0,0 +1,16 @@
{
vimUtils,
phpactor,
}:
vimUtils.buildVimPlugin {
inherit (phpactor)
pname
src
meta
version
;
postPatch = ''
substituteInPlace plugin/phpactor.vim \
--replace-fail "g:phpactorpath = expand('<sfile>:p:h') . '/..'" "g:phpactorpath = '${phpactor}'"
'';
}

View File

@@ -0,0 +1,33 @@
{
lib,
vimUtils,
fetchFromGitLab,
nix-update-script,
}:
vimUtils.buildVimPlugin rec {
pname = "rainbow-delimiters.nvim";
version = "0.10.0";
src = fetchFromGitLab {
owner = "HiPhish";
repo = "rainbow-delimiters.nvim";
tag = "v${version}";
hash = "sha256-E0ZPi9Vzc3TwhNHsGyABY+sgn/vO6Oyun6eRd7/RFgU=";
};
nvimSkipModules = [
# rainbow-delimiters.types.lua
"rainbow-delimiters.types"
# Test that requires an unpackaged dependency
"rainbow-delimiters._test.highlight"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Rainbow delimiters for Neovim with Tree-sitter";
homepage = "https://gitlab.com/HiPhish/rainbow-delimiters.nvim";
license = lib.licenses.gpl3;
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
fetchFromGitHub,
nix-update-script,
openssl,
pkg-config,
rustPlatform,
vimPlugins,
vimUtils,
}:
let
version = "1.1.0-unstable-2025-01-21";
src = fetchFromGitHub {
owner = "sourcegraph";
repo = "sg.nvim";
rev = "775f22b75a9826eabf69b0094dd1d51d619fe552";
hash = "sha256-i5g+pzxB8pAORLbr1wlYWUTsrJJmVj9UwlCg8pU3Suw=";
};
sg-nvim-rust = rustPlatform.buildRustPackage {
pname = "sg-nvim-rust";
inherit version src;
cargoHash = "sha256-yY/5w2ztmTKJAYDxBJND8itCOwRNi1negiFq3PyFaSM=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
prePatch = ''
rm .cargo/config.toml
'';
env.OPENSSL_NO_VENDOR = true;
cargoBuildFlags = [ "--workspace" ];
# tests are broken
doCheck = false;
};
in
vimUtils.buildVimPlugin {
pname = "sg.nvim";
inherit version src;
checkInputs = with vimPlugins; [
telescope-nvim
nvim-cmp
];
dependencies = [ vimPlugins.plenary-nvim ];
postInstall = ''
mkdir -p $out/target/debug
ln -s ${sg-nvim-rust}/{bin,lib}/* $out/target/debug
'';
nvimSkipModules = [
# Dependent on active fuzzy search state
"sg.cody.fuzzy"
];
passthru = {
updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
attrPath = "vimPlugins.sg-nvim.sg-nvim-rust";
};
# needed for the update script
inherit sg-nvim-rust;
};
meta = {
description = "Neovim plugin designed to emulate the behaviour of the Cursor AI IDE";
homepage = "https://github.com/sourcegraph/sg.nvim/";
license = lib.licenses.asl20;
};
}

View File

@@ -0,0 +1,9 @@
{
vimUtils,
skim,
}:
vimUtils.buildVimPlugin {
pname = "skim";
inherit (skim) version;
src = skim.vim;
}

View File

@@ -0,0 +1,82 @@
{
lib,
fetchFromGitHub,
# sniprun-bin
rustPlatform,
makeWrapper,
bashInteractive,
coreutils,
curl,
gnugrep,
gnused,
procps,
# sniprun
vimUtils,
replaceVars,
nix-update-script,
}:
let
version = "1.3.19";
src = fetchFromGitHub {
owner = "michaelb";
repo = "sniprun";
tag = "v${version}";
hash = "sha256-a2hEV83NOnt+9BwDk94Ns+rIC9DeHFdu2dZG1XPtdnY=";
};
sniprun-bin = rustPlatform.buildRustPackage {
pname = "sniprun-bin";
inherit version src;
cargoHash = "sha256-Ps9Ugq8ISbuXO3Dxo1WQUVPCxf24oSHvem2Xg0sIgOQ=";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/sniprun \
--prefix PATH ${
lib.makeBinPath [
bashInteractive
coreutils
curl
gnugrep
gnused
procps
]
}
'';
doCheck = false;
meta.mainProgram = "sniprun";
};
in
vimUtils.buildVimPlugin {
pname = "sniprun";
inherit version src;
patches = [
(replaceVars ./fix-paths.patch {
sniprun = lib.getExe sniprun-bin;
})
];
propagatedBuildInputs = [ sniprun-bin ];
passthru = {
updateScript = nix-update-script {
attrPath = "vimPlugins.sniprun.sniprun-bin";
};
# needed for the update script
inherit sniprun-bin;
};
meta = {
homepage = "https://github.com/michaelb/sniprun/";
changelog = "https://github.com/michaelb/sniprun/blob/v${version}/CHANGELOG.md";
maintainers = with lib.maintainers; [ GaetanLepage ];
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,15 @@
diff --git a/lua/sniprun.lua b/lua/sniprun.lua
index 49be442..9342351 100644
--- a/lua/sniprun.lua
+++ b/lua/sniprun.lua
@@ -3,9 +3,7 @@ M.ping_anwsered = 0
M.info_floatwin = {}
-- See https://github.com/tjdevries/rofl.nvim/blob/632c10f2ec7c56882a3f7eda8849904bcac6e8af/lua/rofl.lua
-local binary_path = vim.fn.fnamemodify(
- vim.api.nvim_get_runtime_file("lua/sniprun.lua", false)[1], ":h:h")
- .. "/target/release/sniprun"
+local binary_path = "@sniprun@"
local sniprun_path = vim.fn.fnamemodify(vim.api.nvim_get_runtime_file("lua/sniprun.lua", false)[1], ":p:h") .. "/.."

View File

@@ -0,0 +1,28 @@
{
lib,
vimUtils,
fetchFromGitLab,
nix-update-script,
}:
vimUtils.buildVimPlugin {
pname = "sonarlint.nvim";
version = "0-unstable-2025-10-04";
src = fetchFromGitLab {
owner = "schrieveslaach";
repo = "sonarlint.nvim";
rev = "1d49a469265e271f02b6efcf09c215e4560bd5fa";
hash = "sha256-1eUwgHvegULo33xVjvV3b90fSlJ8Ax10iDCZE4IPo58=";
};
passthru.updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
};
meta = {
homepage = "https://gitlab.com/schrieveslaach/sonarlint.nvim";
description = "Extensions for the built-in Language Server Protocol support in Neovim for sonarlint-language-server";
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.sinics ];
};
}

View File

@@ -0,0 +1,17 @@
{
vimUtils,
statix,
}:
vimUtils.buildVimPlugin rec {
inherit (statix) pname src meta;
version = "0.1.0";
postPatch = ''
# check that version is up to date
grep 'pname = "statix-vim"' -A 1 flake.nix \
| grep -F 'version = "${version}"'
cd vim-plugin
substituteInPlace ftplugin/nix.vim --replace-fail statix ${statix}/bin/statix
substituteInPlace plugin/statix.vim --replace-fail statix ${statix}/bin/statix
'';
}

View File

@@ -0,0 +1,8 @@
{
vimUtils,
taskwarrior2,
}:
vimUtils.buildVimPlugin {
inherit (taskwarrior2) version pname;
src = "${taskwarrior2.src}/scripts/vim";
}

View File

@@ -0,0 +1,8 @@
{
vimUtils,
taskwarrior3,
}:
vimUtils.buildVimPlugin {
inherit (taskwarrior3) version pname;
src = "${taskwarrior3.src}/scripts/vim";
}

View File

@@ -0,0 +1,21 @@
{
lib,
vimUtils,
tup,
}:
let
# Based on the comment at the top of https://github.com/gittup/tup/blob/master/contrib/syntax/tup.vim
ftdetect = builtins.toFile "tup.vim" ''
au BufNewFile,BufRead Tupfile,*.tup setf tup
'';
in
vimUtils.buildVimPlugin {
inherit (tup) pname version src;
preInstall = ''
mkdir -p vim-plugin/syntax vim-plugin/ftdetect
cp contrib/syntax/tup.vim vim-plugin/syntax/tup.vim
cp "${ftdetect}" vim-plugin/ftdetect/tup.vim
cd vim-plugin
'';
meta.maintainers = with lib.maintainers; [ enderger ];
}

View File

@@ -0,0 +1,40 @@
{
lib,
vimUtils,
vectorcode,
vimPlugins,
}:
let
inherit (vectorcode) src version;
in
vimUtils.buildVimPlugin {
inherit src version;
pname = "vectorcode.nvim";
# nixpkgs-update: no auto update
# This is built from the same source as vectorcode and will rebuild automatically
sourceRoot = "${src.name}/plugin";
dependencies = [
vimPlugins.plenary-nvim
];
buildInputs = [ vectorcode ];
postPatch = ''
cp -r ../lua .
'';
checkInputs = [
vimPlugins.codecompanion-nvim
];
meta = {
description = "Index and navigate your code repository using vectorcode";
homepage = "https://github.com/Davidyz/VectorCode/blob/main/docs/neovim.md";
inherit (vectorcode.meta) changelog license;
maintainers = with lib.maintainers; [ sarahec ];
};
}

View File

@@ -0,0 +1,72 @@
{
lib,
rustPlatform,
fetchFromGitHub,
fetchpatch,
pkg-config,
libgit2,
zlib,
vimUtils,
nix-update-script,
}:
let
version = "0.54";
src = fetchFromGitHub {
owner = "liuchengxu";
repo = "vim-clap";
tag = "v${version}";
hash = "sha256-rhCum59GCIAwdi5QgSaPfrALelAIMncNetu81i53Q8c=";
};
meta = with lib; {
description = "Modern performant fuzzy picker for Vim and NeoVim";
mainProgram = "maple";
homepage = "https://github.com/liuchengxu/vim-clap";
changelog = "https://github.com/liuchengxu/vim-clap/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = [ ];
};
maple = rustPlatform.buildRustPackage {
pname = "maple";
inherit version src meta;
cargoHash = "sha256-FEeSwa8KmIyfhWAU9Dpric6uB2e0yK+Tig/k2zwq2Rg=";
nativeBuildInputs = [
pkg-config
];
# Remove after next release
cargoPatches = [
(fetchpatch {
name = "rust-1.80";
url = "https://github.com/liuchengxu/vim-clap/commit/3e8d001f5c9be10e4bb680a1d409326902c96c10.patch";
hash = "sha256-qMflfQEssH4OGXmLFUcQwzbYWgPD0S/pClb35ZRUaPM=";
})
];
buildInputs = [
libgit2
zlib
];
};
in
vimUtils.buildVimPlugin {
pname = "vim-clap";
inherit version src meta;
postInstall = ''
ln -s ${maple}/bin/maple $out/bin/maple
'';
passthru = {
inherit maple;
updateScript = nix-update-script {
attrPath = "vimPlugins.vim-clap.maple";
};
};
}

View File

@@ -0,0 +1,52 @@
{
fetchFromGitHub,
nix-update-script,
rustPlatform,
vimUtils,
}:
let
version = "0-unstable-2022-06-14";
src = fetchFromGitHub {
owner = "euclio";
repo = "vim-markdown-composer";
rev = "e6f99bc20cfcb277c63041b1f766e6d5940bcc76";
sha256 = "0ljv8cvca8nk91g67mnzip81say04b1wbj9bzcgzy8m6qkz1r2h3";
fetchSubmodules = true;
};
vim-markdown-composer-bin = rustPlatform.buildRustPackage {
pname = "vim-markdown-composer-bin";
inherit src version;
cargoHash = "sha256-xzlEIaDEYDbxJ6YqzF+lSHcB9O+brClw026YI1YeNUc=";
# tests require network access
doCheck = false;
};
in
vimUtils.buildVimPlugin {
pname = "vim-markdown-composer";
inherit version src;
preFixup = ''
substituteInPlace "$out"/after/ftplugin/markdown/composer.vim \
--replace-fail \
"s:plugin_root . '/target/release/markdown-composer'" \
"'${vim-markdown-composer-bin}/bin/markdown-composer'"
'';
passthru = {
updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
attrPath = "vimPlugins.vim-markdown-composer.vim-markdown-composer-bin";
};
# needed for the update script
inherit vim-markdown-composer-bin;
};
meta = {
homepage = "https://github.com/euclio/vim-markdown-composer/";
# rust build error
broken = true;
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
vimUtils,
fetchFromGitLab,
nix-update-script,
}:
vimUtils.buildVimPlugin {
pname = "vim-ic10";
version = "0-unstable-2025-01-08";
src = fetchFromGitLab {
owner = "LittleMorph";
repo = "vim-ic10";
rev = "7c1f13b198cfe122fb52f6abfb8dc95d5ca51013";
hash = "sha256-4Q1JiDA7PBUWNBNfCIZC6nImhe2FJzOqrslHazAOs18=";
};
passthru.updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
};
meta = {
description = "Stationeers IC10 syntax highlighting for Vim";
homepage = "https://gitlab.com/LittleMorph/vim-ic10";
license = lib.licenses.mit;
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,10 @@
{
vimPlugins,
vimUtils,
}:
vimUtils.buildVimPlugin {
pname = "vim2nix";
version = "1.0";
src = ./src;
dependencies = [ vimPlugins.vim-addon-manager ];
}

View File

@@ -0,0 +1,3 @@
Usage see vim-utils.nix in nixpkgs
This code depends on vim-addon-manager

View File

@@ -0,0 +1 @@
{'dependencies': {'vim-addon-manager': {}}}

View File

@@ -0,0 +1,307 @@
" usage example:
"
" call nix#ExportPluginsForNix({'path_to_nixpkgs': '/etc/nixos/nixpkgs', 'names': ["vim-addon-manager", "vim-addon-nix"], 'cache_file': 'cache'})
let s:plugin_root = expand('<sfile>:h:h')
fun! nix#ToNixAttrName(s) abort
return nix#ToNixName(a:s)
endf
fun! nix#ToNixName(s) abort
return substitute(substitute(a:s, '[:/.]', '-', 'g'), 'github-', '', 'g')
endf
fun! s:System(...)
let args = a:000
let r = call('vam#utils#System', args)
if r is 0
throw "command ".join(args, '').' failed'
else
return r
endif
endf
fun! nix#DependenciesFromCheckout(opts, name, repository, dir)
" check for dependencies
" vam#PluginDirFromName(a:name)
let info = vam#ReadAddonInfo(vam#AddonInfoFile(a:dir, a:name))
return keys(get(info, 'dependencies', {}))
endf
" without deps
fun! nix#NixDerivation(opts, name, repository) abort
let n_a_name = nix#ToNixAttrName(a:name)
let n_n_name = nix#ToNixName(a:name)
let type = get(a:repository, 'type', '')
let created_notice = " # created by nix#NixDerivation"
let ancf = s:plugin_root.'/additional-nix-code/'.a:name
let additional_nix_code = file_readable(ancf) ? join(readfile(ancf), "\n") : ""
if type == 'git'
" should be using shell abstraction ..
echo 'fetching '. a:repository.url
let s = s:System('$ --fetch-submodules $ 2>&1',a:opts.nix_prefetch_git, a:repository.url)
let rev = matchstr(s, 'git revision is \zs[^\n\r]\+\ze')
let sha256 = matchstr(s, 'hash is \zs[^\n\r]\+\ze')
let dir = matchstr(s, 'path is \zs[^\n\r]\+\ze')
let date = matchstr(s, 'Commit date is \zs[0-9-]\+\ze')
let dependencies = nix#DependenciesFromCheckout(a:opts, a:name, a:repository, dir)
return {'n_a_name': n_a_name, 'n_n_name': n_n_name, 'dependencies': dependencies, 'derivation': join([
\ ' '.n_a_name.' = buildVimPlugin {'.created_notice,
\ ' name = "'.n_n_name.'-'.date.'";',
\ ' src = fetchgit {',
\ ' url = "'. a:repository.url .'";',
\ ' rev = "'.rev.'";',
\ ' sha256 = "'.sha256.'";',
\ ' };',
\ ' dependencies = ['.join(map(copy(dependencies), "'\"'.nix#ToNixAttrName(v:val).'\"'")).'];',
\ additional_nix_code,
\ ' };',
\ '',
\ '',
\ ], "\n")}
elseif type == 'hg'
" should be using shell abstraction ..
echo 'fetching '. a:repository.url
let s = s:System('$ $ 2>&1',a:opts.nix_prefetch_hg, a:repository.url)
let rev = matchstr(s, 'hg revision is \zs[^\n\r]\+\ze')
let sha256 = matchstr(s, 'hash is \zs[^\n\r]\+\ze')
let dir = matchstr(s, 'path is \zs[^\n\r]\+\ze')
let dependencies = nix#DependenciesFromCheckout(a:opts, a:name, a:repository, dir)
return {'n_a_name': n_a_name, 'n_n_name': n_n_name, 'dependencies': dependencies, 'derivation': join([
\ ' '.n_a_name.' = buildVimPlugin {'.created_notice,
\ ' name = "'.n_n_name.'";',
\ ' src = fetchhg {',
\ ' url = "'. a:repository.url .'";',
\ ' rev = "'.rev.'";',
\ ' sha256 = "'.sha256.'";',
\ ' };',
\ ' dependencies = ['.join(map(copy(dependencies), "'\"'.nix#ToNixAttrName(v:val).'\"'")).'];',
\ additional_nix_code,
\ ' };',
\ '',
\ '',
\ ], "\n")}
elseif type == 'archive'
let sha256 = split(s:System('nix-prefetch-url $ 2>/dev/null', a:repository.url), "\n")[0]
" we should unpack the sources, look for the addon-info.json file ..
" however most packages who have the addon-info.json file also are on
" github thus will be of type "git" instead. The dependency information
" from vim-pi is encoded in the reposiotry. Thus this is likely to do the
" right thing most of the time.
let addon_info = get(a:repository, 'addon-info', {})
let dependencies = keys(get(addon_info, 'dependencies', {}))
return {'n_a_name': n_a_name, 'n_n_name': n_n_name, 'dependencies': dependencies, 'derivation': join([
\ ' '.n_a_name.' = buildVimPlugin {'.created_notice,
\ ' name = "'.n_n_name.'";',
\ ' src = fetchurl {',
\ ' url = "'. a:repository.url .'";',
\ ' name = "'. a:repository.archive_name .'";',
\ ' sha256 = "'.sha256.'";',
\ ' };',
\ ' buildInputs = [ unzip ];',
\ ' dependencies = ['.join(map(copy(dependencies), "'\"'.nix#ToNixAttrName(v:val).'\"'")).'];',
\ ' meta = {',
\ ' homepage = "http://www.vim.org/scripts/script.php?script_id='.a:repository.vim_script_nr.'";',
\ ' };',
\ addon_info == {} ? '' : (' addon_info = '.nix#ToNix(string(addon_info), [], "").';'),
\ additional_nix_code,
\ ' };',
\ '',
\ '',
\ ], "\n")}
else
throw a:name.' TODO: implement source '.string(a:repository)
endif
endf
" also tries to handle dependencies
fun! nix#AddNixDerivation(opts, cache, name, ...) abort
if has_key(a:cache, a:name) | return | endif
let repository = a:0 > 0 ? a:1 : {}
let name = a:name
if repository == {}
call vam#install#LoadPool()
let list = matchlist(a:name, 'github:\([^/]*\)\%(\/\(.*\)\)\?$')
if len(list) > 0
if '' != list[2]
let name = list[2]
let repository = { 'type': 'git', 'owner': list[1], 'repo': list[2], 'url': 'https://github.com/'.list[1].'/'.list[2] }
else
let name = list[1]
let repository = { 'type': 'git', 'owner': list[1], 'repo': 'vim-addon-'.list[1], 'url': 'https://github.com/'.list[1].'/vim-addon-'.list[1] }
endif
else
let repository = get(g:vim_addon_manager.plugin_sources, a:name, {})
if repository == {}
throw "repository ".a:name." unkown!"
else
if repository.url =~ 'github'
let owner = matchstr(repository.url, 'github.com/\zs.\+\ze/')
let repo = matchstr(repository.url, '\/\zs[^\/]\+\ze$')
let url = repository.url
let repository = { 'type': 'git', 'owner': owner, 'repo': repo, 'url': url }
endif
endif
endif
endif
let a:cache[a:name] = nix#NixDerivation(a:opts, name, repository)
" take known dependencies into account:
let deps = get(a:cache[a:name], 'dependencies', [])
call extend(a:opts.names_to_process, deps)
call extend(a:opts.names_to_export, deps)
endfun
fun! nix#TopNixOptsByParent(parents)
if (a:parents == [])
return {'ind': ' ', 'next_ind': ' ', 'sep': "\n"}
else
return {'ind': '', 'next_ind': '', 'sep': ' '}
endif
endf
fun! nix#ToNix(x, parents, opts_fun) abort
let opts = a:opts_fun == "" ? "" : call(a:opts_fun, [a:parents])
let next_parents = [a:x] + a:parents
let seps = a:0 > 1 ? a:2 : []
let ind = get(opts, 'ind', '')
let next_ind = get(opts, 'next_ind', ind.' ')
let sep = get(opts, 'sep', ind.' ')
if type(a:x) == type("")
return "''". substitute(a:x, '[$]', '$$', 'g')."''"
elseif type(a:x) == type({})
let s = ind."{".sep
for [k,v] in items(a:x)
let s .= '"'.k.'" = '.nix#ToNix(v, next_parents, a:opts_fun).";".sep
unlet k v
endfor
return s.ind."}"
" let s = ind."{\n"
" for [k,v] in items(a:x)
" let s .= next_ind . nix#ToNix(k).' = '.nix#ToNix(v, next_ind)."\n"
" unlet k v
" endfor
" return s.ind."}\n"
elseif type(a:x) == type([])
let s = ind."[".sep
for v in a:x
let s .= next_ind . nix#ToNix(v, next_parents, a:opts_fun)."".sep
unlet v
endfor
return s.ind."]"
endif
endf
" with dependencies
" opts.cache_file (caches the checkout and dependency information
" opts.path_to_nixpkgs or opts.nix_prefetch_{git,hg}
" opts.plugin_dictionaries: list of any
" - string
" - dictionary having key name or names
" This is so that plugin script files can be loaded/ merged
fun! nix#ExportPluginsForNix(opts) abort
let cache_file = get(a:opts, 'cache_file', '')
let opts = a:opts
" set nix_prefetch_* scripts
for scm in ['git', 'hg']
if !has_key(opts, 'nix_prefetch_'.scm)
let opts['nix_prefetch_'.scm] = a:opts.path_to_nixpkgs.'/pkgs/build-support/fetch'.scm.'/nix-prefetch-'.scm
endif
endfor
" create list of names from dictionaries
let a:opts.names_to_process = []
for x in a:opts.plugin_dictionaries
if type(x) == type('')
call add(opts.names_to_process, x)
elseif type(x) == type({}) && has_key(x, 'name')
call add(opts.names_to_process, x.name)
elseif type(x) == type({}) && has_key(x, 'names')
call extend(opts.names_to_process, x.names)
else
throw "unexpected"
endif
unlet x
endfor
let a:opts.names_to_export = a:opts.names_to_process
let cache = (cache_file == '' || !filereadable(cache_file)) ? {} : eval(readfile(cache_file)[0])
let failed = {}
while len(opts.names_to_process) > 0
let name = opts.names_to_process[0]
if get(opts, 'try_catch', 1)
try
call nix#AddNixDerivation(opts, cache, name)
catch /.*/
echom 'failed : '.name.' '.v:exception
let failed[name] = v:exception
endtry
else
call nix#AddNixDerivation(opts, cache, name)
endif
let opts.names_to_process = opts.names_to_process[1:]
endwhile
echom join(keys(failed), ", ")
echom string(failed)
if cache_file != ''
call writefile([string(cache)], cache_file)
endif
enew
let uniq = {}
for x in a:opts.names_to_export
let uniq[x] = 1
endfor
for k in sort(keys(uniq))
call append('$', split(cache[k].derivation,"\n"))
endfor
" for VAM users output vam.pluginDictionaries which can be fed to
" vim_customizable.customize.vimrc.vam.pluginDictionaries
call append('$', ["", "", "", '# vam.pluginDictionaries'])
let ns = []
for x in a:opts.plugin_dictionaries
if type(x) == type("")
call add(ns, nix#ToNixAttrName(x))
elseif type(x) == type({})
if has_key(x, 'name')
call add(ns, extend({'name': nix#ToNixAttrName(x.name)}, x, "keep"))
elseif has_key(x, 'names')
call add(ns, extend({'names': map(copy(x.names), 'nix#ToNixAttrName(v:val)')}, x, "keep"))
else
throw "unexpected"
endif
else
throw "unexpected"
endif
unlet x
endfor
call append('$', split(nix#ToNix(ns, [], 'nix#TopNixOptsByParent'), "\n"))
" failures:
for [k,v] in items(failed)
call append('$', ['# '.k.', failure: '.v])
unlet k v
endfor
endf