Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch react-native script to not look for nvm #15681

Merged
merged 1 commit into from
Apr 18, 2023
Merged
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
13 changes: 13 additions & 0 deletions nix/deps/nodejs-patched/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ stdenv.mkDerivation {
"patchYogaNodePackagePhase"
"patchReactNativePhase"
"patchPodPhase"
"patchReactNativeXcodeScriptPhase"
"installPhase"
];

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

# Patch React Native Xcode Script that searches for nvm
# FIXME: Remove this once we upgrade react-native to 0.69.x
patchReactNativeXcodeScriptPhase = ''
substituteInPlace ./node_modules/react-native/scripts/find-node.sh --replace \
'# Define NVM_DIR and source the nvm.sh setup script' \
'<<MULTI_LINE_COMMENT${"\n"}# Define NVM_DIR and source the nvm.sh setup script'

substituteInPlace ./node_modules/react-native/scripts/find-node.sh --replace \
'# Set up the nodenv node version manager if present' \
'MULTI_LINE_COMMENT${"\n"}# Set up the nodenv node version manager if present'
'';


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