-
-
Notifications
You must be signed in to change notification settings - Fork 221
(WIP) feat: migrate pgrx extensions to crane build system #1974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: update-nixpkgs
Are you sure you want to change the base?
Conversation
906fbe3 to
8f0dffb
Compare
8f0dffb to
becd92c
Compare
d95ecff to
38ead9e
Compare
95dd61a to
288b31d
Compare
4665a3f to
14906f4
Compare
b48e4c3 to
3df6c4a
Compare
14906f4 to
266a129
Compare
266a129 to
7f01b44
Compare
|
this one seems pretty important and would like to get to this one soon after nixpkgs update |
These overlay packages will be removed once the extensions are updated to use the new `buildPgrxExtension` function.
pg_net requires an older version of curl (pinned from nixpkgs commit a76c4553d7e741e17f289224eda135423de0491d) to resolve build compatibility issues.
Updated cargo-pgrx buildPgrxExtension with rustc wrapper to handle empty postmaster_stub.rs files that cause duplicate symbol errors. (first two filenames are `` and `/build/tmp.*/postmaster_stubs/nix/store/*/bin/postmaster_stub.rs`) pg_jsonschema cargo checks fails on specific versions (0.2.0, 0.3.1, 0.3.3).
Remove deprecated functions that were removed in newer pgrouting versions (_pgr_betweennesscentrality and _pgr_contractionhierarchies).
Improves reproducibility and avoids evaluation-time network access by using a proper flake input instead of fetchTarball for the older nixpkgs needed by pg_net and plv8.
…64-darwin Version 0.19.5 has a dangling pointer issue in src/core.c:177 that causes compilation to fail on aarch64-darwin with newer clang versions. This adds -Wno-error=dangling-assignment to allow compilation to proceed. The flag is restricted to aarch64-darwin only since GCC on Linux doesn't recognize this warning option.
Add -headerpad_max_install_names linker flag to prevent 'install_name_tool: changing install names or rpaths can't be redone' errors on macOS. This allocates sufficient header space for install_name_tool to modify the shared library during post-install processing.
… extensions
Test assertions were inconsistent: expecting {version}.so and {extension_name}-{version}.so
patterns while actual libraries use {lib_name}-{version}.so (e.g. pg_partman_bgw-5.3.1.so,
timescaledb-loader-2.16.1.so). Updated PostgresExtensionTest to accept Optional[str] lib_name
parameter and use consistent {lib_name}-{version}.so assertions throughout.
Added missing timescaledb-loader.so symlink creation and updated the switch script to
maintain both symlinks when switching versions.
Fixes 'Expected timescaledb version 2.16.1, but found timescaledb-loader-2.16.1.so' and
'Expected pg_partman version 5.3.1, but found pg_partman_bgw-5.3.1.so' test failures.
Use overlay instead of passing full nixpkgs-oldstable to avoid exposing entire old nixpkgs attribute set. Now provides specific packages (curl_8_4, v8_oldstable) through overlay.
Keep revision support that was accidentally simplified during nixpkgs update. Restores conditional logic to support building orioledb from specific git revision hashes instead of only tags.
These files were moved to subdirectories and the old .nix files should be removed since they were moved to new directory structure with default.nix files.
Remove nixpkgs-go124 dependency since current nixpkgs has Go 1.25.4 which is sufficient for packer. Remove nix-fast-build input as unused and add follows directives to resolve duplicate dependencies.
Run flake-linter to eliminate duplicate dependencies, and remove unused cargo-pgrx / rustc versions hashes.
Move pgrouting.nix to pgrouting/default.nix and groonga package to pgroonga/groonga.nix. Update imports and fix relative paths for versions.json and patch files.
Replace inline bash script generation with writeShellScriptBin for rustc wrapper that filters empty postmaster_stub.rs arguments. Apply wrapper only for pgrx < 0.12 since issue was fixed upstream in pgrx#1435 and pgrx#1441.
Move nixpkgs-oldstable import to a let binding to avoid importing it three times...
Remove supabase-groonga from global flake packages and import it locally in pgroonga extension instead. Other components access groonga via pgroonga.passthru.groonga since groonga is only used by pgroonga.
The supabase-groonga package was moved to pgroonga extension in commit 1f0ed1f, but Ansible was still trying to install it separately causing build failures.
This reverts commit 55474686405394826ad07a032cbcf0e36a924554.
This reverts commit cfa9bcb92219f391469ae743f95c8856b0a99561.
Remove references to darwin.apple_sdk.frameworks.{IOKit,CoreFoundation}
which have been deprecated in nixpkgs. Disable CGO to avoid Darwin
framework dependencies entirely.
3df6c4a to
94d1c75
Compare
7f01b44 to
dc2e9f5
Compare
|
Basic crane integration works correctly ( To fix this, we need to either update the external |
This change adds [crane](https://crane.dev/) support to the existing `pgrx` extension builder, enabling better incremental build performance and caching for `pg_jsonschema` and other pgrx extensions. Crane separates dependency builds from main crate builds, allowing dependencies to be cached independently. The unified `buildPgrxExtension.nix` now accepts an optional `craneLib` parameter. When provided, it uses crane's two-phase build (`buildDepsOnly` + `buildPackage`). Otherwise, it falls back to `rustPlatform.buildRustPackage`. Both paths share the same build and install logic, avoiding code duplication. Crane requires `Cargo.lock` at the source root while `rustPlatform` accepts external `lockFile` paths. The builder handles this by ensuring external lock files are properly accessible during the build process. Crane's `cargoVendorDir` is only used for crane builds to avoid conflicts with rustPlatform's cargo handling. Extensions opt into crane builds by passing `useCrane = true` to `mkPgrxExtension`. All existing build parameters remain compatible with both backends.
dc2e9f5 to
c13e207
Compare
7473753 to
771718f
Compare
This change adds crane support to the existing
pgrxextension builder, enabling better incremental build performance and caching forpg_jsonschemaand other pgrx extensions. Crane separates dependency builds from main crate builds, allowing dependencies to be cached independently.The unified
buildPgrxExtension.nixnow accepts an optionalcraneLibparameter. When provided, it uses crane's two-phase build (buildDepsOnly+buildPackage). Otherwise, it falls back torustPlatform.buildRustPackage. Both paths share the same build and install logic, avoiding code duplication.Crane requires
Cargo.lockat the source root whilerustPlatformaccepts externallockFilepaths. The builder handles this by ensuring external lock files are properly accessible during the build process. Crane'scargoVendorDiris only used for crane builds to avoid conflicts with rustPlatform's cargo handling.Extensions opt into crane builds by passing
useCrane = truetomkPgrxExtension. All existing build parameters remain compatible with both backends.