Created
December 21, 2020 22:58
-
-
Save Pamplemousse/c634f2948cc10db8893e18ab337d8e48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Using this `shell.nix`, here is how to install BAP using `opam`: | |
``` | |
opam init --comp=4.09.0 | |
eval $(opam env) | |
opam install bap | |
``` | |
*/ | |
with import <nixpkgs> { }; | |
mkShell rec { | |
buildInputs = [ | |
ocaml | |
opam | |
gmp | |
gnum4 | |
libxml2 | |
llvm | |
llvmPackages.clang | |
pkg-config | |
python27 | |
]; | |
shellHook = '' | |
# `opam install bap` requires `-lcurses`, and NixOS only has `ncurses`; | |
# See: https://github.com/BinaryAnalysisPlatform/bap/issues/1261. | |
# The following allows the installation process to find the libraries it requires: | |
mkdir lib/ 2>/dev/null | |
cp ${ncurses}/lib/libncurses.so lib/libcurses.so | |
export LIBRARY_PATH="$(pwd)/lib" | |
eval $(opam env) | |
''; | |
exitHook = '' | |
rm -Rf lib/ | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment