|
1 | 1 | {
|
2 |
| - description = "Set of simple, performant neovim plugins"; |
| 2 | + description = "Super amazing neovim completion plugin"; |
3 | 3 |
|
4 | 4 | inputs = {
|
5 |
| - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; |
| 5 | + nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling"; |
| 6 | + devenv.url = "github:cachix/devenv"; |
6 | 7 | flake-parts.url = "github:hercules-ci/flake-parts";
|
| 8 | + fenix.url = "github:nix-community/fenix"; |
| 9 | + fenix.inputs.nixpkgs.follows = "nixpkgs"; |
7 | 10 | };
|
8 | 11 |
|
9 |
| - outputs = inputs@{ flake-parts, nixpkgs, ... }: |
| 12 | + nixConfig = { |
| 13 | + extra-trusted-public-keys = |
| 14 | + "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="; |
| 15 | + extra-substituters = "https://devenv.cachix.org"; |
| 16 | + }; |
| 17 | + |
| 18 | + outputs = inputs@{ flake-parts, nixpkgs, fenix, ... }: |
10 | 19 | flake-parts.lib.mkFlake { inherit inputs; } {
|
| 20 | + imports = [ inputs.devenv.flakeModule ]; |
11 | 21 | systems = [
|
12 | 22 | "x86_64-linux"
|
13 | 23 | "i686-linux"
|
|
18 | 28 |
|
19 | 29 | perSystem = { config, self', inputs', pkgs, system, lib, ... }: {
|
20 | 30 | # define the packages provided by this flake
|
21 |
| - packages = { |
22 |
| - blink-nvim = pkgs.vimUtils.buildVimPlugin { |
23 |
| - pname = "blink-nvim"; |
24 |
| - version = "2024-07-25"; |
| 31 | + packages = let |
| 32 | + toolchain = fenix.packages.${system}.minimal.toolchain; |
| 33 | + rustPlatform = pkgs.makeRustPlatform { |
| 34 | + cargo = toolchain; |
| 35 | + rustc = toolchain; |
| 36 | + }; |
| 37 | + fuzzy = rustPlatform.buildRustPackage { |
| 38 | + pname = "blink-cmp-lib"; |
| 39 | + version = "2024-07-26"; |
25 | 40 |
|
26 | 41 | src = ./.;
|
| 42 | + |
| 43 | + cargoLock = { |
| 44 | + lockFile = ./Cargo.lock; |
| 45 | + outputHashes = { |
| 46 | + "c-marshalling-0.2.0" = |
| 47 | + "sha256-eL6nkZOtuLLQ0r31X7uroUUDYZsWOJ9KNXl4NCVNRuw="; |
| 48 | + "frizbee-0.1.0" = |
| 49 | + "sha256-+Os6ioFXB2K86V/8Z2xNxmO7jo3RLC9VKpuztQRrIgE="; |
| 50 | + }; |
| 51 | + }; |
27 | 52 | };
|
| 53 | + in { |
| 54 | + blink-cmp = pkgs.vimUtils.buildVimPlugin { |
| 55 | + pname = "blink-cmp"; |
| 56 | + version = "2024-07-26"; |
| 57 | + |
| 58 | + src = ./.; |
| 59 | + |
| 60 | + preInstall = '' |
| 61 | + mkdir -p target/release |
| 62 | + ln -s ${fuzzy}/lib/libblink_cmp_fuzzy.so target/release/libblink_cmp_fuzzy.so |
| 63 | + ''; |
28 | 64 |
|
29 |
| - default = self'.packages.blink-nvim; |
| 65 | + meta = { |
| 66 | + description = "Super amazing neovim completion plugin"; |
| 67 | + homepage = "https://github.com/saghen/blink.cmp"; |
| 68 | + license = lib.licenses.mit; |
| 69 | + maintainers = with lib.maintainers; [ redxtech ]; |
| 70 | + }; |
| 71 | + }; |
| 72 | + |
| 73 | + default = self'.packages.blink-cmp; |
| 74 | + }; |
| 75 | + |
| 76 | + # define the default dev environment |
| 77 | + devenv.shells.default = { |
| 78 | + name = "fuzzy"; |
| 79 | + |
| 80 | + languages.rust = { |
| 81 | + enable = true; |
| 82 | + channel = "nightly"; |
| 83 | + }; |
30 | 84 | };
|
31 | 85 | };
|
32 | 86 | };
|
|
0 commit comments