Merge: postgresqlPackages.{pgvecto-rs,timescaledb_toolkit}: fix build on darwin (#358403)
This commit is contained in:
commit
2ce65e56b5
@ -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" <<EOF
|
||||
listen_addresses = ''\''
|
||||
unix_socket_directories = '$PGHOST'
|
||||
EOF
|
||||
|
||||
# This is primarily for Mac or other Nix systems that don't use the nixbld user.
|
||||
export USER="$(whoami)"
|
||||
pg_ctl start
|
||||
createuser -h localhost --superuser --createdb "$USER" || true
|
||||
createuser --superuser --createdb "$USER" || true
|
||||
pg_ctl stop
|
||||
'';
|
||||
|
||||
|
@ -92,10 +92,9 @@ in
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
# Upstream removed support for PostgreSQL 12 and 13 on 0.3.0: https://github.com/tensorchord/pgvecto.rs/issues/343
|
||||
# Upstream removed support for PostgreSQL 13 on 0.3.0: https://github.com/tensorchord/pgvecto.rs/issues/343
|
||||
broken =
|
||||
stdenv.hostPlatform.isDarwin
|
||||
|| (versionOlder postgresql.version "14")
|
||||
(versionOlder postgresql.version "14")
|
||||
||
|
||||
# PostgreSQL 17 support issue upstream: https://github.com/tensorchord/pgvecto.rs/issues/607
|
||||
# Check after next package update.
|
||||
|
Loading…
Reference in New Issue
Block a user