flake: use npins for blink-cmp source

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

View file

@ -1,4 +1,8 @@
{inputs, ...}: {
{
inputs,
self,
...
}: {
perSystem = {
system,
inputs',
@ -9,14 +13,21 @@
overlays = [
inputs.self.overlays.default
(final: _: {
(final: prev: {
# Build nil from source to get most recent
# features as they are added.
nil = inputs'.nil.packages.default;
blink-cmp = final.callPackage ./legacyPackages/blink-cmp.nix {
src = inputs.blink-cmp;
version = inputs.blink-cmp.shortRev or inputs.blink-cmp.shortDirtyRev or "dirty";
};
blink-cmp = let
pin = self.pins.blink-cmp;
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";
inherit version src;
env = {
# TODO: remove this if plugin stops using nightly rust
RUSTC_BOOTSTRAP = true;
};
# TODO: remove this if plugin stops using nightly rust
env.RUSTC_BOOTSTRAP = true;
nativeBuildInputs = [git];
cargoLock = {
lockFile = "${src}/Cargo.lock";
allowBuiltinFetchGit = true;
};
};
libExt =
if hostPlatform.isDarwin
then "dylib"