2019-02-01 10:44:51 +00:00
|
|
|
let
|
|
|
|
pkgs = import ((import <nixpkgs> { }).fetchFromGitHub {
|
2019-02-15 08:04:03 +00:00
|
|
|
owner = "status-im";
|
2019-02-01 10:44:51 +00:00
|
|
|
repo = "nixpkgs";
|
2019-02-15 08:04:03 +00:00
|
|
|
rev = "15623aac6e8cbfa24d4268195bc8eda7303ea2ff";
|
|
|
|
sha256 = "0crjmspk65rbpkl3kqcj7433355i9fy530lhc48g2cz75xjk4sxh";
|
2019-02-01 10:44:51 +00:00
|
|
|
}) { config = { }; };
|
|
|
|
|
2019-02-15 08:04:03 +00:00
|
|
|
in with pkgs;
|
|
|
|
let
|
|
|
|
_stdenv = stdenvNoCC; # TODO: Try to use stdenv for Darwin
|
|
|
|
statusDesktop = callPackage ./scripts/lib/setup/nix/desktop { stdenv = _stdenv; };
|
2019-03-03 00:34:06 +00:00
|
|
|
statusMobile = callPackage ./scripts/lib/setup/nix/mobile { stdenv = _stdenv; };
|
2019-02-15 08:04:03 +00:00
|
|
|
nodeInputs = import ./scripts/lib/setup/nix/global-node-packages/output {
|
|
|
|
# The remaining dependencies come from Nixpkgs
|
|
|
|
inherit pkgs;
|
|
|
|
inherit nodejs;
|
|
|
|
};
|
|
|
|
nodePkgs = [
|
|
|
|
nodejs
|
|
|
|
python27 # for e.g. gyp
|
|
|
|
yarn
|
|
|
|
] ++ (map (x: nodeInputs."${x}") (builtins.attrNames nodeInputs));
|
2019-02-01 10:44:51 +00:00
|
|
|
|
2019-02-15 08:04:03 +00:00
|
|
|
in _stdenv.mkDerivation rec {
|
|
|
|
name = "env";
|
|
|
|
env = buildEnv { name = name; paths = buildInputs; };
|
|
|
|
buildInputs = with _stdenv; [
|
|
|
|
clojure
|
|
|
|
curl
|
|
|
|
jq
|
|
|
|
leiningen
|
|
|
|
lsof # used in scripts/start-react-native.sh
|
|
|
|
maven
|
|
|
|
ncurses
|
|
|
|
ps # used in scripts/start-react-native.sh
|
|
|
|
statusDesktop.buildInputs
|
2019-03-03 00:34:06 +00:00
|
|
|
statusMobile.buildInputs
|
2019-02-15 08:04:03 +00:00
|
|
|
watchman
|
|
|
|
unzip
|
|
|
|
wget
|
|
|
|
] ++ nodePkgs
|
|
|
|
++ lib.optional isDarwin cocoapods
|
|
|
|
++ lib.optional isLinux gcc7;
|
|
|
|
shellHook = ''
|
|
|
|
${statusDesktop.shellHook}
|
2019-03-03 00:34:06 +00:00
|
|
|
${statusMobile.shellHook}
|
2019-02-15 08:04:03 +00:00
|
|
|
|
2019-03-03 00:34:06 +00:00
|
|
|
[ -d "$ANDROID_SDK_ROOT" ] || ./scripts/setup # we assume that if the Android SDK dir does not exist, make setup needs to be run
|
2019-02-15 08:04:03 +00:00
|
|
|
'';
|
2019-03-03 00:34:06 +00:00
|
|
|
}
|