mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-08 09:09:49 +01:00
Compare commits
2 commits
e7cdd3c8a4
...
460232765d
Author | SHA1 | Date | |
---|---|---|---|
|
460232765d | ||
|
8622fd6871 |
3 changed files with 47 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
docs = import ../docs {inherit pkgs inputs lib;};
|
docs = import ../docs {inherit pkgs inputs lib;};
|
||||||
|
pluginVersion = src: src.shortRev or src.shortDirtyRev or "dirty";
|
||||||
in {
|
in {
|
||||||
packages = {
|
packages = {
|
||||||
inherit (docs.manual) htmlOpenTool;
|
inherit (docs.manual) htmlOpenTool;
|
||||||
|
@ -66,6 +67,12 @@
|
||||||
Volumes = {"/home/neovim/demo" = {};};
|
Volumes = {"/home/neovim/demo" = {};};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Plugins that need compiling
|
||||||
|
blink-cmp = pkgs.callPackage ./packages/blink-cmp.nix {
|
||||||
|
src = inputs.plugin-blink-cmp;
|
||||||
|
version = pluginVersion inputs.plugin-blink-cmp;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
35
flake/packages/blink-cmp.nix
Normal file
35
flake/packages/blink-cmp.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
rustPlatform,
|
||||||
|
hostPlatform,
|
||||||
|
vimUtils,
|
||||||
|
src,
|
||||||
|
version,
|
||||||
|
}: let
|
||||||
|
blink-fuzzy-lib = rustPlatform.buildRustPackage {
|
||||||
|
pname = "blink-fuzzy-lib";
|
||||||
|
inherit version src;
|
||||||
|
|
||||||
|
env = {
|
||||||
|
# TODO: remove this if plugin stops using nightly rust
|
||||||
|
RUSTC_BOOTSTRAP = true;
|
||||||
|
};
|
||||||
|
cargoLock = {
|
||||||
|
lockFile = "${src}/Cargo.lock";
|
||||||
|
outputHashes = {
|
||||||
|
"frizbee-0.1.0" = "sha256-pt6sMsRyjXrbrTK7t/YvWeen/n3nU8UUaiNYTY1LczE=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
libExt =
|
||||||
|
if hostPlatform.isDarwin
|
||||||
|
then "dylib"
|
||||||
|
else "so";
|
||||||
|
in
|
||||||
|
vimUtils.buildVimPlugin {
|
||||||
|
pname = "blink-cmp";
|
||||||
|
inherit version src;
|
||||||
|
preInstall = ''
|
||||||
|
mkdir -p target/release
|
||||||
|
ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy.${libExt} target/release/libblink_cmp_fuzzy.${libExt}
|
||||||
|
'';
|
||||||
|
}
|
|
@ -45,6 +45,11 @@
|
||||||
pname = "flutter-tools";
|
pname = "flutter-tools";
|
||||||
patches = [../patches/flutter-tools.patch];
|
patches = [../patches/flutter-tools.patch];
|
||||||
};
|
};
|
||||||
|
blink-cmp = pkgs.callPackage ../../../flake/packages/blink-cmp.nix {
|
||||||
|
src = inputs.plugin-blink-cmp;
|
||||||
|
# TODO: extract into helper func
|
||||||
|
version = inputs.plugin-blink-cmp.shortRev or inputs.plugin-blink-cmp.shortDirtyRev or "dirty";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
buildConfigPlugins = plugins:
|
buildConfigPlugins = plugins:
|
||||||
|
|
Loading…
Reference in a new issue