mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-10 15:46:35 +00:00
Notable version upgrades: - Go: 1.13.4 > 1.14.0 - GoMobile: 20190806 > 20200329 - NodeJS: 10.17.0 > 12.0.0 - Yarn: 1.19.1 > 1.22.4 - Gradle: 5.1.1 > 5.6.4 - OpenJDK: 1.8.0-222 > 8u242-b08 - Clojure: 1.10.0.411 > 1.10.1.507 OpenSSL is still stuck on 1.0.2u due to Android SDK. Signed-off-by: Jakub Sokołowski <jakub@status.im>
63 lines
2.0 KiB
Nix
63 lines
2.0 KiB
Nix
{ config, lib, callPackage, mkShell, mergeSh, androidenv, flock, lsof, openjdk, gradle_5,
|
|
status-go, localMavenRepoBuilder, projectNodePackage }:
|
|
|
|
let
|
|
gradle = gradle_5; # Currently 5.6.4
|
|
androidEnv = callPackage ./android-env.nix { };
|
|
leinProjectDeps = import ../../lein/lein-project-deps.nix { };
|
|
|
|
# Import a jsbundle compiled out of clojure codebase
|
|
jsbundle = callPackage ./jsbundle/default.nix {
|
|
inherit leinProjectDeps localMavenRepoBuilder projectNodePackage;
|
|
};
|
|
|
|
# Import a patched version of watchman (important for sandboxed builds on macOS)
|
|
watchmanFactory = callPackage ./watchman.nix { };
|
|
|
|
# Import a local patched version of node_modules, together with a local version of the Maven repo
|
|
mavenAndNpmDeps = callPackage ./maven-and-npm-deps {
|
|
inherit gradle localMavenRepoBuilder projectNodePackage;
|
|
};
|
|
|
|
# TARGETS
|
|
release = callPackage ./targets/release-android.nix {
|
|
inherit config gradle mavenAndNpmDeps jsbundle status-go watchmanFactory;
|
|
androidEnvShellHook = androidEnv.shell.shellHook;
|
|
};
|
|
|
|
generate-maven-and-npm-deps-shell = callPackage ./maven-and-npm-deps/maven/shell.nix {
|
|
inherit gradle projectNodePackage status-go;
|
|
androidEnvShellHook = androidEnv.shell.shellHook;
|
|
};
|
|
|
|
buildInputs = [
|
|
mavenAndNpmDeps.drv openjdk gradle
|
|
lsof # used in start-react-native.sh
|
|
flock # used in reset-node_modules.sh
|
|
];
|
|
|
|
in {
|
|
# TARGETS
|
|
inherit release jsbundle generate-maven-and-npm-deps-shell buildInputs;
|
|
inherit (androidEnv) androidComposition;
|
|
|
|
shell = mergeSh
|
|
(mkShell {
|
|
inherit buildInputs;
|
|
inputsFrom = [ release gradle ];
|
|
shellHook = ''
|
|
# check if node modules changed and if so install them
|
|
$STATUS_REACT_HOME/nix/mobile/reset-node_modules.sh \
|
|
"${mavenAndNpmDeps.drv}/project"
|
|
'';
|
|
})
|
|
(lib.catAttrs "shell" [ status-go mavenAndNpmDeps androidEnv ]);
|
|
|
|
env = {
|
|
shell = mkShell {
|
|
buildInputs = [ androidEnv.drv ];
|
|
inherit (androidEnv.shell) shellHook;
|
|
};
|
|
};
|
|
}
|