1{
2 buildPgrxExtension,
3 cargo-pgrx_0_16_0,
4 fetchFromGitHub,
5 lib,
6 nix-update-script,
7 postgresql,
8}:
9buildPgrxExtension (finalAttrs: {
10 inherit postgresql;
11 cargo-pgrx = cargo-pgrx_0_16_0;
12
13 pname = "pg_graphql";
14 version = "1.5.12-unstable-2025-09-01";
15
16 src = fetchFromGitHub {
17 owner = "supabase";
18 repo = "pg_graphql";
19 # ToDo: 1.5.12 has not been tagged in Git yet, hence `rev` is used instead for now
20 #tag = "v${finalAttrs.version}";
21 rev = "bae1cb506d48d14ccf2b05f6a42331f3c9c71a76";
22 hash = "sha256-aJPstwzizWzVIo1N/4CHKgJBJ7DJpRkrwYrzNL+z7zQ=";
23 };
24
25 cargoHash = "sha256-Gfvu6YY+pRGrcAXAgEIa1iZKLJlbkvMv0F3pg3X/CXQ=";
26
27 # pgrx tests try to install the extension into postgresql nix store
28 doCheck = false;
29
30 passthru = {
31 updateScript = nix-update-script { };
32 };
33
34 meta = {
35 description = "GraphQL support for PostgreSQL";
36 homepage = "https://supabase.github.io/pg_graphql";
37 license = lib.licenses.asl20;
38 maintainers = with lib.maintainers; [ julm ];
39 broken =
40 lib.versionOlder postgresql.version "14"
41 || (
42 # ToDo: check after next package update.
43 lib.versionAtLeast postgresql.version "18"
44 && (
45 finalAttrs.version == "1.5.12-unstable-2025-09-01"
46 || lib.warn "Is postgresql18Packages.pg_graphql still broken?" false
47 )
48 );
49 };
50})