Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading