2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, protobuf
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "postgres-lsp";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "unstable-2024-01-11";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
2023-10-09 19:29:22 +00:00
|
|
|
owner = "supabase";
|
|
|
|
repo = "postgres_lsp";
|
2024-01-25 14:12:00 +00:00
|
|
|
rev = "bbc24cc541cd1619997193ed81ad887252c7e467";
|
|
|
|
hash = "sha256-llVsHSEUDRsqjSTGr3hGUK6jYlKPX60rpjngBk1TG2Y=";
|
2023-10-09 19:29:22 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
cargoHash = "sha256-Npx/sSbMr4PKnNPslvjpOyKH0bpQLzW6cLNW+7H/TQ0=";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
protobuf
|
|
|
|
rustPlatform.bindgenHook
|
|
|
|
];
|
|
|
|
|
|
|
|
cargoBuildFlags = [ "-p=postgres_lsp" ];
|
|
|
|
cargoTestFlags = cargoBuildFlags;
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
RUSTC_BOOTSTRAP = 1; # We need rust unstable features
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A Language Server for Postgres";
|
|
|
|
homepage = "https://github.com/supabase/postgres_lsp";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
mainProgram = "postgres_lsp";
|
|
|
|
};
|
|
|
|
}
|