mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-16 03:35:33 +00:00
Jakub Sokołowski
73a8992db7
Changes: - Drop `nix/mobile/android/maven-and-npm-deps/default.nix` - Replace it with much simpler `nix/tools/patchNodeModules` - Move Gradle patching tool to `nix/pkgs/patch-maven-srcs` - Simplify it by using `gradle.deps` and patched node modules separately - Change `TARGET` for `release-android` to `default` - Move `mobile/reset-node_modules.sh` to `scripts/node_modules.sh` - Move `nix/mobile/android/targets/release-android.nix` to `nix/mobile/android/release.nix` Signed-off-by: Jakub Sokołowski <jakub@status.im>
27 lines
1.1 KiB
Nix
27 lines
1.1 KiB
Nix
{ config, stdenv, callPackage }:
|
|
|
|
let
|
|
androidPkgs = callPackage ./pkgs.nix { };
|
|
in
|
|
# Licensed Android Environment as a separate derivation
|
|
stdenv.mkDerivation rec {
|
|
name = "licensed-android-sdk";
|
|
version = "licensed";
|
|
phases = [ "installPhase" "licensePhase" ];
|
|
installPhase = ''
|
|
mkdir -p $out/libexec/android-sdk
|
|
ln -s "${androidPkgs.androidsdk}/bin" $out/bin
|
|
for d in ${androidPkgs.androidsdk}/libexec/android-sdk/*; do
|
|
ln -s $d $out/$(basename $d)
|
|
done
|
|
'';
|
|
licensePhase = stdenv.lib.optionalString config.android_sdk.accept_license ''
|
|
mkdir -p $out/licenses
|
|
echo -e "\n601085b94cd77f0b54ff86406957099ebe79c4d6" > "$out/licenses/android-googletv-license"
|
|
echo -e "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$out/licenses/android-sdk-license"
|
|
echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$out/licenses/android-sdk-preview-license"
|
|
echo -e "\nd975f751698a77b662f1254ddbeed3901e976f5a" > "$out/licenses/intel-android-extra-license"
|
|
echo -e "\n33b6a2b64607f11b759f320ef9dff4ae5c47d97a" > "$out/licenses/google-gdk-license"
|
|
'';
|
|
}
|