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