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

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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ common-nix.vars.pkr.hcl

# pre-commit config is managed in nix
.pre-commit-config.yaml
nixos.qcow2
nixos.qcow2
6 changes: 3 additions & 3 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ postgres_major:

# Full version strings for each major version
postgres_release:
postgresorioledb-17: 17.5.1.038-orioledb
postgres17: 17.6.1.017
postgres15: 15.14.1.017
postgresorioledb-17: "17.5.1.036-orioledb-pg-jsonschema-1"
postgres17: "17.6.1.015-pg-jsonschema-1"
postgres15: "15.14.1.015-pg-jsonschema-1"

# Non Postgres Extensions
pgbouncer_release: 1.19.0
Expand Down
3 changes: 2 additions & 1 deletion nix/cargo-pgrx/buildPgrxExtension.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
stdenv,
darwin,
writeShellScriptBin,
defaultBindgenHook,
}:

# The idea behind: Use it mostly like rustPlatform.buildRustPackage and so
Expand All @@ -56,7 +57,7 @@
# enable override to generate bindings using bindgenHook.
# Some older versions of cargo-pgrx use a bindgenHook that is not compatible with the
# current clang version present in stdenv
bindgenHook ? rustPlatform.bindgenHook,
bindgenHook ? defaultBindgenHook,
# cargo-pgrx calls rustfmt on generated bindings, this is not strictly necessary, so we avoid the
# dependency here. Set to false and provide rustfmt in nativeBuildInputs, if you need it, e.g.
# if you include the generated code in the output via postInstall.
Expand Down
5 changes: 5 additions & 0 deletions nix/cargo-pgrx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ let
};
in
{
cargo-pgrx_0_10_2 = mkCargoPgrx {
version = "0.10.2";
hash = "sha256-FqjfbJmSy5UCpPPPk4bkEyvQCnaH9zYtkI7txgIn+ls=";
cargoHash = "sha256-syZ3cQq8qDHBLvqmNDGoxeK6zXHJ47Jwkw3uhaXNCzI=";
};
cargo-pgrx_0_11_3 = mkCargoPgrx {
version = "0.11.3";
hash = "sha256-UHIfwOdXoJvR4Svha6ud0FxahP1wPwUtviUwUnTmLXU=";
Expand Down
21 changes: 21 additions & 0 deletions nix/cargo-pgrx/mkPgrxExtension.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
pgrxVersion,
makeRustPlatform,
rust-bin,
system,
}:
let
inherit ((callPackage ./default.nix { inherit rustVersion; })) mkCargoPgrx;
Expand Down Expand Up @@ -31,8 +32,28 @@ let
inherit (mapping) hash cargoHash;
version = pgrxVersion;
};

bindgenHook =
# Fix bindgen error on aarch64-linux for versions using pgrx with bindgen 0.68.1
# This affects pgrx 0.6.1 through 0.11.2 which have issues with ARM NEON vector ABI
if (builtins.compareVersions "0.11.3" pgrxVersion > 0) then
let
nixos2211 = (
import (builtins.fetchTarball {
url = "https://channels.nixos.org/nixos-22.11/nixexprs.tar.xz";
sha256 = "1j7h75a9hwkkm97jicky5rhvzkdwxsv5v46473rl6agvq2sj97y1";
}) { inherit system; }
);
in
rustPlatform.bindgenHook.overrideAttrs {
libclang = nixos2211.clang.cc.lib;
clang = nixos2211.clang;
}
else
rustPlatform.bindgenHook;
in
callPackage ./buildPgrxExtension.nix {
inherit rustPlatform;
inherit cargo-pgrx;
defaultBindgenHook = bindgenHook;
}
3 changes: 3 additions & 0 deletions nix/cargo-pgrx/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
"rust": {
"1.70.0": {
"cargoHash": "sha256-syZ3cQq8qDHBLvqmNDGoxeK6zXHJ47Jwkw3uhaXNCzI="
},
"1.76.0": {
"cargoHash": "sha256-syZ3cQq8qDHBLvqmNDGoxeK6zXHJ47Jwkw3uhaXNCzI="
}
}
},
Expand Down
26 changes: 0 additions & 26 deletions nix/ext/pg_graphql/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
postgresql,
rust-bin,
rsync,
system,
rustPlatform,
}:

let
Expand Down Expand Up @@ -104,30 +102,6 @@ let
inherit (postgresql.meta) platforms;
};
}
//
lib.optionalAttrs
(
# Fix bindgen error on aarch64-linux for versions using pgrx with bindgen 0.68.1
# This affects pgrx 0.6.1 through 0.11.2 which have issues with ARM NEON vector ABI
# We apply the fix to all versions up to 1.5.1 (last version before 1.5.4 which uses 0.11.2)
builtins.compareVersions "1.5.4" version > 0
)
{
# Fix bindgen error on aarch64-linux by using an older version of clang
bindgenHook =
let
nixos2211 = (
import (builtins.fetchTarball {
url = "https://channels.nixos.org/nixos-22.11/nixexprs.tar.xz";
sha256 = "1j7h75a9hwkkm97jicky5rhvzkdwxsv5v46473rl6agvq2sj97y1";
}) { inherit system; }
);
in
rustPlatform.bindgenHook.overrideAttrs {
libclang = nixos2211.clang.cc.lib;
clang = nixos2211.clang;
};
}
// lib.optionalAttrs (builtins.compareVersions "1.2.0" version >= 0) {
# Add missing Cargo.lock
patches = [ ./0001-Add-missing-Cargo.lock-${version}.patch ];
Expand Down
92 changes: 0 additions & 92 deletions nix/ext/pg_jsonschema.nix

This file was deleted.

Loading