Skip to content

Commit c0e5f3f

Browse files
committed
fix: does need loader
1 parent bdfc3e1 commit c0e5f3f

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

nix/ext/timescaledb.nix

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,13 @@ let
5959
# Run cmake install first
6060
cmake --install . --prefix=$out
6161
62-
# TimescaleDB has two libraries:
63-
# 1. timescaledb.so (loader)
64-
# 2. timescaledb-VERSION.so (actual extension)
65-
# Both need to be handled for multi-version support
62+
# TimescaleDB creates two libraries:
63+
# 1. timescaledb.so (loader) -> rename to timescaledb-<version>-loader.so
64+
# 2. timescaledb-<version>.so (actual extension) -> keep as is
6665
67-
# Rename the loader to be version-specific
66+
# Rename the loader library to be version-specific
6867
if [ -f $out/lib/timescaledb${postgresql.dlSuffix} ]; then
69-
mv $out/lib/timescaledb${postgresql.dlSuffix} $out/lib/timescaledb-${version}${postgresql.dlSuffix}
68+
mv $out/lib/timescaledb${postgresql.dlSuffix} $out/lib/timescaledb-${version}-loader${postgresql.dlSuffix}
7069
fi
7170
7271
# The versioned library (timescaledb-VERSION.so) is already correctly named
@@ -110,12 +109,12 @@ buildEnv {
110109
cat $out/share/postgresql/extension/${pname}--${latestVersion}.control
111110
} > $out/share/postgresql/extension/${pname}.control
112111
113-
# Create symlink for the loader
114-
ln -sfn ${pname}-${latestVersion}${postgresql.dlSuffix} $out/lib/${pname}${postgresql.dlSuffix}
112+
# Create symlink from the latest versioned loader to timescaledb.so
113+
ln -sfn ${pname}-${latestVersion}-loader${postgresql.dlSuffix} $out/lib/${pname}${postgresql.dlSuffix}
115114
116-
# The versioned library symlink (timescaledb-VERSION.so files are already in place)
115+
# The versioned extension libraries (timescaledb-VERSION.so) are already in place
117116
118-
# checks - adjust count since we have both loader and versioned files
117+
# checks - we should have loader files and versioned extension files
119118
(set -x
120119
test "$(ls -A $out/lib/${pname}*${postgresql.dlSuffix} | wc -l)" -gt 0
121120
)

0 commit comments

Comments
 (0)