-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
feat: reintroduce nix flake #1683
Draft
justinrubek
wants to merge
5
commits into
pgcentralfoundation:develop
Choose a base branch
from
justinrubek:reintroduce-nix
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: reintroduce nix flake #1683
justinrubek
wants to merge
5
commits into
pgcentralfoundation:develop
from
justinrubek:reintroduce-nix
Commits on Apr 28, 2024
-
build(nix): add nix flake with
cargo-pgrx
packageThis exposes the `cargo pgrx` binary as a flake package called `cargo-pgrx`. It can be built using `nix build .#cargo-pgrx`. The systems specified in this flake were chosen from the project's README of tested systems. The flake inputs were chosen to minimize the maintenance burden. Since the build runs tests in order to succeed, but the tests are performed at build time for nix, the `test_parse_managed_postmasters` test has been skipped. Since pgrx already has a test suite that runs outside of nix, this should be a good compromise to allow the build to work, but also keep the majority of the tests to ensure that nix users are aware when they are broken. In addition to this, the `PGRX_HOME` variable must be set for tests, so it is assigned to a tmpdir before running the tests.
Configuration menu - View commit details
-
Copy full SHA for c495891 - Browse repository at this point
Copy the full SHA c495891View commit details -
ci(nix): add rust-toolchain update script
This script can be ran to update the rust-toolchain that is used by nix builds. Since `fenix` is a flake input end-users are able to override it themselves to whichever version they please, however it is useful to have the provided version up to date, particularly if the project ends up having an MSRV. We could likely change this script to be one that updates all flake inputs, however I find it useful to be able to update the rust toolchain separately from the other dependencies and have chosen to provide a script soley for that. This matches the existing `rustup.sh` that is used to update the rustup toolchain version. If you wish to make this file a generic `flake.lock` updater, remove `fenix` from the call to `nix flake update` and it will update all inputs.
Configuration menu - View commit details
-
Copy full SHA for 242a588 - Browse repository at this point
Copy the full SHA 242a588View commit details -
feat(nix): provide
buildPgrxExtension
functionThis function can be used by external nix flakes to build an extension using pgrx. The caller must provide the postgres package, the rust toolchain, extension source code, and flake system that they are building for. Most of this configuration has been converted from the previous nix flake exposed from pgrx. I've made every attempt to trim away parts that don't serve a purpose, but there's a chance that this could be simplified slightly by someone who has more knowledge of pgrx than I do.
Configuration menu - View commit details
-
Copy full SHA for 13cf708 - Browse repository at this point
Copy the full SHA 13cf708View commit details
Commits on Jun 10, 2024
-
fix(nix): aarch64-darwin builds
Co-authored-by: Sam Rose <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 38ffc9e - Browse repository at this point
Copy the full SHA 38ffc9eView commit details
Commits on Jul 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d8da280 - Browse repository at this point
Copy the full SHA d8da280View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.