nvf/flake/pkgs/by-name/blink-cmp/package.nix
NotAShelf 8dd53be910
flake: move packages to a by-name overlay
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69642d9409f7d32e01a140cb62c2173b5226
2025-07-20 16:16:10 +03:00

40 lines
763 B
Nix

{
rustPlatform,
fetchFromGitHub,
writeShellScriptBin,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "blink-cmp";
version = "1.3.1";
src = fetchFromGitHub {
owner = "Saghen";
repo = "blink.cmp";
tag = "v${finalAttrs.version}";
hash = "sha256-8lyDDrsh3sY7l0i0TPyhL69Oq0l63+/QPnLaU/mhq5A=";
};
forceShare = [
"man"
"info"
];
postInstall = ''
cp -r {lua,plugin} "$out"
mkdir -p "$out/doc"
cp 'doc/'*'.txt' "$out/doc/"
mkdir -p "$out/target"
mv "$out/lib" "$out/target/release"
'';
cargoHash = "sha256-IDoDugtNWQovfSstbVMkKHLBXKa06lxRWmywu4zyS3M=";
useFetchCargoVendor = true;
nativeBuildInputs = [
(writeShellScriptBin "git" "exit 1")
];
env.RUSTC_BOOTSTRAP = true;
})