2022-05-26 09:11:34 +00:00
|
|
|
{ pkgs, deps, callPackage, mkShell
|
2020-05-18 10:15:49 +00:00
|
|
|
, status-go, androidPkgs, androidShell }:
|
2019-06-04 16:50:29 +00:00
|
|
|
|
|
|
|
let
|
2019-11-29 10:20:08 +00:00
|
|
|
# Import a jsbundle compiled out of clojure codebase
|
2020-05-06 10:29:02 +00:00
|
|
|
jsbundle = callPackage ./jsbundle { };
|
2019-06-04 16:50:29 +00:00
|
|
|
|
2019-09-10 09:50:09 +00:00
|
|
|
# Import a patched version of watchman (important for sandboxed builds on macOS)
|
|
|
|
watchmanFactory = callPackage ./watchman.nix { };
|
|
|
|
|
2019-06-04 16:50:29 +00:00
|
|
|
# TARGETS
|
2020-05-07 10:21:39 +00:00
|
|
|
release = callPackage ./release.nix {
|
2022-04-22 08:20:01 +00:00
|
|
|
inherit jsbundle status-go watchmanFactory;
|
2019-06-04 16:50:29 +00:00
|
|
|
};
|
|
|
|
|
2019-11-29 10:20:08 +00:00
|
|
|
in {
|
2019-06-04 16:50:29 +00:00
|
|
|
# TARGETS
|
2022-04-22 08:20:01 +00:00
|
|
|
inherit release jsbundle;
|
2020-05-05 22:48:50 +00:00
|
|
|
|
|
|
|
shell = mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
2020-05-06 13:33:54 +00:00
|
|
|
openjdk
|
|
|
|
gradle
|
2020-05-05 22:48:50 +00:00
|
|
|
lsof # used in start-react-native.sh
|
2020-05-07 10:21:39 +00:00
|
|
|
flock # used in nix/scripts/node_modules.sh
|
2020-05-05 22:48:50 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
inputsFrom = [
|
|
|
|
release
|
|
|
|
androidShell
|
|
|
|
];
|
|
|
|
|
|
|
|
shellHook = ''
|
2021-07-22 10:51:05 +00:00
|
|
|
export ANDROID_SDK_ROOT="${androidPkgs.sdk}"
|
|
|
|
export ANDROID_NDK_ROOT="${androidPkgs.ndk}"
|
2020-05-05 22:48:50 +00:00
|
|
|
|
2020-05-20 11:35:56 +00:00
|
|
|
export STATUS_NIX_MAVEN_REPO="${deps.gradle}"
|
2020-05-07 10:21:39 +00:00
|
|
|
|
2020-05-05 22:48:50 +00:00
|
|
|
# required by some makefile targets
|
2022-08-04 08:20:44 +00:00
|
|
|
export STATUS_GO_ANDROID_LIBDIR=${status-go}
|
2020-05-05 22:48:50 +00:00
|
|
|
|
2020-07-01 19:45:39 +00:00
|
|
|
# check if node modules changed and if so install them
|
2022-07-17 12:37:46 +00:00
|
|
|
$STATUS_MOBILE_HOME/nix/scripts/node_modules.sh ${deps.nodejs-patched}
|
2020-05-05 22:48:50 +00:00
|
|
|
'';
|
|
|
|
};
|
2019-06-04 16:50:29 +00:00
|
|
|
}
|