postgresqlPackages.plv8: 2.3.15 -> 3.0.0

Use v8 8.8.x.
This commit is contained in:
Nikolay Amiantov 2022-01-08 15:37:44 +03:00
parent 7b161cef22
commit a4c6e9e084
2 changed files with 13 additions and 5 deletions

View file

@ -29,6 +29,8 @@ stdenv.mkDerivation rec {
]; ];
preConfigure = '' preConfigure = ''
# We build V8 as a monolith, so this is unnecessary.
substituteInPlace Makefile.shared --replace "-lv8_libplatform" ""
patchShebangs ./generate_upgrade.sh patchShebangs ./generate_upgrade.sh
substituteInPlace generate_upgrade.sh \ substituteInPlace generate_upgrade.sh \
--replace " 2.3.10)" " 2.3.10 2.3.11 2.3.12 2.3.13 2.3.14 2.3.15)" --replace " 2.3.10)" " 2.3.10 2.3.11 2.3.12 2.3.13 2.3.14 2.3.15)"
@ -42,10 +44,14 @@ stdenv.mkDerivation rec {
rmdir "$out/nix/store"/* "$out/nix/store" "$out/nix" rmdir "$out/nix/store"/* "$out/nix/store" "$out/nix"
''; '';
# Without this, PostgreSQL will crash at runtime. NIX_CFLAGS_COMPILE = [
# The flags are only included in Makefile, not Makefile.shared. # V8 depends on C++14.
# https://github.com/plv8/plv8/pull/469 "-std=c++14"
NIX_CFLAGS_COMPILE = "-DJSONB_DIRECT_CONVERSION -DV8_COMPRESS_POINTERS=1 -DV8_31BIT_SMIS_ON_64BIT_ARCH=1"; # Without this, PostgreSQL will crash at runtime.
# The flags are only included in Makefile, not Makefile.shared.
# https://github.com/plv8/plv8/pull/469
"-DJSONB_DIRECT_CONVERSION" "-DV8_COMPRESS_POINTERS=1" "-DV8_31BIT_SMIS_ON_64BIT_ARCH=1"
];
meta = with lib; { meta = with lib; {
description = "V8 Engine Javascript Procedural Language add-on for PostgreSQL"; description = "V8 Engine Javascript Procedural Language add-on for PostgreSQL";

View file

@ -26,7 +26,9 @@ self: super: {
plr = super.callPackage ./ext/plr.nix { }; plr = super.callPackage ./ext/plr.nix { };
plv8 = super.callPackage ./ext/plv8.nix { }; plv8 = super.callPackage ./ext/plv8.nix {
v8 = self.v8_8_x;
};
pgjwt = super.callPackage ./ext/pgjwt.nix { }; pgjwt = super.callPackage ./ext/pgjwt.nix { };