Merge pull request #321030 from GaetanLepage/codesnap
vimPlugins.codesnap-nvim: init at 2024-05-08
This commit is contained in:
commit
9b8794fc6f
@ -60,6 +60,9 @@
|
||||
, zsh
|
||||
, # codeium-nvim dependencies
|
||||
codeium
|
||||
, # codesnap-nvim dependencies
|
||||
clang
|
||||
, libuv
|
||||
, # command-t dependencies
|
||||
getconf
|
||||
, ruby
|
||||
@ -400,6 +403,50 @@
|
||||
'';
|
||||
};
|
||||
|
||||
codesnap-nvim =
|
||||
let
|
||||
version = "1.3.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mistricky";
|
||||
repo = "codesnap.nvim";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-nS/bAWsBQ1L4M9437Yp6FdmHoogzalKlLIAXnRZyMp0=";
|
||||
};
|
||||
codesnap-lib = rustPlatform.buildRustPackage {
|
||||
pname = "codesnap-lib";
|
||||
inherit version src;
|
||||
|
||||
sourceRoot = "${src.name}/generator";
|
||||
|
||||
cargoHash = "sha256-FTQl5WIGEf+RQKYJ4BbIE3cCeN+NYUp7VXIrpxB05tU=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
rustPlatform.bindgenHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libuv.dev
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.AppKit
|
||||
];
|
||||
};
|
||||
in
|
||||
buildVimPlugin {
|
||||
pname = "codesnap.nvim";
|
||||
inherit version src;
|
||||
|
||||
# https://github.com/mistricky/codesnap.nvim/blob/main/scripts/build_generator.sh
|
||||
postInstall = let
|
||||
extension = if stdenv.isDarwin then "dylib" else "so";
|
||||
in ''
|
||||
cp ${codesnap-lib}/lib/libgenerator.${extension} lua/generator.so
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
nvimRequireCheck = "codesnap";
|
||||
};
|
||||
|
||||
command-t = super.command-t.overrideAttrs {
|
||||
nativeBuildInputs = [ getconf ruby ];
|
||||
buildPhase = ''
|
||||
|
@ -191,6 +191,7 @@ https://github.com/neoclide/coc.nvim/,release,
|
||||
https://github.com/manicmaniac/coconut.vim/,HEAD,
|
||||
https://github.com/Exafunction/codeium.nvim/,HEAD,
|
||||
https://github.com/Exafunction/codeium.vim/,HEAD,
|
||||
https://github.com/mistricky/codesnap.nvim/,HEAD,
|
||||
https://github.com/gorbit99/codewindow.nvim/,HEAD,
|
||||
https://github.com/metakirby5/codi.vim/,,
|
||||
https://github.com/tjdevries/colorbuddy.nvim/,,
|
||||
|
Loading…
Reference in New Issue
Block a user