-
Notifications
You must be signed in to change notification settings - Fork 6
/
shell.nix
56 lines (48 loc) · 1.17 KB
/
shell.nix
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
51
52
53
54
55
56
with import <nixpkgs> { };
let python38WithCoolPackages =
# Use CPython, as:
# * PyPy does not seem to support >3.6;
# * `pythonPackages` in nixpkgs might not all target PyPy.
python38.withPackages(ps: with ps; [
pygraphviz
z3
]);
in
stdenv.mkDerivation rec {
name = "operation-mango";
buildInputs = [
python38Packages.virtualenvwrapper
python38WithCoolPackages
nasm
nmap
libxml2
libxslt
libffi
readline
libtool
glib
gcc
graphviz
debootstrap
pixman
openssl
jdk8
];
shellHook = ''
source $(command -v virtualenvwrapper.sh)
if [ -d "$HOME/.virtualenvs/venv3.8" ]; then
workon venv3.8
else
mkvirtualenv venv3.8 -p $(which python3.8)
fi
SOURCE_DATE_EPOCH=$(date +%s)
#
# Insure that some dependencies are installed
#
pip list > pip_list.out
grep unicorn pip_list.out 2>&1 >/dev/null || UNICORN_QEMU_FLAGS="--python=$(which python2)" pip install unicorn
for local_dependency in "ailment" "archinfo" "claripy" "cle" "pyelftools" "pyvex" "angr"; do
grep $local_dependency pip_list.out || pip install -e "../$local_dependency"
done
'';
}