-
Notifications
You must be signed in to change notification settings - Fork 984
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jakub Sokołowski <jakub@status.im>
- Loading branch information
Showing
18 changed files
with
163 additions
and
135 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
{ mkShell, curl, flock, git, gradle, jq, maven, nodejs, | ||
projectNodePackage, androidEnvShellHook, status-go }: | ||
{ mergeSh, mkShell, curl, flock, git, gradle, jq, maven, nodejs, | ||
projectNodePackage, androidShell, status-go }: | ||
|
||
mkShell { | ||
mergeSh (mkShell { | ||
buildInputs = [ | ||
curl | ||
flock # used in reset-node_modules.sh | ||
git | ||
gradle | ||
jq | ||
maven | ||
nodejs | ||
curl flock # used in reset-node_modules.sh | ||
git gradle jq maven nodejs | ||
projectNodePackage | ||
]; | ||
shellHook = '' | ||
${androidEnvShellHook} | ||
${status-go.shell.shellHook} | ||
$STATUS_REACT_HOME/nix/mobile/reset-node_modules.sh "${projectNodePackage}" | ||
''; | ||
} | ||
}) [ status-go.shell androidShell ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# | ||
# This Nix expression centralizes the configuration | ||
# for the Android development environment. | ||
# | ||
|
||
{ callPackage }: | ||
|
||
let | ||
pkgs = callPackage ./pkgs.nix { }; | ||
shell = callPackage ./shell.nix { }; | ||
licensedPkgs = callPackage ./licensed.nix { }; | ||
in { | ||
inherit pkgs licensedPkgs shell; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ 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" | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# This Nix expression centralizes the configuration | ||
# for the Android development environment. | ||
# | ||
|
||
{ stdenv, config, callPackage, androidenv, openjdk, mkShell }: | ||
|
||
androidenv.composeAndroidPackages { | ||
toolsVersion = "26.1.1"; | ||
platformToolsVersion = "29.0.6"; | ||
buildToolsVersions = [ "29.0.2" ]; | ||
includeEmulator = false; | ||
platformVersions = [ "29" ]; | ||
includeSources = false; | ||
includeDocs = false; | ||
includeSystemImages = false; | ||
systemImageTypes = [ "default" ]; | ||
lldbVersions = [ "3.1.4508709" ]; | ||
cmakeVersions = [ "3.10.2" ]; | ||
includeNDK = true; | ||
ndkVersion = "21.0.6113669"; | ||
useGoogleAPIs = false; | ||
useGoogleTVAddOns = false; | ||
includeExtras = [ | ||
"extras;android;m2repository" | ||
"extras;google;m2repository" | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ mkShell, callPackage, openjdk }: | ||
|
||
let | ||
licensedPkgs = callPackage ./licensed.nix { }; | ||
in | ||
mkShell { | ||
shellHook = '' | ||
export JAVA_HOME="${openjdk}" | ||
export ANDROID_HOME="${licensedPkgs}" | ||
export ANDROID_SDK_ROOT="${licensedPkgs}" | ||
export ANDROID_NDK_ROOT="${licensedPkgs}/ndk-bundle" | ||
export PATH="$ANDROID_HOME/bin:$PATH" | ||
export PATH="$ANDROID_NDK_ROOT:$PATH" | ||
export PATH="$ANDROID_SDK_ROOT/tools:$PATH" | ||
export PATH="$ANDROID_SDK_ROOT/tools/bin:$PATH" | ||
export PATH="$ANDROID_SDK_ROOT/platform-tools:$PATH" | ||
export PATH="$ANDROID_SDK_ROOT/build-tools:$PATH" | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,38 @@ | ||
{ config, lib, stdenvNoCC, callPackage, status-go, | ||
localMavenRepoBuilder, composeXcodeWrapper, mkShell, mergeSh }: | ||
{ config, lib, stdenvNoCC, callPackage, mkShell, | ||
status-go, mergeSh, xcodeWrapper }: | ||
|
||
let | ||
inherit (lib) catAttrs concatStrings optional unique; | ||
|
||
xcodewrapperArgs = { | ||
version = "11.4.1"; | ||
}; | ||
xcodeWrapper = composeXcodeWrapper xcodewrapperArgs; | ||
projectNodePackage = callPackage ./node-package.nix { }; | ||
|
||
localMavenRepoBuilder = callPackage ../tools/maven/maven-repo-builder.nix { }; | ||
|
||
fastlane = callPackage ./fastlane { }; | ||
androidPlatform = callPackage ./android { | ||
|
||
android = callPackage ./android { | ||
inherit localMavenRepoBuilder projectNodePackage; | ||
status-go = status-go.android; | ||
}; | ||
iosPlatform = callPackage ./ios { | ||
|
||
ios = callPackage ./ios { | ||
inherit xcodeWrapper projectNodePackage fastlane; | ||
status-go = status-go.ios; | ||
}; | ||
|
||
selectedSources = [ | ||
fastlane | ||
status-go.android | ||
status-go.ios | ||
androidPlatform | ||
iosPlatform | ||
fastlane | ||
android | ||
ios | ||
]; | ||
|
||
projectNodePackage = callPackage ./node-package.nix { inherit (lib) importJSON; }; | ||
|
||
in { | ||
buildInputs = unique (catAttrs "buildInputs" selectedSources); | ||
|
||
shell = mergeSh (mkShell {}) (catAttrs "shell" selectedSources); | ||
|
||
# CHILD DERIVATIONS | ||
android = androidPlatform; | ||
ios = iosPlatform; | ||
|
||
# TARGETS | ||
inherit fastlane xcodeWrapper; | ||
inherit android ios fastlane; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.