forked from MinaProtocol/mina
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimpure-shell.nix
More file actions
50 lines (50 loc) · 1.18 KB
/
Copy pathimpure-shell.nix
File metadata and controls
50 lines (50 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
pkgs:
pkgs.mkShell {
name = "mina-impure-shell";
buildInputs = with pkgs; [
opam
pkg-config
gnum4
jemalloc
gmp
libffi
openssl.dev
postgresql.out
sodium-static.out
sodium-static.dev
go_1_18
capnproto
zlib.dev
bzip2.dev
ncurses
rustup
wasm-pack
lmdb
rosetta-cli
];
OPAMSWITCH = "mina";
shellHook = ''
eval $(opam env)
if ! opam switch list --short 2>&1 | grep -w mina 2>&1 > /dev/null; then
printf "=== Welcome to Mina! ===\n"
printf "You are currently in a shell with all native libraries present.\n"
printf "To get all OCaml dependencies, run:\n"
echo
tput bold
printf 'opam init --bare # Only if you are running opam for the first time\n'
printf 'opam update\n'
printf 'opam switch import opam.export --strict\n'
printf 'eval $(opam env)\n'
printf './scripts/pin-external-packages.sh\n'
tput sgr0
echo
printf "After that, you can build Mina using:\n"
echo
tput bold
printf "make build\n"
tput sgr0
echo
printf "This message will go away once you set up your OCaml dependencies.\n"
fi
'';
}