Skip to content

Commit 75dc310

Browse files
committed
fix: rebase on develop and fix code api changes from nixpkgs
1 parent cd1cde8 commit 75dc310

File tree

12 files changed

+50
-113
lines changed

12 files changed

+50
-113
lines changed

flake.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz";
1111
flake-parts.url = "github:hercules-ci/flake-parts";
1212
nixpkgs-go124.url = "github:Nixos/nixpkgs/d2ac4dfa61fba987a84a0a81555da57ae0b9a2b0";
13-
<<<<<<< HEAD
14-
nixpkgs-pgbackrest.url = "github:nixos/nixpkgs/nixos-unstable-small";
15-
=======
1613
flake-utils.url = "github:numtide/flake-utils";
1714
treefmt-nix = {
1815
url = "github:numtide/treefmt-nix";
@@ -40,7 +37,6 @@
4037
url = "github:cachix/git-hooks.nix";
4138
inputs.nixpkgs.follows = "nixpkgs";
4239
};
43-
>>>>>>> af3f6596 (chore: update (and refactor) flake inputs)
4440
};
4541

4642
outputs =

nix/cargo-pgrx/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
lib,
3-
darwin,
3+
apple-sdk_11,
44
fetchCrate,
55
openssl,
66
pkg-config,
@@ -36,7 +36,7 @@ let
3636
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
3737
buildInputs =
3838
lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
39-
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ];
39+
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];
4040

4141
OPENSSL_DIR = "${openssl.dev}";
4242
OPENSSL_INCLUDE_DIR = "${openssl.dev}/include";

nix/checks.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
{
33
perSystem =
44
{
5-
lib,
65
self',
76
system,
87
pkgs,

nix/ext/plv8.nix

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# to nixpkgs
1010
clang,
1111
xcbuild,
12-
darwin,
12+
apple-sdk_11,
1313
patchelf,
1414
}:
1515
let
@@ -50,8 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
5050
postgresql
5151
]
5252
++ lib.optionals stdenv.isDarwin [
53-
darwin.apple_sdk.frameworks.CoreFoundation
54-
darwin.apple_sdk.frameworks.Kerberos
53+
apple-sdk_11
5554
];
5655

5756
buildFlags = [ "all" ];
@@ -77,10 +76,8 @@ stdenv.mkDerivation (finalAttrs: {
7776
"-lpq"
7877
"-lpgcommon"
7978
"-lpgport"
80-
"-F${darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks"
8179
"-framework"
8280
"CoreFoundation"
83-
"-F${darwin.apple_sdk.frameworks.Kerberos}/Library/Frameworks"
8481
"-framework"
8582
"Kerberos"
8683
"-undefined"

nix/ext/postgis.nix

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,32 +48,9 @@ let
4848
"postgis_topology"
4949
];
5050

51-
<<<<<<< HEAD
5251
sqlExtensions = [
5352
"address_standardizer_data_us"
5453
"postgis_tiger_geocoder"
55-
=======
56-
src = fetchurl {
57-
url = "https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz";
58-
sha256 = "sha256-UHJKDd5JrcJT5Z4CTYsY/va+ToU0GUPG1eHhuXTkP84=";
59-
};
60-
61-
buildInputs = [
62-
libxml2
63-
postgresql
64-
geos
65-
proj
66-
gdal
67-
json_c
68-
protobufc
69-
pcre2.dev
70-
sfcgal
71-
]
72-
++ lib.optional stdenv.isDarwin libiconv;
73-
nativeBuildInputs = [
74-
perl
75-
pkg-config
76-
>>>>>>> 4847adac (chore: update fmt)
7754
];
7855

7956
# Build function for individual versions

nix/ext/tests/lib.py

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ def assert_version_matches(self, expected_version: str):
8484
AssertionError: If the installed version does not match the expected version
8585
"""
8686
installed_version = self.get_installed_version()
87-
assert (
88-
installed_version == expected_version
89-
), f"Expected version {expected_version}, but found {installed_version}"
87+
assert installed_version == expected_version, (
88+
f"Expected version {expected_version}, but found {installed_version}"
89+
)
9090

9191
def check_upgrade_path(self, pg_version: str):
9292
"""Test the complete upgrade path for a PostgreSQL version.
@@ -172,37 +172,6 @@ def check_switch_extension_with_background_worker(
172172
self.vm.succeed(f"switch_{self.extension_name}_version {last_version}")
173173
# Check that we are using the last version now
174174
ext_version = self.vm.succeed(f"readlink -f {extension_lib_path}").strip()
175-
assert ext_version.endswith(
176-
f"{last_version}.so"
177-
), f"Expected {self.extension_name} version {last_version}, but found {ext_version}"
178-
179-
def check_pg_regress(self, pg_regress: Path, pg_version: str, test_name: str):
180-
"""Run pg_regress tests for the extension on a given PostgreSQL version.
181-
182-
Args:
183-
pg_regress: Path to the pg_regress binary
184-
pg_version: PostgreSQL version to test (e.g., "14", "15")
185-
test_name: SQL test file to run with pg_regress
186-
"""
187-
sql_file = self.sql_test_dir / "sql" / f"{test_name}.sql"
188-
if not sql_file.exists():
189-
# check if we have a postgres version specific sql file
190-
test_name = f"z_{pg_version}_{test_name}"
191-
sql_file = self.sql_test_dir / "sql" / f"{test_name}.sql"
192-
if not sql_file.exists():
193-
print(f"Skipping pg_regress test for {pg_version}, no sql file found")
194-
return
195-
try:
196-
print(
197-
self.vm.succeed(
198-
f"""sudo -u postgres {pg_regress} --inputdir={self.sql_test_dir} --debug --use-existing --dbname=postgres --outputdir=/tmp/regression_output_{pg_version} "{test_name}" """
199-
)
200-
)
201-
except:
202-
print("Error running pg_regress, diff:")
203-
print(
204-
self.vm.succeed(
205-
f"cat /tmp/regression_output_{pg_version}/regression.diffs"
206-
)
207-
)
208-
raise
175+
assert ext_version.endswith(f"{self.extension_name}-{last_version}.so"), (
176+
f"Expected {self.extension_name} version {last_version}, but found {ext_version}"
177+
)

nix/ext/wrappers/default.nix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
pkg-config,
88
postgresql,
99
buildEnv,
10-
darwin,
10+
apple-sdk_11,
1111
rust-bin,
1212
git,
1313
}:
@@ -42,9 +42,7 @@ let
4242
postgresql
4343
]
4444
++ lib.optionals stdenv.isDarwin [
45-
darwin.apple_sdk.frameworks.CoreFoundation
46-
darwin.apple_sdk.frameworks.Security
47-
darwin.apple_sdk.frameworks.SystemConfiguration
45+
apple-sdk_11
4846
];
4947

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

nix/overlays/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
cargo-pgrx = final.callPackage ../cargo-pgrx/default.nix {
2121
inherit (final) lib;
22-
inherit (final) darwin;
22+
inherit (final) apple-sdk_11;
2323
inherit (final) fetchCrate;
2424
inherit (final) openssl;
2525
inherit (final) pkg-config;

nix/packages/packer.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ buildGoModule rec {
3333
nativeBuildInputs = [ installShellFiles ];
3434

3535
buildInputs = lib.optionals pkgs.stdenv.isDarwin [
36-
pkgs.darwin.apple_sdk.frameworks.IOKit
37-
pkgs.darwin.apple_sdk.frameworks.Security
36+
pkgs.apple-sdk_11
3837
];
3938

4039
postInstall = ''

0 commit comments

Comments
 (0)