nix(loadtest): allow running multiple postgrest-loadtest in same working directory

There is no need to store the out-links to the various build artifacts
in the current working directory while running postgrest-with-pg, which
is used by postgrest-loadtest. Instead reference the nix store paths
directly.

Resolves #5028
This commit is contained in:
Wolfgang Walther
2026-06-21 12:56:42 +02:00
parent 79e9e77e46
commit ffe4cc6f42
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ let
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
cat "$(nix-build --no-out-link -A docs.requirements)" >> docs/requirements.txt
'';
in
+3 -3
View File
@@ -312,14 +312,14 @@ let
if [ -z "''${PGRST_BUILD_CABAL:-}" ]; then
echo -n "${commandName}: Building postgrest (nix)... "
# Using lib.getBin to also make this work with older checkouts, where .bin was not a thing, yet.
nix-build -E 'with import ./. {}; pkgs.lib.getBin postgrestPackage' > "$tmpdir"/build.log 2>&1 || {
nix-build --no-out-link -E 'with import ./. {}; pkgs.lib.getBin postgrestPackage' > "$tmpdir"/build.log 2>&1 || {
echo "failed, output:"
cat "$tmpdir"/build.log
exit 1
}
PGRST_CMD=$(echo ./result*/bin/postgrest)
PGRST_CMD="$(nix-build --no-out-link -E 'with import ./. {}; pkgs.lib.getBin postgrestPackage')/bin/postgrest"
# To avoid glibc mismatches with back-branches, we need to take libfaketime from the target branch.
FAKETIME_CMD="$(nix-build -A pkgs.libfaketime)/bin/faketime"
FAKETIME_CMD="$(nix-build --no-out-link -A pkgs.libfaketime)/bin/faketime"
else
echo -n "${commandName}: Building postgrest (cabal)... "
postgrest-build