Skip to content

Commit 1ecceca

Browse files
committed
chore: fixing merge conflict
1 parent 6f43499 commit 1ecceca

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

flake.nix

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
# it also serves as a base for importing the orioldb/postgres overlay to
3030
#build the orioledb postgres patched version of postgresql16
3131
oriole_pkgs = import nixpkgs {
32-
config = { allowUnfree = true; };
3332
inherit system;
3433
overlays = [
3534
# NOTE (aseipp): add any needed overlays here. in theory we could
@@ -45,7 +44,6 @@
4544
#This variable works the same as 'oriole_pkgs' but builds using the upstream
4645
#nixpkgs builds of postgresql 15 and 16 + the overlays listed below
4746
pkgs = import nixpkgs {
48-
config = { allowUnfree = true; };
4947
inherit system;
5048
overlays = [
5149
# NOTE (aseipp): add any needed overlays here. in theory we could
@@ -57,10 +55,8 @@
5755
#(import ./nix/overlays/gdal-small.nix)
5856

5957
];
60-
6158
};
6259

63-
sfcgal = pkgs.callPackage ./nix/ext/sfcgal/sfcgal.nix { };
6460

6561
# FIXME (aseipp): pg_prove is yet another perl program that needs
6662
# LOCALE_ARCHIVE set in non-NixOS environments. upstream this. once that's done, we
@@ -132,7 +128,7 @@
132128
./nix/ext/wrappers/default.nix
133129
./nix/ext/supautils.nix
134130
./nix/ext/plv8.nix
135-
#./nix/ext/pljava.nix
131+
./nix/ext/pljava.nix
136132
];
137133

138134
#Where we import and build the orioledb extension, we add on our custom extensions
@@ -141,8 +137,8 @@
141137

142138
#this var is a convenience setting to import the orioledb patched version of postgresql
143139
postgresql_orioledb_16 = oriole_pkgs.postgresql_orioledb_16;
140+
#postgis_override = pkgs.postgis_override;
144141

145-
146142
# Create a 'receipt' file for a given postgresql package. This is a way
147143
# of adding a bit of metadata to the package, which can be used by other
148144
# tools to inspect what the contents of the install are: the PSQL
@@ -309,7 +305,7 @@
309305
'';
310306
in
311307
nix2img.buildImage {
312-
name = "samrose/nix-experimental-postgresql-${version}-${system}";
308+
name = "nix-experimental-postgresql-${version}-${system}";
313309
tag = "latest";
314310

315311
nixUid = l.toInt uid;
@@ -403,9 +399,7 @@
403399
psql_15 = makePostgres "15";
404400
#psql_16 = makePostgres "16";
405401
#psql_orioledb_16 = makeOrioleDbPostgres "16_23" postgresql_orioledb_16;
406-
pg_prove = pg_prove;
407-
sfcgal = sfcgal;
408-
402+
409403
# Start a version of the server.
410404
start-server =
411405
let
@@ -419,7 +413,8 @@
419413
--subst-var-by 'PGSQL_SUPERUSER' '${pgsqlSuperuser}' \
420414
--subst-var-by 'PSQL15_BINDIR' '${basePackages.psql_15.bin}' \
421415
--subst-var-by 'PSQL_CONF_FILE' '${configFile}' \
422-
--subst-var-by 'PGSODIUM_GETKEY' '${getkeyScript}'
416+
--subst-var-by 'PGSODIUM_GETKEY' '${getkeyScript}' \
417+
--subst-var-by 'LIBJVM_LOCATION' '${pkgs.openjdk11}/lib/openjdk/lib/server/libjvm.so'
423418
424419
chmod +x $out/bin/start-postgres-server
425420
'';
@@ -458,7 +453,7 @@
458453
mkdir -p $out/bin
459454
substitute ${./nix/tools/run-replica.sh.in} $out/bin/start-postgres-replica \
460455
--subst-var-by 'PGSQL_SUPERUSER' '${pgsqlSuperuser}' \
461-
--subst-var-by 'PSQL15_BINDIR' '${basePackages.psql_15.bin}'
456+
--subst-var-by 'PSQL15_BINDIR' '${basePackages.psql_15.bin}'\
462457
chmod +x $out/bin/start-postgres-replica
463458
'';
464459
sync-exts-versions = pkgs.runCommand "sync-exts-versions" { } ''
@@ -489,7 +484,8 @@
489484
initdb --locale=C
490485
491486
substitute ${./nix/tests/postgresql.conf.in} $PGDATA/postgresql.conf \
492-
--subst-var-by PGSODIUM_GETKEY_SCRIPT "${./nix/tests/util/pgsodium_getkey.sh}"
487+
--subst-var-by PGSODIUM_GETKEY_SCRIPT "${./nix/tests/util/pgsodium_getkey.sh}" \
488+
--subst-var-by PLJAVA_LIBJVM_LOCATION "${pkgs.openjdk11}/lib/openjdk/lib/server/libjvm.so"
493489
494490
495491
postgres -k /tmp >logfile 2>&1 &
@@ -555,11 +551,7 @@
555551
nix-update
556552
pg_prove
557553
shellcheck
558-
ansible
559-
ansible-lint
560-
(packer.overrideAttrs (oldAttrs: {
561-
version = "1.7.8";
562-
}))
554+
563555
basePackages.start-server
564556
basePackages.start-client
565557
basePackages.start-replica

nix/tools/run-server.sh.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ echo
3939
initdb -U "$PGSQL_SUPERUSER" -D "$DATDIR" --locale=C
4040

4141
echo "NOTE: patching postgresql.conf files"
42+
echo "pljava libjvm location: $PLJAVA_LIBJVM_LOCATION"
4243
sed -e "s#@PGSODIUM_GETKEY_SCRIPT@#$PGSODIUM_GETKEY_SCRIPT#g" \
44+
-e "s#@PLJAVA_LIBJVM_LOCATION@#$PLJAVA_LIBJVM_LOCATION#g" \
4345
$PSQL_CONF_FILE > "$DATDIR/postgresql.conf"
4446

4547
exec postgres -p "$PORTNO" -D "$DATDIR" -k /tmp

0 commit comments

Comments
 (0)