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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user