nvim-dbee: build manually instead of using luarocks package (#383940)

Changed files
+72 -26
maintainers
pkgs
applications
editors
vim
plugins
non-generated
nvim-dbee
development
-1
maintainers/scripts/luarocks-packages.csv
···
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,,,,,,
+69
pkgs/applications/editors/vim/plugins/non-generated/nvim-dbee/default.nix
···
+
{
+
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 ];
+
};
+
}
+2 -1
pkgs/applications/editors/vim/plugins/overrides.nix
···
dependencies = [ self.nvim-dap ];
};
+
nvim-dbee = callPackage ./non-generated/nvim-dbee { };
+
nvim-coverage = super.nvim-coverage.overrideAttrs {
dependencies = with self; [
neotest
···
"neotest"
"nui-nvim"
"nvim-cmp"
-
"nvim-dbee"
"nvim-nio"
"nvim-web-devicons"
"oil-nvim"
+1
pkgs/development/lua-modules/aliases.nix
···
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
}
-24
pkgs/development/lua-modules/generated-packages.nix
···
};
}) {};
-
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";