From 8a069a683569aca2b8579789943c517a14e80201 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang <59727193+horriblename@users.noreply.github.com> Date: Tue, 21 Jan 2025 13:35:01 +0800 Subject: [PATCH] blink: move package into legacyPackage --- flake/legacyPackages.nix | 6 +++++- .../build/packages => flake/legacyPackages}/blink-cmp.nix | 4 ++++ modules/wrapper/build/config.nix | 5 +---- 3 files changed, 10 insertions(+), 5 deletions(-) rename {modules/wrapper/build/packages => flake/legacyPackages}/blink-cmp.nix (87%) diff --git a/flake/legacyPackages.nix b/flake/legacyPackages.nix index b77d057a..5b6ccb6d 100644 --- a/flake/legacyPackages.nix +++ b/flake/legacyPackages.nix @@ -9,10 +9,14 @@ overlays = [ inputs.self.overlays.default - (_: _: { + (final: _: { # 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.plugin-blink-cmp; + version = inputs.plugin-blink-cmp.shortRev or inputs.plugin-blink-cmp.shortDirtyRev or "dirty"; + }; }) ]; }; diff --git a/modules/wrapper/build/packages/blink-cmp.nix b/flake/legacyPackages/blink-cmp.nix similarity index 87% rename from modules/wrapper/build/packages/blink-cmp.nix rename to flake/legacyPackages/blink-cmp.nix index 537995f8..002269b9 100644 --- a/modules/wrapper/build/packages/blink-cmp.nix +++ b/flake/legacyPackages/blink-cmp.nix @@ -10,6 +10,10 @@ pname = "blink-fuzzy-lib"; inherit version src; + env = { + # TODO: remove this if plugin stops using nightly rust + RUSTC_BOOTSTRAP = true; + }; nativeBuildInputs = [git]; cargoLock = { lockFile = "${src}/Cargo.lock"; diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index 6a1c031b..88745fb5 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -61,10 +61,7 @@ "flutter-tools.dev_tools" ]; }; - blink-cmp = pkgs.callPackage ./packages/blink-cmp.nix { - src = inputs.plugin-blink-cmp; - version = inputs.plugin-blink-cmp.shortRev or inputs.plugin-blink-cmp.shortDirtyRev or "dirty"; - }; + inherit (pkgs) blink-cmp; }; buildConfigPlugins = plugins: