diff --git a/flake/pkgs/by-name/blink-cmp/package.nix b/flake/pkgs/by-name/blink-cmp/package.nix index 5dba17a6..7c6371d1 100644 --- a/flake/pkgs/by-name/blink-cmp/package.nix +++ b/flake/pkgs/by-name/blink-cmp/package.nix @@ -1,17 +1,19 @@ { + lib, + stdenv, rustPlatform, fetchFromGitHub, writeShellScriptBin, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "blink-cmp"; - version = "1.6.0"; + version = "1.8.0"; src = fetchFromGitHub { owner = "Saghen"; repo = "blink.cmp"; tag = "v${finalAttrs.version}"; - hash = "sha256-IHRYgKcYP+JDGu8Vtawgzlhq25vpROFqb8KmpfVMwCk="; + hash = "sha256-JjlcPj7v9J+v1SDBYIub6jFEslLhZGHmsipV1atUAFo="; }; forceShare = [ @@ -29,11 +31,24 @@ rustPlatform.buildRustPackage (finalAttrs: { mv "$out/lib" "$out/target/release" ''; - cargoHash = "sha256-QsVCugYWRri4qu64wHnbJQZBhy4tQrr+gCYbXtRBlqE="; + cargoHash = "sha256-Qdt8O7IGj2HySb1jxsv3m33ZxJg96Ckw26oTEEyQjfs="; nativeBuildInputs = [ (writeShellScriptBin "git" "exit 1") ]; - env.RUSTC_BOOTSTRAP = true; + env = { + RUSTC_BOOTSTRAP = true; + + # Those are the Linker args used by upstream. Without those, the build fails. + # See: + # + RUSTFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-C link-arg=-undefined -C link-arg=dynamic_lookup"; + }; + + meta = { + description = "Performant, batteries-included completion plugin for Neovim"; + homepage = "https://github.com/saghen/blink.cmp"; + changelog = "https://github.com/Saghen/blink.cmp/blob/v${finalAttrs.version}/CHANGELOG.md"; + }; })