|
5 | 5 | patchutils, |
6 | 6 | validatePkgConfig, |
7 | 7 | nodejs-slim_latest, |
| 8 | + icu, |
8 | 9 |
|
9 | | - buildInputs ? [ ], |
10 | | - configureFlags ? [ ], |
| 10 | + buildInputs ? [ icu ], |
| 11 | + configureFlags ? [ |
| 12 | + ( |
| 13 | + if icu == null then |
| 14 | + "--without-intl" |
| 15 | + else |
| 16 | + "--with-intl=${if builtins.isString icu then icu else "system"}-icu" |
| 17 | + ) |
| 18 | + ], |
11 | 19 |
|
12 | 20 | configureScript ? nodejs-slim_latest.configureScript, |
13 | 21 | nativeBuildInputs ? nodejs-slim_latest.nativeBuildInputs, |
@@ -41,29 +49,40 @@ stdenv.mkDerivation (finalAttrs: { |
41 | 49 | in |
42 | 50 | fileset.toSource { |
43 | 51 | root = ../../.; |
44 | | - fileset = fileset.unions [ |
45 | | - v8Dir |
46 | | - ../../common.gypi |
47 | | - ../../configure.py |
48 | | - ../../node.gyp |
49 | | - ../../node.gypi |
50 | | - ../../src/node_version.h |
51 | | - ../../tools/configure.d/nodedownload.py |
52 | | - ../../tools/getmoduleversion.py |
53 | | - ../../tools/getnapibuildversion.py |
54 | | - ../../tools/gyp_node.py |
55 | | - ../../tools/icu/icu_versions.json |
56 | | - ../../tools/icu/icu-system.gyp |
57 | | - ../../tools/utils.py |
58 | | - ../../tools/v8_gypfiles/abseil.gyp |
59 | | - ../../tools/v8_gypfiles/features.gypi |
60 | | - ../../tools/v8_gypfiles/ForEachFormat.py |
61 | | - ../../tools/v8_gypfiles/ForEachReplace.py |
62 | | - ../../tools/v8_gypfiles/GN-scraper.py |
63 | | - ../../tools/v8_gypfiles/inspector.gypi |
64 | | - ../../tools/v8_gypfiles/toolchain.gypi |
65 | | - ../../tools/v8_gypfiles/v8.gyp |
66 | | - ]; |
| 52 | + fileset = fileset.unions ( |
| 53 | + [ |
| 54 | + v8Dir |
| 55 | + ../../common.gypi |
| 56 | + ../../configure.py |
| 57 | + ../../node.gyp |
| 58 | + ../../node.gypi |
| 59 | + ../../src/node_version.h |
| 60 | + ../../tools/configure.d/nodedownload.py |
| 61 | + ../../tools/getmoduleversion.py |
| 62 | + ../../tools/getnapibuildversion.py |
| 63 | + ../../tools/gyp_node.py |
| 64 | + ../../tools/icu/icu_versions.json |
| 65 | + ../../tools/icu/icu-system.gyp |
| 66 | + ../../tools/utils.py |
| 67 | + ../../tools/v8_gypfiles/abseil.gyp |
| 68 | + ../../tools/v8_gypfiles/features.gypi |
| 69 | + ../../tools/v8_gypfiles/ForEachFormat.py |
| 70 | + ../../tools/v8_gypfiles/ForEachReplace.py |
| 71 | + ../../tools/v8_gypfiles/GN-scraper.py |
| 72 | + ../../tools/v8_gypfiles/inspector.gypi |
| 73 | + ../../tools/v8_gypfiles/toolchain.gypi |
| 74 | + ../../tools/v8_gypfiles/v8.gyp |
| 75 | + ] |
| 76 | + ++ lib.optionals (icu == "small") [ |
| 77 | + ../../deps/icu-small |
| 78 | + ../../tools/icu/current_ver.dep |
| 79 | + ../../tools/icu/icu_small.json |
| 80 | + ../../tools/icu/icu-generic.gyp |
| 81 | + ../../tools/icu/iculslocs.cc |
| 82 | + ../../tools/icu/icutrim.py |
| 83 | + ../../tools/icu/no-op.cc |
| 84 | + ] |
| 85 | + ); |
67 | 86 | }; |
68 | 87 |
|
69 | 88 | # We need to download and patch GYP to work from within Nix sandbox |
|
0 commit comments