Skip to content

Commit a33cf5d

Browse files
committed
fix: rebase on develop and fix code api changes from nixpkgs
1 parent 134e133 commit a33cf5d

File tree

12 files changed

+65
-63
lines changed

12 files changed

+65
-63
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.

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,
@@ -33,7 +33,7 @@ let
3333
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
3434
buildInputs =
3535
lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
36-
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ];
36+
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];
3737

3838
OPENSSL_DIR = "${openssl.dev}";
3939
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/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
{ pkgs, ... }:
55
{
66
packages = {
7-
sfcgal = pkgs.callPackage ./sfcgal/sfcgal.nix { };
7+
sfcgal = pkgs.callPackage ./sfcgal/sfcgal.nix {
8+
# Use CGAL 5.x for compatibility with current sfcgal version
9+
cgal = pkgs.cgal_5;
10+
};
811
mecab_naist_jdic = pkgs.callPackage ./mecab-naist-jdic/default.nix { };
912
};
1013
};

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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@
1515
pcre2,
1616
nixosTests,
1717
callPackage,
18+
cgal_5,
1819
}:
1920

2021
let
21-
sfcgal = callPackage ./sfcgal/sfcgal.nix { };
22+
sfcgal = callPackage ./sfcgal/sfcgal.nix {
23+
# Use CGAL 5.x for compatibility with current sfcgal version
24+
cgal = cgal_5;
25+
};
2226
gdal = callPackage ./gdal.nix { inherit postgresql; };
2327
in
2428
stdenv.mkDerivation rec {

nix/ext/tests/lib.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ def assert_version_matches(self, expected_version: str):
7676
AssertionError: If the installed version does not match the expected version
7777
"""
7878
installed_version = self.get_installed_version()
79-
assert (
80-
installed_version == expected_version
81-
), f"Expected version {expected_version}, but found {installed_version}"
79+
assert installed_version == expected_version, (
80+
f"Expected version {expected_version}, but found {installed_version}"
81+
)
8282

8383
def check_upgrade_path(self, pg_version: str):
8484
"""Test the complete upgrade path for a PostgreSQL version.
@@ -146,24 +146,24 @@ def check_switch_extension_with_background_worker(
146146
f"No versions available for PostgreSQL version {pg_version}"
147147
)
148148
last_version = available_versions[-1]
149-
assert ext_version.endswith(
150-
f"{self.extension_name}-{last_version}.so"
151-
), f"Expected {self.extension_name} version {last_version}, but found {ext_version}"
149+
assert ext_version.endswith(f"{self.extension_name}-{last_version}.so"), (
150+
f"Expected {self.extension_name} version {last_version}, but found {ext_version}"
151+
)
152152

153153
# Switch to the first version
154154
first_version = available_versions[0]
155155
self.vm.succeed(f"switch_{self.extension_name}_version {first_version}")
156156

157157
# Check that we are using the first version now
158158
ext_version = self.vm.succeed(f"readlink -f {extension_lib_path}").strip()
159-
assert ext_version.endswith(
160-
f"{self.extension_name}-{first_version}.so"
161-
), f"Expected {self.extension_name} version {first_version}, but found {ext_version}"
159+
assert ext_version.endswith(f"{self.extension_name}-{first_version}.so"), (
160+
f"Expected {self.extension_name} version {first_version}, but found {ext_version}"
161+
)
162162

163163
# Switch to the first version
164164
self.vm.succeed(f"switch_{self.extension_name}_version {last_version}")
165165
# Check that we are using the last version now
166166
ext_version = self.vm.succeed(f"readlink -f {extension_lib_path}").strip()
167-
assert ext_version.endswith(
168-
f"{self.extension_name}-{last_version}.so"
169-
), f"Expected {self.extension_name} version {last_version}, but found {ext_version}"
167+
assert ext_version.endswith(f"{self.extension_name}-{last_version}.so"), (
168+
f"Expected {self.extension_name} version {last_version}, but found {ext_version}"
169+
)

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
@@ -18,7 +18,7 @@
1818

1919
cargo-pgrx = final.callPackage ../cargo-pgrx/default.nix {
2020
inherit (final) lib;
21-
inherit (final) darwin;
21+
inherit (final) apple-sdk_11;
2222
inherit (final) fetchCrate;
2323
inherit (final) openssl;
2424
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)