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 128
128
# use, but even if they did, keeping our own copies means that we can
129
129
# rollout new versions of these critical things easier without having to
130
130
# go through the upstream release engineering process.
131
- ourExtensions = [
131
+ ourExtensions = let
132
+ baseExtensions = [
132
133
./nix/ext/rum.nix
133
134
./nix/ext/timescaledb.nix
134
135
./nix/ext/pgroonga.nix
147
148
./nix/ext/pg_cron.nix
148
149
./nix/ext/pgsql-http.nix
149
150
./nix/ext/pg_plan_filter.nix
150
- ./nix/ext/pg_net.nix
151
151
./nix/ext/pg_hashids.nix
152
152
./nix/ext/pgsodium.nix
153
153
./nix/ext/pg_graphql.nix
162
162
./nix/ext/supautils.nix
163
163
./nix/ext/plv8.nix
164
164
] ;
165
+
166
+ # Add pg_net only if NOT on macOS aarch64
167
+ pgNetExtension = if ( system == "aarch64-darwin" )
168
+ then [ ]
169
+ else [ ./nix/ext/pg_net.nix ] ;
165
170
171
+ in baseExtensions ++ pgNetExtension ;
166
172
#Where we import and build the orioledb extension, we add on our custom extensions
167
173
# plus the orioledb option
168
174
orioledbExtension = ourExtensions ++ [ ./nix/ext/orioledb.nix ] ;
462
468
--subst-var-by 'LOCALES' '${ localeArchive } ' \
463
469
--subst-var-by 'EXTENSION_CUSTOM_SCRIPTS_DIR' "$out/extension-custom-scripts" \
464
470
--subst-var-by 'MECAB_LIB' '${ basePackages . psql_15 . exts . pgroonga } /lib/groonga/plugins/tokenizers/tokenizer_mecab.so' \
465
- --subst-var-by 'GROONGA_DIR' '${ supabase-groonga } '
471
+ --subst-var-by 'GROONGA_DIR' '${ supabase-groonga } ' \
472
+ --subst-var-by 'CURRENT_SYSTEM' '${ system } '
466
473
467
474
chmod +x $out/bin/start-postgres-server
468
475
'' ;
Original file line number Diff line number Diff line change @@ -32,12 +32,14 @@ EXTENSION_CUSTOM_SCRIPTS=@EXTENSION_CUSTOM_SCRIPTS_DIR@
32
32
GROONGA=@GROONGA_DIR@
33
33
DATDIR=$( mktemp -d)
34
34
LOCALE_ARCHIVE=@LOCALES@
35
+ CURRENT_SYSTEM=@CURRENT_SYSTEM@
35
36
export LOCALE_ARCHIVE
36
37
export LANG=en_US.UTF-8
37
38
export LANGUAGE=en_US.UTF-8
38
39
export LC_ALL=en_US.UTF-8
39
40
export LANG=en_US.UTF-8
40
41
export LC_CTYPE=en_US.UTF-8
42
+ echo " Current system is $CURRENT_SYSTEM "
41
43
mkdir -p " $DATDIR "
42
44
echo " NOTE: using port $PORTNO for server"
43
45
echo " NOTE: using temporary directory $DATDIR for data, which will not be removed"
@@ -61,5 +63,10 @@ pgsodium.getkey_script = '$PGSODIUM_GETKEY_SCRIPT'" \
61
63
-e " \$ a\\
62
64
session_preload_libraries = 'supautils'" \
63
65
" $PSQL_CONF_FILE " > " $DATDIR /postgresql.conf"
66
+ if [ " $CURRENT_SYSTEM " = " aarch64-darwin" ]; then
67
+ echo " NOTE: using aarch64-darwin system"
68
+ sed -i ' ' ' s/ pg_net,//g' " $DATDIR /postgresql.conf"
69
+ sed -i ' ' ' s/ pg_net,//g' " $DATDIR /supautils.conf"
70
+ fi
64
71
export GRN_PLUGINS_DIR=$GROONGA /lib/groonga/plugins
65
72
postgres --config-file=" $DATDIR /postgresql.conf" -p " $PORTNO " -D " $DATDIR " -k /tmp
You can’t perform that action at this time.
0 commit comments