From e991b42b9b31514e7cd27c6bb0f7c54b8ae83268 Mon Sep 17 00:00:00 2001 From: Heitor Augusto Date: Sun, 2 Mar 2025 20:58:24 -0300 Subject: [PATCH 1/2] vimPlugins.blink-cmp: remove old patch and use upstream bypass method --- .../vim/plugins/non-generated/blink-cmp/default.nix | 10 ++++++++-- .../non-generated/blink-cmp/force-version.patch | 11 ----------- 2 files changed, 8 insertions(+), 13 deletions(-) delete mode 100644 pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/force-version.patch diff --git a/pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/default.nix index 6d9edb165cd8..24c457f92ea1 100644 --- a/pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/default.nix +++ b/pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/default.nix @@ -2,11 +2,11 @@ lib, rustPlatform, fetchFromGitHub, + fetchpatch, stdenv, vimUtils, nix-update-script, git, - replaceVars, }: let version = "0.13.1"; @@ -41,10 +41,16 @@ vimUtils.buildVimPlugin { '' mkdir -p target/release ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy${ext} target/release/libblink_cmp_fuzzy${ext} + echo -n "nix" > target/release/version ''; + # TODO: Remove this patch when updating to next version patches = [ - (replaceVars ./force-version.patch { inherit (src) tag; }) + (fetchpatch { + name = "blink-add-bypass-for-nix.patch"; + url = "https://github.com/Saghen/blink.cmp/commit/6c83ef1ae34abd7ef9a32bfcd9595ac77b61037c.patch"; + hash = "sha256-304F1gDDKVI1nXRvvQ0T1xBN+kHr3jdmwMMp8CNl+GU="; + }) ]; passthru = { diff --git a/pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/force-version.patch b/pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/force-version.patch deleted file mode 100644 index 3a32ac09ef30..000000000000 --- a/pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/force-version.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/lua/blink/cmp/fuzzy/download/init.lua -+++ b/lua/blink/cmp/fuzzy/download/init.lua -@@ -21,7 +21,7 @@ function download.ensure_downloaded(callback) - } - end) - :map(function(version) -- local target_git_tag = download_config.force_version or version.git.tag -+ local target_git_tag = download_config.force_version or '@tag@' - - -- not built locally, not on a git tag, error - assert( From d39e23d37c832cd2e58c670fae7f1f59701b32d4 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Mon, 3 Mar 2025 11:33:38 +0100 Subject: [PATCH 2/2] vimPlugins.blink-cmp: fetch patches using a URL that gives us stable diffs --- .../editors/vim/plugins/non-generated/blink-cmp/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/default.nix index 24c457f92ea1..9ed2640a853f 100644 --- a/pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/default.nix +++ b/pkgs/applications/editors/vim/plugins/non-generated/blink-cmp/default.nix @@ -48,7 +48,7 @@ vimUtils.buildVimPlugin { patches = [ (fetchpatch { name = "blink-add-bypass-for-nix.patch"; - url = "https://github.com/Saghen/blink.cmp/commit/6c83ef1ae34abd7ef9a32bfcd9595ac77b61037c.patch"; + url = "https://github.com/Saghen/blink.cmp/commit/6c83ef1ae34abd7ef9a32bfcd9595ac77b61037c.diff?full_index=1"; hash = "sha256-304F1gDDKVI1nXRvvQ0T1xBN+kHr3jdmwMMp8CNl+GU="; }) ];