buildPgrxExtension: avoid empty RUSTFLAGS

Setting RUSTFLAGS to an empty strings causes the linux pgvecto-rs
build to fail. Therefore, it should only be set when it is non-empty.

Build failure introduced by commit 2a13929e1f
This commit is contained in:
Diogo Correia 2024-08-11 21:28:57 +01:00
parent 154bcb95ad
commit 21a874802e
No known key found for this signature in database
GPG Key ID: 12B4F3AC9C065D08

View File

@ -119,7 +119,7 @@ let
NIX_PGLIBDIR="${postgresql}/lib" \
PGRX_BUILD_FLAGS="--frozen -j $NIX_BUILD_CORES ${builtins.concatStringsSep " " cargoBuildFlags}" \
RUSTFLAGS="${lib.optionalString stdenv.isDarwin "-Clink-args=-Wl,-undefined,dynamic_lookup"}" \
${lib.optionalString stdenv.isDarwin ''RUSTFLAGS="''${RUSTFLAGS:+''${RUSTFLAGS} }-Clink-args=-Wl,-undefined,dynamic_lookup"''} \
cargo pgrx package \
--pg-config ${postgresql}/bin/pg_config \
${maybeDebugFlag} \