We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3263be commit 28c5d97Copy full SHA for 28c5d97
nix/ext/pg_cron.nix
@@ -116,14 +116,21 @@ stdenv.mkDerivation {
116
VERSION=$1
117
LIB_DIR=$(dirname "$0")/../lib
118
119
+ # Use platform-specific extension
120
+ if [ "$(uname)" = "Darwin" ]; then
121
+ EXT=".dylib"
122
+ else
123
+ EXT=".so"
124
+ fi
125
+
126
# Check if version exists
- if [ ! -f "$LIB_DIR/pg_cron-$VERSION${postgresql.dlSuffix}" ]; then
127
+ if [ ! -f "$LIB_DIR/pg_cron-$VERSION$EXT" ]; then
128
echo "Error: Version $VERSION not found"
129
exit 1
130
fi
131
132
# Update library symlink
- ln -sfnv "pg_cron-$VERSION${postgresql.dlSuffix}" "$LIB_DIR/pg_cron${postgresql.dlSuffix}"
133
+ ln -sfnv "pg_cron-$VERSION$EXT" "$LIB_DIR/pg_cron$EXT"
134
135
echo "Successfully switched pg_cron to version $VERSION"
136
EOF
0 commit comments