nix: re-introduce postgrest-nixpkgs-upgrade

Resolves #4161
This commit is contained in:
Wolfgang Walther
2025-07-11 15:53:06 +00:00
parent 6bf2cb09a6
commit bd61cf9b60
4 changed files with 54 additions and 21 deletions
+4
View File
@@ -133,6 +133,10 @@ rec {
loadtest = loadtest =
pkgs.callPackage nix/tools/loadtest.nix { inherit withTools; }; pkgs.callPackage nix/tools/loadtest.nix { inherit withTools; };
# Utility for updating the pinned version of Nixpkgs.
nixpkgsTools =
pkgs.callPackage nix/tools/nixpkgsTools.nix { };
# Scripts for publishing new releases. # Scripts for publishing new releases.
release = release =
pkgs.callPackage nix/tools/release.nix { }; pkgs.callPackage nix/tools/release.nix { };
+21 -21
View File
@@ -72,25 +72,25 @@ The PostgREST utilities available in `nix-shell` all have names that begin with
```bash ```bash
# Note: The utilities listed here might not be up to date. # Note: The utilities listed here might not be up to date.
[nix-shell]$ postgrest-<tab> [nix-shell]$ postgrest-<tab>
postgrest-build postgrest-profiled-run postgrest-build postgrest-parallel-curl
postgrest-check postgrest-push-cachix postgrest-check postgrest-profiled-run
postgrest-clean postgrest-release postgrest-clean postgrest-push-cachix
postgrest-commitlint postgrest-repl postgrest-commitlint postgrest-release
postgrest-coverage postgrest-run postgrest-coverage postgrest-repl
postgrest-coverage-draft-overlay postgrest-style postgrest-coverage-draft-overlay postgrest-run
postgrest-docs-build postgrest-style-check postgrest-docs-build postgrest-style
postgrest-docs-check postgrest-test-big-schema postgrest-docs-check postgrest-style-check
postgrest-docs-dictcheck postgrest-test-doctests postgrest-docs-dictcheck postgrest-test-big-schema
postgrest-docs-linkcheck postgrest-test-io postgrest-docs-linkcheck postgrest-test-doctests
postgrest-docs-render postgrest-test-memory postgrest-docs-render postgrest-test-io
postgrest-docs-serve postgrest-test-replica postgrest-docs-serve postgrest-test-memory
postgrest-docs-spellcheck postgrest-test-spec postgrest-docs-spellcheck postgrest-test-replica
postgrest-dump-minimal-imports postgrest-test-spec-idempotence postgrest-dump-minimal-imports postgrest-test-spec
postgrest-dump-schema postgrest-watch postgrest-dump-schema postgrest-test-spec-idempotence
postgrest-gen-ctags postgrest-with-all postgrest-gen-ctags postgrest-watch
postgrest-gen-jwt postgrest-with-git postgrest-gen-jwt postgrest-with-all
postgrest-gen-secret postgrest-with-pgrst postgrest-gen-secret postgrest-with-git
postgrest-git-hooks postgrest-git-hooks postgrest-with-pgrst
postgrest-hsie-graph-modules postgrest-with-postgresql-13 postgrest-hsie-graph-modules postgrest-with-postgresql-13
postgrest-hsie-graph-symbols postgrest-with-postgresql-14 postgrest-hsie-graph-symbols postgrest-with-postgresql-14
postgrest-hsie-minimal-imports postgrest-with-postgresql-15 postgrest-hsie-minimal-imports postgrest-with-postgresql-15
@@ -98,7 +98,7 @@ postgrest-lint postgrest-with-postgresql-16
postgrest-loadtest postgrest-with-postgresql-17 postgrest-loadtest postgrest-with-postgresql-17
postgrest-loadtest-against postgrest-with-slow-pg postgrest-loadtest-against postgrest-with-slow-pg
postgrest-loadtest-report postgrest-with-slow-postgrest postgrest-loadtest-report postgrest-with-slow-postgrest
postgrest-parallel-curl postgrest-nixpkgs-upgrade
... ...
[nix-shell]$ [nix-shell]$
@@ -380,7 +380,7 @@ that).
We also use `default.nix` to load our pinned version of the `nixpkgs` We also use `default.nix` to load our pinned version of the `nixpkgs`
repository. This set of packages will always be the same, independently from repository. This set of packages will always be the same, independently from
where or when you use it. The pinned version is taken from `flake.lock` and where or when you use it. The pinned version is taken from `flake.lock` and
can be updated with `nix flake update`. can be updated with `postgrest-nixpkgs-upgrade`.
### `shell.nix` ### `shell.nix`
+28
View File
@@ -0,0 +1,28 @@
{ buildToolbox
, checkedShellScript
}:
# Utility script for pinning the latest stable version of Nixpkgs.
# Instead of running `nix flake update` manually, we run this script
# to also pin readthedocs dependencies at the same time.
let
upgrade =
checkedShellScript
{
name = "postgrest-nixpkgs-upgrade";
docs = "Pin the newest version of Nixpkgs.";
workingDir = "/";
}
''
nix flake update
echo "# This file is auto-generated by postgrest-nixpkgs-upgrade" > docs/requirements.txt
cat "$(nix-build -A docs.requirements)" >> docs/requirements.txt
'';
in
buildToolbox
{
name = "postgrest-nixpkgs";
tools = { inherit upgrade; };
}
+1
View File
@@ -23,6 +23,7 @@ let
postgrest.docs postgrest.docs
postgrest.gitTools postgrest.gitTools
postgrest.loadtest postgrest.loadtest
postgrest.nixpkgsTools
postgrest.release postgrest.release
postgrest.style postgrest.style
postgrest.tests postgrest.tests