nix: move jetify-ing Java files to patchNodeModules
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
2f9593a7d2
commit
559a79b3d5
|
@ -107,9 +107,6 @@ in stdenv.mkDerivation rec {
|
||||||
|
|
||||||
# Patch build.gradle to use local repo
|
# Patch build.gradle to use local repo
|
||||||
${patchMavenSources} ./android/build.gradle ${deps.gradle}
|
${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 != "") ''
|
secretPhase = optionalString (secretsFile != "") ''
|
||||||
source "${secretsFile}"
|
source "${secretsFile}"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# result of yarn2nix and symlinking what is fine, and
|
# result of yarn2nix and symlinking what is fine, and
|
||||||
# copying and modifying what needs to be adjusted.
|
# copying and modifying what needs to be adjusted.
|
||||||
|
|
||||||
{ stdenv, lib, pkgs, patchMavenSources, coreutils }:
|
{ stdenv, patchMavenSources, nodejs }:
|
||||||
|
|
||||||
nodePkgs: mavenPkgs:
|
nodePkgs: mavenPkgs:
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ stdenv.mkDerivation {
|
||||||
if [[ -L ./node_modules/$moduleName ]]; then
|
if [[ -L ./node_modules/$moduleName ]]; then
|
||||||
unlink ./node_modules/$moduleName
|
unlink ./node_modules/$moduleName
|
||||||
cp -r ${nodePkgs}/node_modules/$moduleName ./node_modules/
|
cp -r ${nodePkgs}/node_modules/$moduleName ./node_modules/
|
||||||
|
chmod u+w -R ./node_modules/$moduleName
|
||||||
fi
|
fi
|
||||||
chmod +w -R ./node_modules/$relativeToNode
|
|
||||||
${patchMavenSources} $modBuildGradle '${mavenPkgs}'
|
${patchMavenSources} $modBuildGradle '${mavenPkgs}'
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -50,6 +50,9 @@ stdenv.mkDerivation {
|
||||||
substituteInPlace ./node_modules/react-native/react.gradle --replace \
|
substituteInPlace ./node_modules/react-native/react.gradle --replace \
|
||||||
'targetName.toLowerCase().contains("release")' \
|
'targetName.toLowerCase().contains("release")' \
|
||||||
'!targetName.toLowerCase().contains("debug")'
|
'!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 = ''
|
installPhase = ''
|
||||||
|
|
Loading…
Reference in New Issue