Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/test-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,16 @@ jobs:
extra-nix-flags: |
--arg useSeparateDerivationForV8 true \
${{ matrix.perfetto && '--arg withPerfetto true \' || '\' }}
${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withLief false --arg withSQLite false --arg withFFI false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }}
${{ endsWith(matrix.system, '-darwin') && '\
--arg withAmaro false \
--arg withFFI false \
--arg withLief false \
--arg withSQLite false \
--arg withTemporal false \
--arg extraConfigFlags ''[
"--without-inspector"
"--without-node-options"
]'' \' || '\' }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
withSQLite ? true,
withFFI ? true,
withSSL ? true,
withTemporal ? false,
withTemporal ? true,
withPerfetto ? false,
sharedLibDeps ? (
import ./tools/nix/sharedLibDeps.nix {
Expand Down
2 changes: 1 addition & 1 deletion tools/nix/sharedLibDeps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
withSSL ? true,
withFFI ? true,
withPerfetto ? false,
withTemporal ? false,
withTemporal ? true,
}:
{
inherit (pkgs)
Expand Down
63 changes: 0 additions & 63 deletions tools/nix/temporal-no-vendored-icu.patch

This file was deleted.

19 changes: 11 additions & 8 deletions tools/nix/v8.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
let
useSharedAbseil = builtins.elem "--shared-abseil" configureFlags;
useSharedHighway = builtins.elem "--shared-highway" configureFlags;
useSharedPerfetto = builtins.elem "--shared-perfetto" configureFlags;
useSharedSimdutf = builtins.elem "--shared-simdutf" configureFlags;
useSharedTemporal = builtins.elem "--shared-temporal_capi" configureFlags;

src =
let
inherit (lib) fileset;
Expand All @@ -50,8 +53,13 @@ let
++ lib.optional (!useSharedHighway) ../../tools/v8_gypfiles/highway.gyp
++ lib.optional (!useSharedSimdutf) ../../tools/v8_gypfiles/simdutf.gyp
++ lib.optional (
builtins.elem "--with-perfetto" configureFlags
&& !(builtins.elem "--shared-perfetto" configureFlags)
if useSharedTemporal then
icu == null
else
!(builtins.elem "--v8-disable-temporal-support" configureFlags)
) ../../deps/crates
++ lib.optional (
builtins.elem "--with-perfetto" configureFlags && !useSharedPerfetto
) ../../deps/perfetto
++ lib.optionals (icu != null) [
../../tools/icu/icu_versions.json
Expand Down Expand Up @@ -111,14 +119,9 @@ stdenv.mkDerivation (finalAttrs: {
else
"${builtins.elemAt v8Version 0}.${builtins.elemAt v8Version 1}.${builtins.elemAt v8Version 2}.${builtins.elemAt v8Version 3}-${builtins.elemAt v8_embedder_string 0}";

patches = lib.optional (
# V8 accesses internal ICU headers and methods in the Temporal files.
!(builtins.isString icu) && builtins.elem "--v8-enable-temporal-support" configureFlags
) ./temporal-no-vendored-icu.patch;

# We need to patch tools/gyp/ to work from within Nix sandbox
prePatch = ''
${lib.optionalString (builtins.length finalAttrs.patches == 0) "patches=()"}
${lib.optionalString (builtins.length (finalAttrs.patches or [ ]) == 0) "patches=()"}
for patch in ${lib.concatStringsSep " " patches}; do
filtered=$(mktemp)
filterdiff -p1 -i 'tools/gyp/pylib/*' "$patch" > "$filtered"
Expand Down
Loading