File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -116,14 +116,21 @@ stdenv.mkDerivation {
116116 VERSION=$1
117117 LIB_DIR=$(dirname "$0")/../lib
118118
119+ # Use platform-specific extension
120+ if [ "$(uname)" = "Darwin" ]; then
121+ EXT=".dylib"
122+ else
123+ EXT=".so"
124+ fi
125+
119126 # Check if version exists
120- if [ ! -f "$LIB_DIR/pg_cron-$VERSION${ postgresql . dlSuffix } " ]; then
127+ if [ ! -f "$LIB_DIR/pg_cron-$VERSION$EXT " ]; then
121128 echo "Error: Version $VERSION not found"
122129 exit 1
123130 fi
124131
125132 # Update library symlink
126- 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 "
127134
128135 echo "Successfully switched pg_cron to version $VERSION"
129136 EOF
You can’t perform that action at this time.
0 commit comments