flake: use npins for blink-cmp source

This commit is contained in:
raf 2025-02-12 14:36:06 +03:00
parent 14d25e4153
commit 80a4ab903c
No known key found for this signature in database
GPG key ID: EED98D11B85A2819
5 changed files with 36 additions and 32 deletions

17
flake.lock generated
View file

@ -1,21 +1,5 @@
{ {
"nodes": { "nodes": {
"blink-cmp": {
"flake": false,
"locked": {
"lastModified": 1739129359,
"narHash": "sha256-nUrXXiJ7NRxS21H53U323lwEKdo08Y011l8XskXC/vw=",
"owner": "saghen",
"repo": "blink.cmp",
"rev": "b2485c76cb7877de6fe9c8670af59ba3d72fd74d",
"type": "github"
},
"original": {
"owner": "saghen",
"repo": "blink.cmp",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
@ -137,7 +121,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"blink-cmp": "blink-cmp",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"mnw": "mnw", "mnw": "mnw",

View file

@ -98,10 +98,5 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils"; inputs.flake-utils.follows = "flake-utils";
}; };
blink-cmp = {
url = "github:saghen/blink.cmp";
flake = false;
};
}; };
} }

View file

@ -1,4 +1,8 @@
{inputs, ...}: { {
inputs,
self,
...
}: {
perSystem = { perSystem = {
system, system,
inputs', inputs',
@ -9,14 +13,21 @@
overlays = [ overlays = [
inputs.self.overlays.default inputs.self.overlays.default
(final: _: { (final: prev: {
# Build nil from source to get most recent # Build nil from source to get most recent
# features as they are added. # features as they are added.
nil = inputs'.nil.packages.default; nil = inputs'.nil.packages.default;
blink-cmp = final.callPackage ./legacyPackages/blink-cmp.nix { blink-cmp = let
src = inputs.blink-cmp; pin = self.pins.blink-cmp;
version = inputs.blink-cmp.shortRev or inputs.blink-cmp.shortDirtyRev or "dirty"; in
}; final.callPackage ./legacyPackages/blink-cmp.nix {
inherit (pin) version;
src = prev.fetchFromGitHub {
inherit (pin.repository) owner repo;
rev = pin.revision;
sha256 = pin.hash;
};
};
}) })
]; ];
}; };

View file

@ -10,16 +10,16 @@
pname = "blink-fuzzy-lib"; pname = "blink-fuzzy-lib";
inherit version src; inherit version src;
env = { # TODO: remove this if plugin stops using nightly rust
# TODO: remove this if plugin stops using nightly rust env.RUSTC_BOOTSTRAP = true;
RUSTC_BOOTSTRAP = true;
};
nativeBuildInputs = [git]; nativeBuildInputs = [git];
cargoLock = { cargoLock = {
lockFile = "${src}/Cargo.lock"; lockFile = "${src}/Cargo.lock";
allowBuiltinFetchGit = true; allowBuiltinFetchGit = true;
}; };
}; };
libExt = libExt =
if hostPlatform.isDarwin if hostPlatform.isDarwin
then "dylib" then "dylib"

View file

@ -36,6 +36,21 @@
"url": "https://github.com/rrethy/base16-nvim/archive/6ac181b5733518040a33017dde654059cd771b7c.tar.gz", "url": "https://github.com/rrethy/base16-nvim/archive/6ac181b5733518040a33017dde654059cd771b7c.tar.gz",
"hash": "0q47jbh6abn2hql9ghi9ayx3l8pdrdcdrnf4qfk7cp0v1bl7y48r" "hash": "0q47jbh6abn2hql9ghi9ayx3l8pdrdcdrnf4qfk7cp0v1bl7y48r"
}, },
"blink-cmp": {
"type": "GitRelease",
"repository": {
"type": "GitHub",
"owner": "saghen",
"repo": "blink.cmp"
},
"pre_releases": false,
"version_upper_bound": null,
"release_prefix": null,
"version": "v0.11.0",
"revision": "7a70199efe4e333a3693ba3e56ddbec3b9c9c330",
"url": "https://api.github.com/repos/saghen/blink.cmp/tarball/v0.11.0",
"hash": "1j3sj03i72iw5npwwksc7w7axv8z0nbgi11adkfng9ak73kn1gdq"
},
"blink-compat": { "blink-compat": {
"type": "Git", "type": "Git",
"repository": { "repository": {