-
-
Notifications
You must be signed in to change notification settings - Fork 169
/
Copy pathpg_graphql.nix
39 lines (33 loc) · 1.2 KB
/
pg_graphql.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ lib, stdenv, fetchFromGitHub, postgresql, buildPgrxExtension_0_11_3, cargo }:
buildPgrxExtension_0_11_3 rec {
pname = "pg_graphql";
version = "1.5.7";
inherit postgresql;
src = fetchFromGitHub {
owner = "supabase";
repo = pname;
rev = "v${version}";
hash = "sha256-Q6XfcTKVOjo5pGy8QACc4QCHolKxEGU8e0TTC6Zg8go=";
};
nativeBuildInputs = [ cargo ];
buildInputs = [ postgresql ];
CARGO="${cargo}/bin/cargo";
#darwin env needs PGPORT to be unique for build to not clash with other pgrx extensions
env = lib.optionalAttrs stdenv.isDarwin {
POSTGRES_LIB = "${postgresql}/lib";
RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup";
PGPORT = "5434";
};
cargoHash = "sha256-WkHufMw8OvinMRYd06ZJACnVvY9OLi069nCgq3LSmMY=";
# FIXME (aseipp): disable the tests since they try to install .control
# files into the wrong spot, aside from that the one main test seems
# to work, though
doCheck = false;
meta = with lib; {
description = "GraphQL support for PostreSQL";
homepage = "https://github.com/supabase/${pname}";
maintainers = with maintainers; [ samrose ];
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
};
}