|
4 | 4 | , openssl
|
5 | 5 | , pkg-config
|
6 | 6 | , postgresql
|
7 |
| -, buildPgrxExtension_0_11_3 |
| 7 | +, buildPgrxExtension_0_12_6 |
8 | 8 | , cargo
|
9 | 9 | , darwin
|
10 | 10 | , jq
|
11 | 11 | , rust-bin
|
12 | 12 | }:
|
13 | 13 | let
|
14 |
| - rustVersion = "1.76.0"; |
| 14 | + rustVersion = "1.80.0"; |
15 | 15 | cargo = rust-bin.stable.${rustVersion}.default;
|
16 | 16 | in
|
17 |
| -buildPgrxExtension_0_11_3 rec { |
| 17 | +buildPgrxExtension_0_12_6 rec { |
18 | 18 | pname = "supabase-wrappers";
|
19 |
| - version = "0.4.2"; |
| 19 | + version = "0.4.3"; |
20 | 20 | # update the following array when the wrappers version is updated
|
21 | 21 | # required to ensure that extensions update scripts from previous versions are generated
|
22 |
| - previousVersions = ["0.4.1" "0.4.0" "0.3.1" "0.3.0" "0.2.0" "0.1.19" "0.1.18" "0.1.17" "0.1.16" "0.1.15" "0.1.14" "0.1.12" "0.1.11" "0.1.10" "0.1.9" "0.1.8" "0.1.7" "0.1.6" "0.1.5" "0.1.4" "0.1.1" "0.1.0"]; |
| 22 | + previousVersions = ["0.4.2" "0.4.1" "0.4.0" "0.3.1" "0.3.0" "0.2.0" "0.1.19" "0.1.18" "0.1.17" "0.1.16" "0.1.15" "0.1.14" "0.1.12" "0.1.11" "0.1.10" "0.1.9" "0.1.8" "0.1.7" "0.1.6" "0.1.5" "0.1.4" "0.1.1" "0.1.0"]; |
23 | 23 | inherit postgresql;
|
24 | 24 | src = fetchFromGitHub {
|
25 | 25 | owner = "supabase";
|
26 | 26 | repo = "wrappers";
|
27 | 27 | rev = "v${version}";
|
28 |
| - hash = "sha256-ut3IQED6ANXgabiHoEUdfSrwkuuYYSpRoeWdtBvSe64="; |
| 28 | + hash = "sha256-CkoNMoh40zbQL4V49ZNYgv3JjoNWjODtTpHn+L8DdZA="; |
29 | 29 | };
|
| 30 | + |
30 | 31 | nativeBuildInputs = [ pkg-config cargo ];
|
31 |
| - buildInputs = [ openssl ] ++ lib.optionals (stdenv.isDarwin) [ |
| 32 | + buildInputs = [ openssl postgresql ] ++ lib.optionals (stdenv.isDarwin) [ |
32 | 33 | darwin.apple_sdk.frameworks.CoreFoundation
|
33 | 34 | darwin.apple_sdk.frameworks.Security
|
34 | 35 | darwin.apple_sdk.frameworks.SystemConfiguration
|
35 | 36 | ];
|
| 37 | + |
| 38 | + NIX_LDFLAGS = "-L${postgresql}/lib -lpq"; |
| 39 | + |
| 40 | + # Set necessary environment variables for pgrx |
| 41 | + env = lib.optionalAttrs stdenv.isDarwin { |
| 42 | + POSTGRES_LIB = "${postgresql}/lib"; |
| 43 | + RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup"; |
| 44 | + PGPORT = "5435"; |
| 45 | + }; |
| 46 | + |
36 | 47 | OPENSSL_NO_VENDOR = 1;
|
37 | 48 | #need to set this to 2 to avoid cpu starvation
|
38 | 49 | CARGO_BUILD_JOBS = "2";
|
39 | 50 | CARGO="${cargo}/bin/cargo";
|
| 51 | + |
40 | 52 | cargoLock = {
|
41 | 53 | lockFile = "${src}/Cargo.lock";
|
42 |
| - outputHashes = { |
43 |
| - "clickhouse-rs-1.0.0-alpha.1" = "sha256-0zmoUo/GLyCKDLkpBsnLAyGs1xz6cubJhn+eVqMEMaw="; |
44 |
| - }; |
| 54 | + allowBuiltinFetchGit = true; |
45 | 55 | };
|
46 |
| - postPatch = "cp ${cargoLock.lockFile} Cargo.lock"; |
| 56 | + |
47 | 57 | buildAndTestSubdir = "wrappers";
|
48 | 58 | buildFeatures = [
|
49 | 59 | "helloworld_fdw"
|
|
0 commit comments