New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BAP to nixpkgs #24586
Add BAP to nixpkgs #24586
Conversation
@maurer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @aske, @vbgl, @sternenseemann and @FRidh to be potential reviewers. |
EOF | ||
mkdir -p $out/lib/bap | ||
make install | ||
wrapProgram $out/bin/bapbuild --set OCAMLPATH `echo $OCAMLPATH` --set PATH `echo $PATH` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excluding external OCAMLPATH and PATH is intended here? (--set
instead of --prefix
).
export PATH=\$PATH:`echo $PATH` | ||
export CAML_LD_LIBRARY_PATH=\$CAML_LD_LIBRARY_PATH:`echo $CAML_LD_LIBRARY_PATH` | ||
exec ${utop}/bin/utop -ppx ppx-bap -short-paths -require "bap.top" "\$@" | ||
EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makeWrapper
would be a little more readable. There is also a --add-flags
option. Also
`echo $PATH`
is unnecessary: just $PATH
should be enough
meta = with stdenv.lib; { | ||
description = "Platform for binary analysis. It is written in OCaml, but can be used from other languages."; | ||
homepage = https://github.com/BinaryAnalysisPlatform/bap/; | ||
license = licenses.mit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to maintain this package?
repo = "bap-python"; | ||
rev = "v${version}"; | ||
sha256 = "0wd46ksxscgb2dci69sbndzxs6drq5cahraqq42cdk114hkrsxs3"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a doCheck = False; # no tests
since we explicitly disable tests for python
|
||
preConfigure = "autoconf"; | ||
|
||
buildInputs = [ autoconf which ocaml bap findlib ctypes ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autoconf
and which
belong to nativeBuildInputs
64abf29
to
53f77ab
Compare
@Mic92 I believe I've addressed your concerns. |
I added some minor changes. |
@Mic92 Your changes to bap break its correctness |
I reincorporated your changes (other than the |
Thanks! |
This does not build on darwin:
This does not build with OCaml 4.03 nor 4.04: |
@vgbl Those are bugs, but those aren't bugs in bap. The missing tl;dr
If I find some time I can try to fix this, but it seems to make more sense to do the |
Do you have a hint about what the If you just add |
@vgbl You're correct that
I've tried adding it to propagated build inputs locally, and it builds+passes tests on 4.02 on my hydra, but 4.03 still fails to build, complaining about
Checking this package vs the 4.02 one,
which makes it look like the version of |
@vbgl See above, evidently I typo'd your handle when posting the first time. |
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)Finally getting BAP into nixpkgs.
As supplementary info, see my hydra running the more extensive testsuite on it.