nvf/flake/blink/default.nix
Gerg-L 9feb71594d
refactor: nuke legacyPackages and overlays
rework blink-cmp package
2025-05-04 23:20:32 -04:00

31 lines
660 B
Nix

{
rustPlatform,
fetchFromGitHub,
writeShellScriptBin,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "blink-cmp";
version = "1.2.0";
src = fetchFromGitHub {
owner = "Saghen";
repo = "blink.cmp";
tag = "v${finalAttrs.version}";
hash = "sha256-bKe8SSg1HPWE7b4iRQJwiOVCrvvgttuHCOIa4U/38AY=";
};
postInstall = ''
cp -r {lua,plugin} "$out"
mkdir -p "$out/target"
mv "$out/lib" "$out/target/release"
'';
cargoHash = "sha256-IDoDugtNWQovfSstbVMkKHLBXKa06lxRWmywu4zyS3M=";
useFetchCargoVendor = true;
nativeBuildInputs = [
(writeShellScriptBin "git" "exit 1")
];
env.RUSTC_BOOTSTRAP = true;
})