nix: move jetify-ing Java files to patchNodeModules

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-05-15 18:36:03 +02:00
parent 2f9593a7d2
commit 559a79b3d5
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 5 additions and 5 deletions

View File

@ -107,9 +107,6 @@ in stdenv.mkDerivation rec {
# Patch build.gradle to use local repo
${patchMavenSources} ./android/build.gradle ${deps.gradle}
# Patch dependencies which are not yet ported to AndroidX
${nodejs}/bin/node ./node_modules/jetifier/bin/jetify
'';
secretPhase = optionalString (secretsFile != "") ''
source "${secretsFile}"

View File

@ -2,7 +2,7 @@
# result of yarn2nix and symlinking what is fine, and
# copying and modifying what needs to be adjusted.
{ stdenv, lib, pkgs, patchMavenSources, coreutils }:
{ stdenv, patchMavenSources, nodejs }:
nodePkgs: mavenPkgs:
@ -31,8 +31,8 @@ stdenv.mkDerivation {
if [[ -L ./node_modules/$moduleName ]]; then
unlink ./node_modules/$moduleName
cp -r ${nodePkgs}/node_modules/$moduleName ./node_modules/
chmod u+w -R ./node_modules/$moduleName
fi
chmod +w -R ./node_modules/$relativeToNode
${patchMavenSources} $modBuildGradle '${mavenPkgs}'
done
@ -50,6 +50,9 @@ stdenv.mkDerivation {
substituteInPlace ./node_modules/react-native/react.gradle --replace \
'targetName.toLowerCase().contains("release")' \
'!targetName.toLowerCase().contains("debug")'
# Patch Java files in modules which are not yet ported to AndroidX
${nodejs}/bin/node ./node_modules/jetifier/bin/jetify
'';
installPhase = ''