Skip to content

Commit f470b85

Browse files
committed
fix: replace deprecated v8 package, and wrong packages arguments
1 parent 60f641f commit f470b85

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

nix/ext/plv8/default.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
stdenv,
33
lib,
44
fetchFromGitHub,
5-
v8,
5+
# v8,
66
perl,
77
postgresql,
88
# For passthru test on various systems, and local development on macos
@@ -36,13 +36,22 @@ let
3636
lib.mapAttrs (name: value: build name value.hash) supportedVersions
3737
);
3838

39+
# plv8 3.1 requires an older version of v8 (we cannot use nodejs.libv8)
40+
node_pkgs = import (fetchTarball {
41+
url = "https://github.com/nixos/nixpkgs/archive/a76c4553d7e741e17f289224eda135423de0491d.tar.gz";
42+
sha256 = "0rwdzp942b8ay625lqgra83qrp64b3wqm6w9a0i4z593df8x822v";
43+
}) { system = stdenv.system; };
44+
inherit (node_pkgs) v8;
45+
3946
# Build function for individual versions
4047
build =
4148
version: hash:
4249
stdenv.mkDerivation (finalAttrs: {
4350
inherit pname version;
4451
#version = "3.1.10";
4552

53+
v8 = (if (builtins.compareVersions "3.1.10" version >= 0) then v8 else nodejs_20.libv8);
54+
4655
src = fetchFromGitHub {
4756
owner = "plv8";
4857
repo = "plv8";

nix/postgresql/generic.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ let
6565
# detection of crypt fails when using llvm stdenv, so we add it manually
6666
# for <13 (where it got removed: https://github.com/postgres/postgres/commit/c45643d618e35ec2fe91438df15abd4f3c0d85ca)
6767
libxcrypt,
68+
69+
isOrioleDB ? (builtins.match "[0-9][0-9]_.*" version) != null,
6870
}@args:
6971
let
7072
atLeast = lib.versionAtLeast version;
@@ -78,8 +80,6 @@ let
7880
else
7981
(lib.warn "postgresql: argument enableSystemd is deprecated, please use systemdSupport instead." enableSystemd);
8082

81-
isOrioleDB = (builtins.match "[0-9][0-9]_.*" version) != null;
82-
8383
pname = "postgresql";
8484

8585
stdenv' = if jitSupport then llvmPackages.stdenv else stdenv;

0 commit comments

Comments
 (0)