File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 ../../common.gypi
3838 ../../configure.py
3939 ../../deps/v8
40- ../../node.gyp
41- ../../node.gypi
4240 ../../tools/gyp/pylib
4341 ../../tools/gyp_node.py
4442 ../../tools/v8_gypfiles/features.gypi
@@ -154,9 +152,26 @@ stdenv.mkDerivation (finalAttrs: {
154152 return []
155153 EOF
156154 '' ;
157- # We need to remove the node_inspector.gypi ref so GYP does not search for it.
155+ # To avoid invalidating cached build on unrelated `node.gyp` and `node.gypi` changes,
156+ # we stub `node.gyp` to only reference the targets needed to build V8.
158157 postPatch = ''
159- substituteInPlace node.gyp --replace-fail "'includes' : [ 'src/inspector/node_inspector.gypi' ]" "'includes' : []"
158+ cat -> node.gyp <<'EOF'
159+ ${ builtins . toJSON {
160+ targets = [
161+ {
162+ target_name = "v8_deps_root" ;
163+ type = "none" ;
164+ dependencies = lib . unique (
165+ builtins . concatLists (
166+ builtins . filter builtins . isList (
167+ builtins . split "'(tools/v8_gypfiles/v8\\ .gyp:[A-Za-z0-9_]+)'" ( builtins . readFile ../../node.gypi )
168+ )
169+ )
170+ ) ;
171+ }
172+ ] ;
173+ } }
174+ EOF
160175 ''
161176 + lib . optionalString ( icu == null ) ''
162177 substituteInPlace configure.py \
@@ -179,7 +194,7 @@ stdenv.mkDerivation (finalAttrs: {
179194
180195 buildPhase = ''
181196 runHook preBuild
182- ninja -v -C out/Release v8_snapshot v8_libplatform
197+ ninja -v -C out/Release v8_deps_root
183198 runHook postBuild
184199 '' ;
185200 installPhase = ''
You can’t perform that action at this time.
0 commit comments