2020-05-07 10:21:39 +00:00
|
|
|
{ lib, 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
|
2020-06-03 19:47:01 +00:00
|
|
|
# For generating a temporary keystore for local development
|
|
|
|
keystore = callPackage ./keystore.nix { };
|
|
|
|
|
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 {
|
2020-06-03 19:47:01 +00:00
|
|
|
inherit keystore 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
|
2020-06-03 19:47:01 +00:00
|
|
|
inherit keystore 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
|
|
|
|
export STATUS_GO_ANDROID_LIBDIR=${status-go}
|
|
|
|
|
2020-07-01 19:45:39 +00:00
|
|
|
# check if node modules changed and if so install them
|
|
|
|
$STATUS_REACT_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
|
|
|
}
|