postgres-lsp: 0-unstable-2024-03-24 -> 0.5.0 (#395576)

authored by Wolfgang Walther and committed by GitHub a74d7150 523d0352

+27 -20
+27 -20
pkgs/by-name/po/postgres-lsp/package.nix
··· 2 2 lib, 3 3 rustPlatform, 4 4 fetchFromGitHub, 5 - protobuf, 6 5 }: 7 - 8 - rustPlatform.buildRustPackage rec { 6 + rustPlatform.buildRustPackage (finalAttrs: { 9 7 pname = "postgres-lsp"; 10 - version = "0-unstable-2024-03-24"; 8 + version = "0.5.0"; 11 9 12 10 src = fetchFromGitHub { 13 - owner = "supabase"; 14 - repo = "postgres_lsp"; 15 - rev = "43ca9b675cb152ca7f38cfa6aff6dd2131dfa9a2"; 16 - hash = "sha256-n7Qbt9fGzC0CcleAtTWDInPz4oaPjI+pvIPrR5EYJ9U="; 11 + owner = "supabase-community"; 12 + repo = "postgres-language-server"; 13 + tag = finalAttrs.version; 14 + hash = "sha256-JRCuqJvC+OBdYe2JORwOfghr7smVLsROwrhk5H+SSkc="; 17 15 fetchSubmodules = true; 18 16 }; 19 17 20 18 useFetchCargoVendor = true; 21 - cargoHash = "sha256-9T3bm/TSjnFeF8iE4338I44espnFq6l36yOq8YFPaPQ="; 19 + cargoHash = "sha256-lUZpjX3HljOXi0Wt2xZCUru8uinWlngLEs5wlqfFiJA="; 22 20 23 21 nativeBuildInputs = [ 24 - protobuf 25 22 rustPlatform.bindgenHook 26 23 ]; 27 24 28 - cargoBuildFlags = [ "-p=postgres_lsp" ]; 29 - cargoTestFlags = cargoBuildFlags; 25 + env = { 26 + SQLX_OFFLINE = 1; 27 + 28 + # As specified in the upstream: https://github.com/supabase-community/postgres-language-server/blob/main/.github/workflows/release.yml 29 + RUSTFLAGS = "-C strip=symbols -C codegen-units=1"; 30 + PGT_VERSION = finalAttrs.version; 31 + }; 30 32 31 - RUSTC_BOOTSTRAP = 1; # We need rust unstable features 33 + cargoBuildFlags = [ "-p=pgt_cli" ]; 34 + cargoTestFlags = finalAttrs.cargoBuildFlags; 35 + checkFlags = [ 36 + # Tries to write to the file system relatively to the current path 37 + "--skip=syntax_error" 38 + ]; 32 39 33 - meta = with lib; { 34 - description = "Language Server for Postgres"; 35 - homepage = "https://github.com/supabase/postgres_lsp"; 36 - license = licenses.mit; 37 - maintainers = with maintainers; [ figsoda ]; 38 - mainProgram = "postgres_lsp"; 40 + meta = { 41 + description = "Tools and language server for Postgres"; 42 + homepage = "https://pgtools.dev"; 43 + license = lib.licenses.mit; 44 + maintainers = with lib.maintainers; [ figsoda ]; 45 + mainProgram = "postgrestools"; 39 46 }; 40 - } 47 + })