neovim-flake/flake/legacyPackages/blink-cmp.nix

38 lines
909 B
Nix
Raw Normal View History

2025-01-11 20:55:21 +01:00
{
2025-03-24 11:57:38 +03:00
stdenv,
2025-01-11 20:55:21 +01:00
rustPlatform,
vimUtils,
2025-03-29 19:03:31 +03:00
gitMinimal,
2025-01-11 20:55:21 +01:00
src,
version,
}: let
blink-fuzzy-lib = rustPlatform.buildRustPackage {
pname = "blink-fuzzy-lib";
inherit version src;
2025-02-12 14:36:06 +03:00
# TODO: remove this if plugin stops using nightly rust
env.RUSTC_BOOTSTRAP = true;
useFetchCargoVendor = true;
2025-05-03 08:41:27 +03:00
cargoHash = "sha256-IDoDugtNWQovfSstbVMkKHLBXKa06lxRWmywu4zyS3M=";
2025-03-29 19:03:31 +03:00
nativeBuildInputs = [gitMinimal];
2025-01-11 20:55:21 +01:00
};
in
vimUtils.buildVimPlugin {
pname = "blink-cmp";
inherit version src;
# blink references a repro.lua which is placed outside the lua/ directory
doCheck = false;
2025-03-24 11:57:38 +03:00
preInstall = let
ext = stdenv.hostPlatform.extensions.sharedLibrary;
in ''
2025-01-11 20:55:21 +01:00
mkdir -p target/release
2025-03-24 11:57:38 +03:00
ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy${ext} target/release/libblink_cmp_fuzzy${ext}
2025-01-11 20:55:21 +01:00
'';
# Module for reproducing issues
2025-03-29 19:03:31 +03:00
nvimSkipModules = ["repro"];
2025-01-11 20:55:21 +01:00
}