mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-03-30 18:01:52 +00:00
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (push) Has been cancelled
Validate flake & check documentation / Validate hyperlinks in documentation sources (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Check for typos in the source tree / check-typos (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* blink-cmp: apply Nix patch; use new fetcher * completion/blink: don't break when modifying built-in sources.providers (#683) * completion/blink-cmp: add missing options **Blink breaks again, 11985891th recorded incident** --------- Co-authored-by: Alfarel <alfarelcynthesis@proton.me>
52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
{
|
|
rustPlatform,
|
|
hostPlatform,
|
|
vimUtils,
|
|
git,
|
|
src,
|
|
version,
|
|
fetchpatch,
|
|
}: 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-F1wh/TjYoiIbDY3J/prVF367MKk3vwM7LqOpRobOs7I=";
|
|
|
|
nativeBuildInputs = [git];
|
|
};
|
|
|
|
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}
|
|
echo -n "nix" > target/release/version
|
|
'';
|
|
|
|
# Borrowed from nixpkgs
|
|
# TODO: Remove this patch when updating to next version
|
|
patches = [
|
|
(fetchpatch {
|
|
name = "blink-add-bypass-for-nix.patch";
|
|
url = "https://github.com/Saghen/blink.cmp/commit/6c83ef1ae34abd7ef9a32bfcd9595ac77b61037c.diff?full_index=1";
|
|
hash = "sha256-304F1gDDKVI1nXRvvQ0T1xBN+kHr3jdmwMMp8CNl+GU=";
|
|
})
|
|
];
|
|
|
|
# Module for reproducing issues
|
|
nvimSkipModule = ["repro"];
|
|
}
|