nvf/flake/legacyPackages/blink-cmp.nix
Alfarel 3b8595a263
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
completion/blink: fix fuzzy lib cargoHash (#829)
2025-04-13 18:20:30 +00:00

37 lines
909 B
Nix

{
stdenv,
rustPlatform,
vimUtils,
gitMinimal,
src,
version,
}: let
blink-fuzzy-lib = rustPlatform.buildRustPackage {
pname = "blink-fuzzy-lib";
inherit version src;
# TODO: remove this if plugin stops using nightly rust
env.RUSTC_BOOTSTRAP = true;
useFetchCargoVendor = true;
cargoHash = "sha256-MWElqh7ENJ6CbLOnvz0DsP5YYu+e+y12GSUOfW1IKGU=";
nativeBuildInputs = [gitMinimal];
};
in
vimUtils.buildVimPlugin {
pname = "blink-cmp";
inherit version src;
# blink references a repro.lua which is placed outside the lua/ directory
doCheck = false;
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}
'';
# Module for reproducing issues
nvimSkipModules = ["repro"];
}