nvim-dbee: build manually instead of using luarocks package (#383940)
This commit is contained in:
@@ -123,7 +123,6 @@ neotest,,,,,,mrcjkb
|
||||
nlua,,,,,,teto
|
||||
nui.nvim,,,,,,mrcjkb
|
||||
nvim-cmp,https://raw.githubusercontent.com/hrsh7th/nvim-cmp/main/nvim-cmp-scm-1.rockspec,,,,,
|
||||
nvim-dbee,,,,,,perchun
|
||||
nvim-nio,,,,,,mrcjkb
|
||||
nvim-web-devicons,,,,,,
|
||||
oil.nvim,,,,,,
|
||||
|
||||
|
@@ -0,0 +1,69 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
arrow-cpp,
|
||||
duckdb,
|
||||
nix-update-script,
|
||||
stdenv,
|
||||
vimPlugins,
|
||||
vimUtils,
|
||||
}:
|
||||
let
|
||||
version = "0.1.9";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kndndrj";
|
||||
repo = "nvim-dbee";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-AOime4vG0NFcUvsd9Iw5SxR7WaeCsoCRU6h5+vSkt4M=";
|
||||
};
|
||||
dbee-bin = buildGoModule {
|
||||
pname = "dbee-bin";
|
||||
inherit version;
|
||||
|
||||
src = "${src}/dbee";
|
||||
|
||||
vendorHash = "sha256-U/3WZJ/+Bm0ghjeNUILsnlZnjIwk3ySaX3Rd4L9Z62A=";
|
||||
buildInputs = [
|
||||
arrow-cpp
|
||||
duckdb
|
||||
];
|
||||
|
||||
# Tests attempt to access `/etc/protocols` which is forbidden in the sandbox
|
||||
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||
|
||||
meta.mainProgram = "dbee";
|
||||
};
|
||||
in
|
||||
vimUtils.buildVimPlugin {
|
||||
pname = "nvim-dbee";
|
||||
inherit version src;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace lua/dbee/install/init.lua \
|
||||
--replace-fail 'return vim.fn.stdpath("data") .. "/dbee/bin"' 'return "${dbee-bin}/bin"'
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
mkdir $target/bin
|
||||
ln -s ${lib.getExe dbee-bin} $target/bin/dbee
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
attrPath = "vimPlugins.nvim-dbee.dbee-lib";
|
||||
};
|
||||
|
||||
# needed for the update script
|
||||
inherit dbee-bin;
|
||||
};
|
||||
|
||||
dependencies = [ vimPlugins.nui-nvim ];
|
||||
|
||||
meta = {
|
||||
description = "Interactive database client for neovim";
|
||||
homepage = "https://github.com/kndndrj/nvim-dbee";
|
||||
changelog = "https://github.com/kndndrj/nvim-dbee/releases/tag/v${version}";
|
||||
maintainers = with lib.maintainers; [ perchun ];
|
||||
};
|
||||
}
|
||||
@@ -2267,6 +2267,8 @@ in
|
||||
dependencies = [ self.nvim-dap ];
|
||||
};
|
||||
|
||||
nvim-dbee = callPackage ./non-generated/nvim-dbee { };
|
||||
|
||||
nvim-coverage = super.nvim-coverage.overrideAttrs {
|
||||
dependencies = with self; [
|
||||
neotest
|
||||
@@ -4035,7 +4037,6 @@ in
|
||||
"neotest"
|
||||
"nui-nvim"
|
||||
"nvim-cmp"
|
||||
"nvim-dbee"
|
||||
"nvim-nio"
|
||||
"nvim-web-devicons"
|
||||
"oil-nvim"
|
||||
|
||||
@@ -42,4 +42,5 @@ mapAliases {
|
||||
nlua-nvim = throw "nlua-nvim was removed, use neodev-nvim instead"; # added 2023-12-16
|
||||
nvim-client = throw "nvim-client was removed because it is now part of neovim"; # added 2023-12-17
|
||||
toml = throw "toml was removed because broken. You can use toml-edit instead"; # added 2024-06-25
|
||||
nvim-dbee = throw "nvim-dbee was removed because broken. You can use vimPlugins.nvim-dbee instead"; # added 2024-06-25
|
||||
}
|
||||
|
||||
@@ -2933,30 +2933,6 @@ buildLuarocksPackage {
|
||||
};
|
||||
}) {};
|
||||
|
||||
nvim-dbee = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder, nui-nvim }:
|
||||
buildLuarocksPackage {
|
||||
pname = "nvim-dbee";
|
||||
version = "0.1.9-1";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "mirror://luarocks/nvim-dbee-0.1.9-1.rockspec";
|
||||
sha256 = "1lmzy6ivnwvhzclkfbcswj2mznrpc4i8s3ivdrc78rr86i49mvpg";
|
||||
}).outPath;
|
||||
src = fetchzip {
|
||||
url = "https://github.com/kndndrj/nvim-dbee/archive/v0.1.9.zip";
|
||||
sha256 = "10xplksglyd8af8q1cl2lxcpn52b766g87gva9fd3l66idxsds00";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
propagatedBuildInputs = [ nui-nvim ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/kndndrj/nvim-dbee";
|
||||
description = "Interactive database client for neovim";
|
||||
maintainers = with lib.maintainers; [ perchun ];
|
||||
license.fullName = "GPL-3.0";
|
||||
};
|
||||
}) {};
|
||||
|
||||
nvim-nio = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder }:
|
||||
buildLuarocksPackage {
|
||||
pname = "nvim-nio";
|
||||
|
||||
Reference in New Issue
Block a user