Skip to content

Commit 555cb32

Browse files
committed
nix: Add a shell.nix file
This works for me on NixOS 22.05.
1 parent cca9b13 commit 555cb32

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

shell.nix

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# All our non-NPM dependencies and dev-dependencies, expressed with Nix.
2+
#
3+
# TODO: Expand this to cover the full Android dev environment,
4+
# and everything in tools/.
5+
#
6+
# If you're using NixOS, this file may be helpful:
7+
# * Type `nix-shell` in this directory.
8+
# * You'll get a shell with the environment all set up
9+
# so that `yarn install` and `tools/test --all` work.
10+
# * Also `android-studio`, and from there you can run the
11+
# Android emulator and build and run the app:
12+
# * Start emulator from Android Studio.
13+
# * Run `adb reverse tcp:8081 tcp:8081` in the shell.
14+
# * Run `node_modules/.bin/react-native start` in the shell.
15+
# * Run the app from Android Studio.
16+
#
17+
# If you're using any other Linux distro, or macOS, or Windows, see
18+
# our setup instructions at `docs/howto/build-run.md`. But possibly
19+
# this is a useful reference for some of our dependencies. (Note
20+
# that you almost certainly already have the more obscure of these
21+
# dependencies already, namely ncurses and the C++ standard library.)
22+
23+
# For developing changes to this file, use `nix-shell --pure --run`
24+
# to check that the dependencies here are complete, without relying
25+
# on things that happen to be in your local environment. E.g.:
26+
#
27+
# $ nix-shell --pure --run 'yarn && tools/test --all'
28+
29+
{ pkgs ? import <nixpkgs> {} }:
30+
with pkgs;
31+
mkShell {
32+
33+
nativeBuildInputs = [
34+
nodejs-16_x
35+
yarn
36+
37+
jdk11
38+
android-studio
39+
40+
# Used by various `tools/` scripts:
41+
git
42+
jq
43+
perl
44+
rsync
45+
46+
ncurses # Used by Flow (via the `tset` binary)
47+
48+
vscode
49+
];
50+
51+
LD_LIBRARY_PATH = lib.makeLibraryPath [
52+
gcc11.cc # Needed by Flow (the one from NPM.)
53+
];
54+
}

0 commit comments

Comments
 (0)