File tree 1 file changed +23
-1
lines changed 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -115,9 +115,31 @@ stdenv.mkDerivation {
115
115
116
116
VERSION=$1
117
117
NIX_PROFILE="/var/lib/postgresql/.nix-profile"
118
- LIB_DIR="$out/lib"
118
+
119
+ # Follow the complete chain of symlinks to find the multi-version directory
120
+ CURRENT_LINK="$NIX_PROFILE/lib/pg_cron-$VERSION.so"
121
+ echo "Starting with link: $CURRENT_LINK"
122
+
123
+ while [ -L "$CURRENT_LINK" ]; do
124
+ NEXT_LINK=$(readlink "$CURRENT_LINK")
125
+ echo "Following link: $NEXT_LINK"
126
+ if echo "$NEXT_LINK" | grep -q '^/'; then
127
+ CURRENT_LINK="$NEXT_LINK"
128
+ else
129
+ CURRENT_LINK="$(dirname "$CURRENT_LINK")/$NEXT_LINK"
130
+ fi
131
+ echo "Current link is now: $CURRENT_LINK"
132
+ done
133
+
134
+ # The final link should be in the multi-version directory
135
+ MULTI_VERSION_DIR=$(dirname "$CURRENT_LINK")
136
+ echo "Found multi-version directory: $MULTI_VERSION_DIR"
137
+ LIB_DIR="$MULTI_VERSION_DIR"
119
138
EXTENSION_DIR="$NIX_PROFILE/share/postgresql/extension"
120
139
140
+ echo "Looking for file: $LIB_DIR/pg_cron-$VERSION${ postgresql . dlSuffix } "
141
+ ls -la "$LIB_DIR" || true
142
+
121
143
# Check if version exists
122
144
if [ ! -f "$LIB_DIR/pg_cron-$VERSION${ postgresql . dlSuffix } " ]; then
123
145
echo "Error: Version $VERSION not found"
You can’t perform that action at this time.
0 commit comments