diff --git a/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix b/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix index 89293ab62ef8..785a500c3917 100644 --- a/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix +++ b/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix @@ -85,15 +85,21 @@ let pgrxPostgresMajor = lib.versions.major postgresql.version; preBuildAndTest = '' - export PGRX_HOME=$(mktemp -d) + export PGRX_HOME="$(mktemp -d)" export PGDATA="$PGRX_HOME/data-${pgrxPostgresMajor}/" cargo-pgrx pgrx init "--pg${pgrxPostgresMajor}" ${lib.getDev postgresql}/bin/pg_config - echo "unix_socket_directories = '$(mktemp -d)'" > "$PGDATA/postgresql.conf" + + # unix sockets work in sandbox, too. + export PGHOST="$(mktemp -d)" + cat > "$PGDATA/postgresql.conf" <