Skip to content

Commit 14e8f5b

Browse files
authored
tools: enable temporal by default in Nix integration
So we can test it with `test-shared.yml`. Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #66267 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
1 parent cd908df commit 14e8f5b

5 files changed

Lines changed: 23 additions & 74 deletions

File tree

‎.github/workflows/test-shared.yml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,16 @@ jobs:
168168
extra-nix-flags: |
169169
--arg useSeparateDerivationForV8 true \
170170
${{ matrix.perfetto && '--arg withPerfetto true \' || '\' }}
171-
${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withLief false --arg withSQLite false --arg withFFI false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }}
171+
${{ endsWith(matrix.system, '-darwin') && '\
172+
--arg withAmaro false \
173+
--arg withFFI false \
174+
--arg withLief false \
175+
--arg withSQLite false \
176+
--arg withTemporal false \
177+
--arg extraConfigFlags ''[
178+
"--without-inspector"
179+
"--without-node-options"
180+
]'' \' || '\' }}
172181
secrets:
173182
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
174183

‎shell.nix‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
withSQLite ? true,
1919
withFFI ? true,
2020
withSSL ? true,
21-
withTemporal ? false,
21+
withTemporal ? true,
2222
withPerfetto ? false,
2323
sharedLibDeps ? (
2424
import ./tools/nix/sharedLibDeps.nix {

‎tools/nix/sharedLibDeps.nix‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
withSSL ? true,
77
withFFI ? true,
88
withPerfetto ? false,
9-
withTemporal ? false,
9+
withTemporal ? true,
1010
}:
1111
{
1212
inherit (pkgs)

‎tools/nix/temporal-no-vendored-icu.patch‎

Lines changed: 0 additions & 63 deletions
This file was deleted.

‎tools/nix/v8.nix‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
let
2626
useSharedAbseil = builtins.elem "--shared-abseil" configureFlags;
2727
useSharedHighway = builtins.elem "--shared-highway" configureFlags;
28+
useSharedPerfetto = builtins.elem "--shared-perfetto" configureFlags;
2829
useSharedSimdutf = builtins.elem "--shared-simdutf" configureFlags;
30+
useSharedTemporal = builtins.elem "--shared-temporal_capi" configureFlags;
31+
2932
src =
3033
let
3134
inherit (lib) fileset;
@@ -50,8 +53,13 @@ let
5053
++ lib.optional (!useSharedHighway) ../../tools/v8_gypfiles/highway.gyp
5154
++ lib.optional (!useSharedSimdutf) ../../tools/v8_gypfiles/simdutf.gyp
5255
++ lib.optional (
53-
builtins.elem "--with-perfetto" configureFlags
54-
&& !(builtins.elem "--shared-perfetto" configureFlags)
56+
if useSharedTemporal then
57+
icu == null
58+
else
59+
!(builtins.elem "--v8-disable-temporal-support" configureFlags)
60+
) ../../deps/crates
61+
++ lib.optional (
62+
builtins.elem "--with-perfetto" configureFlags && !useSharedPerfetto
5563
) ../../deps/perfetto
5664
++ lib.optionals (icu != null) [
5765
../../tools/icu/icu_versions.json
@@ -111,14 +119,9 @@ stdenv.mkDerivation (finalAttrs: {
111119
else
112120
"${builtins.elemAt v8Version 0}.${builtins.elemAt v8Version 1}.${builtins.elemAt v8Version 2}.${builtins.elemAt v8Version 3}-${builtins.elemAt v8_embedder_string 0}";
113121

114-
patches = lib.optional (
115-
# V8 accesses internal ICU headers and methods in the Temporal files.
116-
!(builtins.isString icu) && builtins.elem "--v8-enable-temporal-support" configureFlags
117-
) ./temporal-no-vendored-icu.patch;
118-
119122
# We need to patch tools/gyp/ to work from within Nix sandbox
120123
prePatch = ''
121-
${lib.optionalString (builtins.length finalAttrs.patches == 0) "patches=()"}
124+
${lib.optionalString (builtins.length (finalAttrs.patches or [ ]) == 0) "patches=()"}
122125
for patch in ${lib.concatStringsSep " " patches}; do
123126
filtered=$(mktemp)
124127
filterdiff -p1 -i 'tools/gyp/pylib/*' "$patch" > "$filtered"

0 commit comments

Comments
 (0)