Files
nixpkgs/pkgs/by-name/po/postgres-lsp/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

56 lines
1.3 KiB
Nix

{
lib,
rustPlatform,
fetchgit,
rust-jemalloc-sys,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "postgres-lsp";
version = "0.15.0";
src = fetchgit {
url = "https://github.com/supabase-community/postgres-language-server";
tag = finalAttrs.version;
hash = "sha256-ZintjrSeNsYR6A8tlEfSetse7d79jgLdCpdu+sMe3Zk=";
fetchSubmodules = true;
};
cargoHash = "sha256-x/Wbx3noH6YOQIis1sN8ylQApjhSy4/mrxX6jvZFs6A=";
nativeBuildInputs = [
rustPlatform.bindgenHook
];
buildInputs = [
rust-jemalloc-sys
];
env = {
SQLX_OFFLINE = 1;
# As specified in the upstream: https://github.com/supabase-community/postgres-language-server/blob/main/.github/workflows/release.yml
RUSTFLAGS = "-C strip=symbols -C codegen-units=1";
PGT_VERSION = finalAttrs.version;
};
cargoBuildFlags = [ "-p=pgt_cli" ];
cargoTestFlags = finalAttrs.cargoBuildFlags;
checkFlags = [
# Tries to write to the file system relatively to the current path
"--skip=syntax_error"
# Requires a database connection
"--skip=test_cli_check_command"
];
meta = {
description = "Tools and language server for Postgres";
homepage = "https://pgtools.dev";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
figsoda
myypo
];
mainProgram = "postgrestools";
};
})