Skip to content

Commit 731953b

Browse files
committed
add support for no ICU
1 parent d35e15b commit 731953b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tools/nix/v8.nix

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
nodejs-slim_latest,
88
icu,
99

10-
buildInputs ? [ icu ],
10+
buildInputs ? lib.optional (icu != null) icu,
1111
configureFlags ? [
1212
(
1313
if icu == null then
@@ -61,8 +61,6 @@ stdenv.mkDerivation (finalAttrs: {
6161
../../tools/getmoduleversion.py
6262
../../tools/getnapibuildversion.py
6363
../../tools/gyp_node.py
64-
../../tools/icu/icu_versions.json
65-
../../tools/icu/icu-system.gyp
6664
../../tools/utils.py
6765
../../tools/v8_gypfiles/abseil.gyp
6866
../../tools/v8_gypfiles/features.gypi
@@ -73,6 +71,10 @@ stdenv.mkDerivation (finalAttrs: {
7371
../../tools/v8_gypfiles/toolchain.gypi
7472
../../tools/v8_gypfiles/v8.gyp
7573
]
74+
++ lib.optionals (icu != null) [
75+
../../tools/icu/icu_versions.json
76+
../../tools/icu/icu-system.gyp
77+
]
7678
++ lib.optionals (icu == "small") [
7779
../../deps/icu-small
7880
../../tools/icu/current_ver.dep
@@ -102,6 +104,12 @@ stdenv.mkDerivation (finalAttrs: {
102104
# We need to remove the node_inspector.gypi ref so GYP does not search for it.
103105
postPatch = ''
104106
substituteInPlace node.gyp --replace-fail "'includes' : [ 'src/inspector/node_inspector.gypi' ]" "'includes' : []"
107+
''
108+
+ lib.optionalString (icu == null) ''
109+
substituteInPlace configure.py \
110+
--replace-fail \
111+
"icu_versions = json.loads((tools_path / 'icu' / 'icu_versions.json').read_text(encoding='utf-8'))" \
112+
"icu_versions = { 'minimum_icu': 1 }"
105113
'';
106114

107115
inherit configureScript configureFlags buildInputs;

0 commit comments

Comments
 (0)