Skip to content

Commit 6486df6

Browse files
committed
fix:
This fix ensures that the control files reference $libdir/$ext-$MIN_MAJ_VERSION (e.g., $libdir/postgis-3.3) which matches the actual library names built with the --with-library-minor-version flag. This allows: 1. Multiple PostGIS versions to coexist (3.3.2 and 3.3.7 both use postgis-3.3.so) 2. Extensions to properly find their libraries during upgrades 3. The multi-version functionality to work correctly
1 parent cce9cde commit 6486df6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nix/ext/postgis.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ let
114114
# move control files
115115
for ext in ${lib.concatStringsSep " " (cExtensions ++ sqlExtensions)}; do
116116
sed -e "/^default_version =/d" \
117-
-e "s|^module_pathname = .*|module_pathname = '\$libdir/$ext'|" \
117+
-e "s|^module_pathname = .*|module_pathname = '\$libdir/$ext-$MIN_MAJ_VERSION'|" \
118118
$out/share/postgresql/extension/$ext.control > $out/share/postgresql/extension/$ext--$MIN_MAJ_VERSION.control
119119
rm $out/share/postgresql/extension/$ext.control
120120
ln -s $out/share/postgresql/extension/$ext--${version}.sql $out/share/postgresql/extension/$ext--$MIN_MAJ_VERSION.sql

0 commit comments

Comments
 (0)