Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd64c0b7

Browse files
committed
WIP
1 parent9eb301c commitd64c0b7

File tree

3 files changed

+35
-37
lines changed

3 files changed

+35
-37
lines changed

‎nix/ext/plv8.nix‎

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@
1414
}:
1515
let
1616
# plv8 3.1 requires an older version of v8 (we cannot use nodejs.libv8)
17-
node_pkgs=import(fetchTarball{
18-
url="https://github.com/nixos/nixpkgs/archive/a76c4553d7e741e17f289224eda135423de0491d.tar.gz";
19-
sha256="0rwdzp942b8ay625lqgra83qrp64b3wqm6w9a0i4z593df8x822v";
20-
}){system=stdenv.system;};
21-
inherit(node_pkgs)v8;
17+
v8=nodejs_20.libv8;
2218
in
2319
stdenv.mkDerivation(finalAttrs:{
2420
pname="plv8";
@@ -37,36 +33,33 @@ stdenv.mkDerivation (finalAttrs: {
3733
./0001-build-Allow-using-V8-from-system.patch
3834
];
3935

40-
nativeBuildInputs=[
41-
perl
42-
]
43-
++lib.optionalsstdenv.isDarwin[
44-
clang
45-
xcbuild
46-
];
36+
nativeBuildInputs=
37+
[perl]
38+
++lib.optionalsstdenv.isDarwin[
39+
clang
40+
xcbuild
41+
];
4742

4843
buildInputs=[
4944
v8
5045
postgresql
51-
]
52-
++lib.optionalsstdenv.isDarwin[
53-
apple-sdk_11
54-
];
46+
]++lib.optionalsstdenv.isDarwin[apple-sdk_11];
5547

5648
buildFlags=["all"];
5749

58-
makeFlags=[
59-
# Nixpkgs build a v8 monolith instead of separate v8_libplatform.
60-
"USE_SYSTEM_V8=1"
61-
"V8_OUTDIR=${v8}/lib"
62-
"PG_CONFIG=${postgresql}/bin/pg_config"
63-
]
64-
++lib.optionalsstdenv.isDarwin[
65-
"CC=${clang}/bin/clang"
66-
"CXX=${clang}/bin/clang++"
67-
"SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib"
68-
]
69-
++lib.optionals(!stdenv.isDarwin)["SHLIB_LINK=-lv8"];
50+
makeFlags=
51+
[
52+
# Nixpkgs build a v8 monolith instead of separate v8_libplatform.
53+
"USE_SYSTEM_V8=1"
54+
"V8_OUTDIR=${v8}/lib"
55+
"PG_CONFIG=${postgresql}/bin/pg_config"
56+
]
57+
++lib.optionalsstdenv.isDarwin[
58+
"CC=${clang}/bin/clang"
59+
"CXX=${clang}/bin/clang++"
60+
"SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib"
61+
]
62+
++lib.optionals(!stdenv.isDarwin)["SHLIB_LINK=-lv8"];
7063

7164
NIX_LDFLAGS=(
7265
lib.optionalsstdenv.isDarwin[
@@ -127,9 +120,11 @@ stdenv.mkDerivation (finalAttrs: {
127120
install_name_tool -change @rpath/libv8_monolith.dylib${v8}/lib/libv8_monolith.dylib $out/lib/plv8.so
128121
''}
129122
130-
${lib.optionalString(!stdenv.isDarwin)''
131-
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so
132-
''}
123+
${
124+
lib.optionalString(!stdenv.isDarwin)''
125+
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so
126+
''
127+
}
133128
else
134129
${lib.optionalStringstdenv.isDarwin''
135130
install_name_tool -add_rpath "${v8}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix}
@@ -138,9 +133,11 @@ stdenv.mkDerivation (finalAttrs: {
138133
install_name_tool -change @rpath/libv8_monolith.dylib${v8}/lib/libv8_monolith.dylib $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix}
139134
''}
140135
141-
${lib.optionalString(!stdenv.isDarwin)''
142-
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix}
143-
''}
136+
${
137+
lib.optionalString(!stdenv.isDarwin)''
138+
${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix}
139+
''
140+
}
144141
fi
145142
'';
146143

‎nix/ext/plv8/default.nix‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
stdenv,
33
lib,
44
fetchFromGitHub,
5-
v8,
65
perl,
76
postgresql,
87
# For passthru test on various systems, and local development on macos
@@ -36,15 +35,15 @@ let
3635
lib.mapAttrs(name:value:buildnamevalue.hash)supportedVersions
3736
);
3837

38+
v8=nodejs_20.libv8;
39+
3940
# Build function for individual versions
4041
build=
4142
version:hash:
4243
stdenv.mkDerivation(finalAttrs:{
4344
inheritpnameversion;
4445
#version = "3.1.10";
4546

46-
v8=(if(builtins.compareVersions"3.1.10"version>=0)thenv8elsenodejs_20.libv8);
47-
4847
src=fetchFromGitHub{
4948
owner="plv8";
5049
repo="plv8";

‎nix/postgresql/generic.nix‎

Lines changed: 2 additions & 0 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 ?false,
6870
}@args:
6971
let
7072
atLeast=lib.versionAtLeastversion;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp