Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions flake/pkgs/by-name/blink-cmp/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
stdenv,
rustPlatform,
fetchFromGitHub,
rust-jemalloc-sys,
writeShellScriptBin,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "blink-cmp";
version = "1.8.0";
version = "1.9.1";

src = fetchFromGitHub {
owner = "Saghen";
repo = "blink.cmp";
tag = "v${finalAttrs.version}";
hash = "sha256-JjlcPj7v9J+v1SDBYIub6jFEslLhZGHmsipV1atUAFo=";
hash = "sha256-GgodXdWpQoF2z1g1/WvnSpfuhskw0aMcOoyZM5l66q8=";
};

forceShare = [
Expand All @@ -31,6 +32,16 @@ rustPlatform.buildRustPackage (finalAttrs: {
mv "$out/lib" "$out/target/release"
'';

# From the blink.cmp flake
buildInputs = lib.optionals stdenv.hostPlatform.isAarch64 [rust-jemalloc-sys];

# NOTE: The only change in frizbee 0.7.0 was nixpkgs incompatible rust semantic changes
# Patch just reverts https://github.com/saghen/blink.cmp/commit/cc824ec85b789a54d05241389993c6ab8c040810
# Taken from Nixpkgs' blink.cmp derivation, available under the MIT license
cargoPatches = [
./patches/0001-pin-frizbee.patch
];

cargoHash = "sha256-Qdt8O7IGj2HySb1jxsv3m33ZxJg96Ckw26oTEEyQjfs=";

nativeBuildInputs = [
Expand Down
29 changes: 29 additions & 0 deletions flake/pkgs/by-name/blink-cmp/patches/0001-pin-frizbee.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/Cargo.lock b/Cargo.lock
index 35bb10e..71c79eb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -144,9 +144,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"

[[package]]
name = "frizbee"
-version = "0.7.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d024031f1a5bc5f19917baa0b618f1067610e35ba23e9f105653fcb27e74f5c"
+checksum = "c3365720de81dac18e889afa72f5907aa061c975548da68e2400c056ebc94aec"
dependencies = [
"multiversion",
"rayon",
diff --git a/Cargo.toml b/Cargo.toml
index 392d1bb..c776c7d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,7 +9,7 @@ crate-type = ["cdylib"]

[dependencies]
regex = "1.11.2"
-frizbee = "0.7.0"
+frizbee = "0.6.0"
mlua = { version = "0.11.3", features = ["module", "luajit"] }
thiserror = "2.0.16"
blake3 = "1.8.2"
Loading