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

39 lines
910 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,
hostPlatform,
vimUtils,
git,
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;
cargoHash = "sha256-F1wh/TjYoiIbDY3J/prVF367MKk3vwM7LqOpRobOs7I=";
2025-01-11 20:55:21 +01:00
nativeBuildInputs = [git];
};
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
nvimSkipModule = ["repro"];
2025-01-11 20:55:21 +01:00
}