Merge: postgresql: fix pgxs Makefile for darwin (#358566)
This commit is contained in:
@@ -89,14 +89,6 @@ buildPostgresqlExtension (finalAttrs: {
|
||||
"--disable-extension-upgrades-install"
|
||||
];
|
||||
|
||||
postConfigure = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
# postgis' build system assumes it is being installed to the same place as postgresql, and looks
|
||||
# for the postgres binary relative to $PREFIX. We gently support this system using an illusion.
|
||||
ln -s ${postgresql}/bin/postgres $out/bin/postgres
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"PERL=${perl}/bin/perl"
|
||||
];
|
||||
@@ -111,9 +103,6 @@ buildPostgresqlExtension (finalAttrs: {
|
||||
|
||||
# create aliases for all commands adding version information
|
||||
postInstall = ''
|
||||
# Teardown the illusory postgres used for building; see postConfigure.
|
||||
rm $out/bin/postgres
|
||||
|
||||
for prog in $out/bin/*; do # */
|
||||
ln -s $prog $prog-${finalAttrs.version}
|
||||
done
|
||||
|
||||
@@ -284,6 +284,12 @@ let
|
||||
|
||||
# Stop lib depending on the -dev output of llvm
|
||||
remove-references-to -t ${llvmPackages.llvm.dev} "$out/lib/llvmjit${dlSuffix}"
|
||||
'' + lib.optionalString stdenv'.hostPlatform.isDarwin ''
|
||||
# The darwin specific Makefile for PGXS contains a reference to the postgres
|
||||
# binary. Some extensions (here: postgis), which are able to set bindir correctly
|
||||
# to their own output for installation, will then fail to find "postgres" during linking.
|
||||
substituteInPlace "$dev/lib/pgxs/src/Makefile.port" \
|
||||
--replace-fail '-bundle_loader $(bindir)/postgres' "-bundle_loader $out/bin/postgres"
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString stdenv'.hostPlatform.isGnu
|
||||
|
||||
Reference in New Issue
Block a user