From acd5c403f0daf68b8e35dd88e91b5b405e4b9182 Mon Sep 17 00:00:00 2001 From: Bo Lu Date: Wed, 23 Oct 2024 11:34:43 +1100 Subject: [PATCH 1/2] chore: bump wrappers to v0.4.3 --- ansible/vars.yml | 2 +- nix/ext/wrappers/default.nix | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/vars.yml b/ansible/vars.yml index 9564c043e..129e1a238 100644 --- a/ansible/vars.yml +++ b/ansible/vars.yml @@ -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 diff --git a/nix/ext/wrappers/default.nix b/nix/ext/wrappers/default.nix index d44af6b50..e768fa494 100644 --- a/nix/ext/wrappers/default.nix +++ b/nix/ext/wrappers/default.nix @@ -4,7 +4,7 @@ , openssl , pkg-config , postgresql -, buildPgrxExtension_0_11_3 +, buildPgrxExtension_0_12_6 , cargo , darwin , jq @@ -14,18 +14,18 @@ let rustVersion = "1.76.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) [ From 68d6ca9f40236b4dead3815e36ebc478fdad870f Mon Sep 17 00:00:00 2001 From: samrose Date: Wed, 23 Oct 2024 01:47:35 -0400 Subject: [PATCH 2/2] 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 --- nix/ext/wrappers/default.nix | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/nix/ext/wrappers/default.nix b/nix/ext/wrappers/default.nix index e768fa494..74b94f9f9 100644 --- a/nix/ext/wrappers/default.nix +++ b/nix/ext/wrappers/default.nix @@ -11,7 +11,7 @@ , rust-bin }: let - rustVersion = "1.76.0"; + rustVersion = "1.80.0"; cargo = rust-bin.stable.${rustVersion}.default; in buildPgrxExtension_0_12_6 rec { @@ -27,23 +27,33 @@ buildPgrxExtension_0_12_6 rec { rev = "v${version}"; 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"