mirror of
https://github.com/status-im/status-react.git
synced 2025-01-10 02:56:07 +00:00
Jakub Sokołowski
4fe8b81bf6
As discovered in: https://github.com/status-im/status-mobile/pull/15225 The attempt to fix this in: https://github.com/status-im/status-mobile/pull/15180 But it doesn't appear to work, so instead I'm allowing an override of `NODE_BINARY` variable and spetting it when defining the Nix shell. The key things here are: * Xcode injects its own paths into `PATH` which breaks Nix env. * Combining Nix shells with `inputsFrom` does not inherit all vars. It's important to set these variables in `shellHook` and not elsewhere. Signed-off-by: Jakub Sokołowski <jakub@status.im>
33 lines
878 B
Nix
33 lines
878 B
Nix
{ callPackage, lib, mkShell, pkgs
|
|
, status-go, fastlane }:
|
|
|
|
let
|
|
inherit (lib) catAttrs unique;
|
|
|
|
# Sub-shells preparing various dependencies.
|
|
nodejs-sh = callPackage ./shells/nodejs.nix { };
|
|
bundler-sh = callPackage ./shells/bundler.nix { };
|
|
cocoapods-sh = callPackage ./shells/cocoapods.nix { };
|
|
status-go-sh = callPackage ./shells/status-go.nix { inherit status-go; };
|
|
|
|
in {
|
|
inherit nodejs-sh cocoapods-sh status-go-sh;
|
|
|
|
shell = mkShell {
|
|
buildInputs = with pkgs; [
|
|
xcodeWrapper watchman procps
|
|
flock # used in nix/scripts/node_modules.sh
|
|
];
|
|
|
|
# WARNING: Executes shellHook in reverse order.
|
|
# WARNING: Only some variables are merged.
|
|
inputsFrom = [
|
|
fastlane.shell
|
|
cocoapods-sh
|
|
nodejs-sh # before 'pod install'
|
|
bundler-sh # before 'pod install'
|
|
status-go-sh # before 'pod install'
|
|
];
|
|
};
|
|
}
|