Skip to content

Commit

Permalink
chore: bump wrappers to v0.4.3 (#1286)
Browse files Browse the repository at this point in the history
* chore: bump wrappers to v0.4.3

* fix: pkg changes for wrappers using cargo-pgrx 0.12.6 (#1288)

* fix: pkg changes for wrappers using cargo-pgrx 0.12.6

* chore: cleanup

---------

Co-authored-by: Sam Rose <[email protected]>

---------

Co-authored-by: samrose <[email protected]>
Co-authored-by: Sam Rose <[email protected]>
  • Loading branch information
3 people authored Oct 24, 2024
1 parent 743c6f7 commit d7902e5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ groonga_release_checksum: sha256:1c2d1a6981c1ad3f02a11aff202b15ba30cb1c6147f1fa9
pgroonga_release: "3.0.7"
pgroonga_release_checksum: sha256:885ff3878cc30e9030e5fc56d561bc8b66df3ede1562c9d802bc0ea04fe5c203

wrappers_release: "0.4.2"
wrappers_release: "0.4.3"

hypopg_release: "1.4.1"
hypopg_release_checksum: sha256:9afe6357fd389d8d33fad81703038ce520b09275ec00153c6c89282bcdedd6bc
Expand Down
32 changes: 21 additions & 11 deletions nix/ext/wrappers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,56 @@
, openssl
, pkg-config
, postgresql
, buildPgrxExtension_0_11_3
, buildPgrxExtension_0_12_6
, cargo
, darwin
, jq
, rust-bin
}:
let
rustVersion = "1.76.0";
rustVersion = "1.80.0";
cargo = rust-bin.stable.${rustVersion}.default;
in
buildPgrxExtension_0_11_3 rec {
buildPgrxExtension_0_12_6 rec {
pname = "supabase-wrappers";
version = "0.4.2";
version = "0.4.3";
# update the following array when the wrappers version is updated
# required to ensure that extensions update scripts from previous versions are generated
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"];
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"];
inherit postgresql;
src = fetchFromGitHub {
owner = "supabase";
repo = "wrappers";
rev = "v${version}";
hash = "sha256-ut3IQED6ANXgabiHoEUdfSrwkuuYYSpRoeWdtBvSe64=";
hash = "sha256-CkoNMoh40zbQL4V49ZNYgv3JjoNWjODtTpHn+L8DdZA=";
};

nativeBuildInputs = [ pkg-config cargo ];
buildInputs = [ openssl ] ++ lib.optionals (stdenv.isDarwin) [
buildInputs = [ openssl postgresql ] ++ lib.optionals (stdenv.isDarwin) [
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];

NIX_LDFLAGS = "-L${postgresql}/lib -lpq";

# Set necessary environment variables for pgrx
env = lib.optionalAttrs stdenv.isDarwin {
POSTGRES_LIB = "${postgresql}/lib";
RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup";
PGPORT = "5435";
};

OPENSSL_NO_VENDOR = 1;
#need to set this to 2 to avoid cpu starvation
CARGO_BUILD_JOBS = "2";
CARGO="${cargo}/bin/cargo";

cargoLock = {
lockFile = "${src}/Cargo.lock";
outputHashes = {
"clickhouse-rs-1.0.0-alpha.1" = "sha256-0zmoUo/GLyCKDLkpBsnLAyGs1xz6cubJhn+eVqMEMaw=";
};
allowBuiltinFetchGit = true;
};
postPatch = "cp ${cargoLock.lockFile} Cargo.lock";

buildAndTestSubdir = "wrappers";
buildFeatures = [
"helloworld_fdw"
Expand Down

0 comments on commit d7902e5

Please sign in to comment.