Skip to content

Commit 3525c5f

Browse files
committed
patch react-native script to not look for nvm
1 parent 4fefa62 commit 3525c5f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

nix/deps/nodejs-patched/default.nix

+13
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ stdenv.mkDerivation {
1515
"patchYogaNodePackagePhase"
1616
"patchReactNativePhase"
1717
"patchPodPhase"
18+
"patchReactNativeXcodeScriptPhase"
1819
"installPhase"
1920
];
2021

@@ -106,6 +107,18 @@ stdenv.mkDerivation {
106107
'[RCTConvert UIColor:options.tintColor() ? @(*options.tintColor()) : nil];'
107108
'';
108109

110+
# Patch React Native Xcode Script that searches for nvm
111+
# FIXME: Remove this once we upgrade react-native to 0.69.x
112+
patchReactNativeXcodeScriptPhase = ''
113+
substituteInPlace ./node_modules/react-native/scripts/find-node.sh --replace \
114+
'# Define NVM_DIR and source the nvm.sh setup script' \
115+
'<<comment # \n Define NVM_DIR and source the nvm.sh setup script'
116+
117+
substituteInPlace ./node_modules/react-native/scripts/find-node.sh --replace \
118+
'# Set up the nodenv node version manager if present' \
119+
'comment # \n Set up the nodenv node version manager if present'
120+
'';
121+
109122

110123
# The ELF types are incompatible with the host platform, so let's not even try
111124
# TODO: Use Android NDK to strip binaries manually

0 commit comments

Comments
 (0)