File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 104104 # use, but even if they did, keeping our own copies means that we can
105105 # rollout new versions of these critical things easier without having to
106106 # go through the upstream release engineering process.
107- ourExtensions = [
107+ ourExtensions = let
108+ baseExtensions = [
108109 ./nix/ext/rum.nix
109110 ./nix/ext/timescaledb.nix
110111 ./nix/ext/pgroonga.nix
123124 ./nix/ext/pg_cron.nix
124125 ./nix/ext/pgsql-http.nix
125126 ./nix/ext/pg_plan_filter.nix
126- ./nix/ext/pg_net.nix
127127 ./nix/ext/pg_hashids.nix
128128 ./nix/ext/pgsodium.nix
129129 ./nix/ext/pg_graphql.nix
138138 ./nix/ext/supautils.nix
139139 ./nix/ext/plv8.nix
140140 ] ;
141+
142+ # Add pg_net only if NOT on macOS aarch64
143+ pgNetExtension = if ( system == "aarch64-darwin" )
144+ then [ ]
145+ else [ ./nix/ext/pg_net.nix ] ;
141146
147+ in baseExtensions ++ pgNetExtension ;
142148 #Where we import and build the orioledb extension, we add on our custom extensions
143149 # plus the orioledb option
144150 #we're not using timescaledb in the orioledb version of supabase extensions
438444 --subst-var-by 'LOCALES' '${ localeArchive } ' \
439445 --subst-var-by 'EXTENSION_CUSTOM_SCRIPTS_DIR' "$out/extension-custom-scripts" \
440446 --subst-var-by 'MECAB_LIB' '${ basePackages . psql_15 . exts . pgroonga } /lib/groonga/plugins/tokenizers/tokenizer_mecab.so' \
441- --subst-var-by 'GROONGA_DIR' '${ supabase-groonga } '
447+ --subst-var-by 'GROONGA_DIR' '${ supabase-groonga } ' \
448+ --subst-var-by 'CURRENT_SYSTEM' '${ system } '
442449
443450 chmod +x $out/bin/start-postgres-server
444451 '' ;
Original file line number Diff line number Diff line change @@ -32,12 +32,14 @@ EXTENSION_CUSTOM_SCRIPTS=@EXTENSION_CUSTOM_SCRIPTS_DIR@
3232GROONGA=@GROONGA_DIR@
3333DATDIR=$( mktemp -d)
3434LOCALE_ARCHIVE=@LOCALES@
35+ CURRENT_SYSTEM=@CURRENT_SYSTEM@
3536export LOCALE_ARCHIVE
3637export LANG=en_US.UTF-8
3738export LANGUAGE=en_US.UTF-8
3839export LC_ALL=en_US.UTF-8
3940export LANG=en_US.UTF-8
4041export LC_CTYPE=en_US.UTF-8
42+ echo " Current system is $CURRENT_SYSTEM "
4143mkdir -p " $DATDIR "
4244echo " NOTE: using port $PORTNO for server"
4345echo " NOTE: using temporary directory $DATDIR for data, which will not be removed"
@@ -70,5 +72,10 @@ remove_config_items() {
7072 fi
7173}
7274remove_config_items " $1 "
75+ if [ " $CURRENT_SYSTEM " = " aarch64-darwin" ]; then
76+ echo " NOTE: using aarch64-darwin system"
77+ sed -i ' ' ' s/ pg_net,//g' " $DATDIR /postgresql.conf"
78+ sed -i ' ' ' s/ pg_net,//g' " $DATDIR /supautils.conf"
79+ fi
7380export GRN_PLUGINS_DIR=$GROONGA /lib/groonga/plugins
7481postgres --config-file=" $DATDIR /postgresql.conf" -p " $PORTNO " -D " $DATDIR " -k /tmp
You can’t perform that action at this time.
0 commit comments