mirror of
https://github.com/status-im/status-go.git
synced 2025-02-01 17:38:36 +00:00
Jakub Sokołowski
9dd80e7f1e
Installing the SDK via Ansible is prone to error and not exactly reproduceable. This way we can also track the exact tooling version as used in Status Mobile app: https://github.com/status-im/status-mobile/blob/develop/nix/pkgs.nix Signed-off-by: Jakub Sokołowski <jakub@status.im>
53 lines
1.5 KiB
Nix
53 lines
1.5 KiB
Nix
{
|
|
/* This should match Nixpkgs commit in status-mobile. */
|
|
source ? builtins.fetchTarball {
|
|
url = "https://github.com/NixOS/nixpkgs/archive/579238da5f431b7833a9f0681663900aaf0dd1e8.zip";
|
|
sha256 = "sha256:0a77c8fq4145k0zdmsda9cmhfw84ipf9nhvvn0givzhza1500g3h";
|
|
},
|
|
pkgs ? import (source){
|
|
config = {
|
|
allowUnfree = true;
|
|
android_sdk.accept_license = true;
|
|
};
|
|
overlays = [
|
|
(self: super: {
|
|
androidPkgs = pkgs.androidenv.composeAndroidPackages {
|
|
toolsVersion = "26.1.1";
|
|
platformToolsVersion = "33.0.2";
|
|
buildToolsVersions = [ "31.0.0" ];
|
|
platformVersions = [ "31" ];
|
|
cmakeVersions = [ "3.18.1" ];
|
|
ndkVersion = "22.1.7171670";
|
|
includeNDK = true;
|
|
includeExtras = [
|
|
"extras;android;m2repository"
|
|
"extras;google;m2repository"
|
|
];
|
|
};
|
|
})
|
|
];
|
|
}
|
|
}:
|
|
|
|
pkgs.mkShell {
|
|
name = "status-go-shell";
|
|
|
|
buildInputs = with pkgs; [
|
|
git jq which
|
|
go_1_18 gopls go-bindata
|
|
mockgen protobuf3_17 protoc-gen-go
|
|
(gomobile.override { xcodeWrapperArgs = { version = "13.4.1"; }; })
|
|
] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
|
|
(xcodeenv.composeXcodeWrapper { version = "13.4.1"; })
|
|
];
|
|
|
|
shellHook = let
|
|
androidSdk = pkgs.androidPkgs.androidsdk;
|
|
in ''
|
|
ANDROID_HOME=${androidSdk}/libexec/android-sdk
|
|
ANDROID_SDK_ROOT=$ANDROID_HOME
|
|
ANDROID_NDK=${androidSdk}/libexec/android-sdk/ndk-bundle
|
|
ANDROID_NDK_HOME=$ANDROID_NDK
|
|
'';
|
|
}
|