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;
|
|
|
|
|
|
2025-03-18 20:34:34 +00:00
|
|
|
useFetchCargoVendor = true;
|
2025-04-13 18:20:30 +00:00
|
|
|
cargoHash = "sha256-MWElqh7ENJ6CbLOnvz0DsP5YYu+e+y12GSUOfW1IKGU=";
|
2025-03-18 20:34:34 +00:00
|
|
|
|
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
|
|
|
'';
|
2025-03-18 20:34:34 +00:00
|
|
|
|
|
|
|
|
# Module for reproducing issues
|
2025-03-29 19:03:31 +03:00
|
|
|
nvimSkipModules = ["repro"];
|
2025-01-11 20:55:21 +01:00
|
|
|
}
|