From 3b1373ec02a51e2e0f9d2a532efa563876429eea Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 20 Apr 2026 20:49:32 +0200 Subject: [PATCH] chore: update the nix upgrade docs These have been outdated for a while, not only because we're now using flake.nix, but also in various other places. Resolves #4816 --- nix/UPGRADE.md | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/nix/UPGRADE.md b/nix/UPGRADE.md index 5c747e448..48ba8d4ae 100644 --- a/nix/UPGRADE.md +++ b/nix/UPGRADE.md @@ -16,11 +16,8 @@ The following checklist guides you through the complete process in more detail. ## Upgrade the pinned version of `nixpkgs` The pinned version of [`nixpkgs`](https://github.com/NixOS/nixpkgs) is defined -in [`nix/nixpkgs-version.nix`](nixpkgs-version.nix). The pin refers directly to -a GitHub tarball for the given revision, which is more efficient than pulling -the complete Git repository. To upgrade it to the current `main` of -`nixpkgs`, you can use a small utility script defined in -[`nix/nixpkgs-update.nix`](nixpkgs-update.nix): +in [`flake.nix`](../flake.nix). To upgrade it, you can use a small utility +script defined in [`nix/tools/nixpkgsTools.nix`](tools/nixpkgsTools.nix): ```bash # From the root of the repository, enter nix-shell @@ -30,21 +27,12 @@ nix-shell postgrest-nixpkgs-upgrade # Exit the nix-shell with Ctrl-d - ``` ## Review overlays Check whether the individual [overlays](overlays) are still required. -## Check if patches are still required and update them as needed - -We track a number of PostgREST-specific patches in [`nix/patches`](patches). -Check whether the pull-requests/issues linked in the -[`default.nix`](patches/default.nix) have progressed and remove/modify the -patches if they did. If conflicting changes occurred, you might have to rebase -the respective patches. - ## Build everything Using the PostgREST binary Nix cache is recommended. Install @@ -58,25 +46,19 @@ errors, this is probably due to one of our patches. Try to fix them and re-run ## Update the PostgREST binary cache -If you have access to the PostgREST cachix signing key, you can push the +If you have access to the PostgREST cachix project, you can push the artifacts that you built locally to the binary cache. This will accelerate the CI builds and tests, sometimes dramatically. This might sometimes even be required to avoid build timeouts in CI. -You'll need to set the `CACHIX_SIGNING_KEY` before proceeding, e.g. by creating -a file containing `export CACHIX_SIGNING_KEY=...` and sourcing that file, which -avoids having the secret in your shell history. +You'll need to login with your token with `cachix authtoken `. To push all new artifacts to Cachix, run: ``` -nix-store -qR --include-outputs $$(nix-instantiate) | cachix push postgrest - -# Or, equivalently nix-shell --run postgrest-push-cachix - ``` -The `nix-store` command will query the nix-store to list all dependencies and -build artifacts of PostgREST. The `cachix` command will efficiently push +The `postgrest-push-cachix` command will query the nix-store to list all +dependencies and build artifacts of PostgREST. It will then push everything that is not yet cached to the binary cache.