Skip to content

Commit

Permalink
address feedback by @jakubgs
Browse files Browse the repository at this point in the history
  • Loading branch information
siddarthkay committed Sep 30, 2023
1 parent e69e287 commit 5f6e406
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
27 changes: 13 additions & 14 deletions nix/deps/nodejs-patched/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,18 @@ stdenv.mkDerivation {
'';

# Do not add a BuildId to the generated libraries, for reproducibility
patchBuildIdPhase = ''
substituteInPlace ./node_modules/react-native/ReactAndroid/src/main/jni/CMakeLists.txt --replace \
'-Wl,--build-id' \
'-Wl,--build-id=none'
'';
patchBuildIdPhase = ''
substituteInPlace ./node_modules/react-native/ReactAndroid/src/main/jni/CMakeLists.txt --replace \
'-Wl,--build-id' \
'-Wl,--build-id=none'
'';

# Remove when we upgrade jest to 29
patchJestPhase = ''
substituteInPlace ./node_modules/react-native/jest/setup.js --replace \
'jest.now()' \
'Date.now'
'';

patchJestPhase = ''
substituteInPlace ./node_modules/react-native/jest/setup.js --replace \
'jest.now()' \
'Date.now'
'';

installPhase = ''
mkdir -p $out
Expand All @@ -73,9 +72,9 @@ stdenv.mkDerivation {
# https://github.com/oblador/react-native-keychain/issues/595
# TODO: remove this patch when we this library fixes above issue
patchKeyChainPhase = ''
sed -i -e '/classpath/d' \
-e '/apply plugin: "com\.adarshr\.test-logger"/d' \
./node_modules/react-native-keychain/android/build.gradle
sed -i -e '/classpath/d' \
-e '/apply plugin: "com\.adarshr\.test-logger"/d' \
./node_modules/react-native-keychain/android/build.gradle
'';

# Fix for :react-native-camera-kit:compileDebugKotlin FAILED
Expand Down
7 changes: 3 additions & 4 deletions nix/scripts/node_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ copyNodeModules() {

# WARNING: We can't de-reference .bin symlinks
cp -Rf ${src}/node_modules/.bin/. "${tmp}/.bin/"
# we need to rm -rf after upgrading react-native-reanimated to 3.3.0
# they use debug flags in Cmake Android project when the app is built in debug mode
# those files are right protected by default
rm -rf "${dst}"
# Cmake called by react-native-reanimated 3.3.0 during build creates read-only temporary files.
chmod -R u+w node_modules/react-native-reanimated/android/.cxx
rm -r "${dst}"
mv -f "${tmp}" "${dst}"
}

Expand Down

0 comments on commit 5f6e406

Please sign in to comment.