mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
flake: add and package blink.cmp
This commit is contained in:
parent
62bc9764f1
commit
2dde21e19c
4 changed files with 82 additions and 0 deletions
|
@ -61,6 +61,10 @@
|
|||
"flutter-tools.dev_tools"
|
||||
];
|
||||
};
|
||||
blink-cmp = pkgs.callPackage ./packages/blink-cmp.nix {
|
||||
src = inputs.plugin-blink-cmp;
|
||||
version = inputs.plugin-blink-cmp.shortRev or inputs.plugin-blink-cmp.shortDirtyRev or "dirty";
|
||||
};
|
||||
};
|
||||
|
||||
buildConfigPlugins = plugins:
|
||||
|
|
34
modules/wrapper/build/packages/blink-cmp.nix
Normal file
34
modules/wrapper/build/packages/blink-cmp.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
rustPlatform,
|
||||
hostPlatform,
|
||||
vimUtils,
|
||||
git,
|
||||
src,
|
||||
version,
|
||||
}: let
|
||||
blink-fuzzy-lib = rustPlatform.buildRustPackage {
|
||||
pname = "blink-fuzzy-lib";
|
||||
inherit version src;
|
||||
|
||||
nativeBuildInputs = [git];
|
||||
cargoLock = {
|
||||
lockFile = "${src}/Cargo.lock";
|
||||
allowBuiltinFetchGit = true;
|
||||
};
|
||||
};
|
||||
libExt =
|
||||
if hostPlatform.isDarwin
|
||||
then "dylib"
|
||||
else "so";
|
||||
in
|
||||
vimUtils.buildVimPlugin {
|
||||
pname = "blink-cmp";
|
||||
inherit version src;
|
||||
|
||||
# blink references a repro.lua which is placed outside the lua/ directory
|
||||
doCheck = false;
|
||||
preInstall = ''
|
||||
mkdir -p target/release
|
||||
ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy.${libExt} target/release/libblink_cmp_fuzzy.${libExt}
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue