Merge pull request #159201 from vbgl/ocaml-piqi-fix

ocamlPackages.{piqi,piqi-ocaml,bap}: fix build
This commit is contained in:
Guillaume Girol 2022-02-11 20:40:01 +00:00 committed by GitHub
commit 0f661f812e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View file

@ -49,6 +49,7 @@ stdenv.mkDerivation rec {
piqi-ocaml uuidm frontc yojson ];
installPhase = ''
runHook preInstall
export OCAMLPATH=$OCAMLPATH:$OCAMLFIND_DESTDIR;
export PATH=$PATH:$out/bin
export CAML_LD_LIBRARY_PATH=''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}$OCAMLFIND_DESTDIR/bap-plugin-llvm/:$OCAMLFIND_DESTDIR/bap/
@ -58,6 +59,7 @@ stdenv.mkDerivation rec {
makeWrapper ${utop}/bin/utop $out/bin/baptop --prefix OCAMLPATH : $OCAMLPATH --prefix PATH : $PATH --add-flags "-ppx ppx-bap -short-paths -require \"bap.top\""
wrapProgram $out/bin/bapbuild --prefix OCAMLPATH : $OCAMLPATH --prefix PATH : $PATH
ln -s $sigs $out/share/bap/sigs.zip
runHook postInstall
'';
disableIda = "--disable-ida";

View file

@ -16,7 +16,11 @@ stdenv.mkDerivation rec {
createFindlibDestdir = true;
installPhase = "DESTDIR=$out make install";
installPhase = ''
runHook preInstall
DESTDIR=$out make install
runHook postInstall
'';
meta = with lib; {
homepage = "https://piqi.org";

View file

@ -19,15 +19,9 @@ stdenv.mkDerivation rec {
createFindlibDestdir = true;
buildPhase = ''
make
make -C piqilib piqilib.cma
'';
postBuild = "make -C piqilib piqilib.cma";
installPhase = ''
make install;
make ocaml-install;
'';
installTargets = [ "install" "ocaml-install" ];
meta = with lib; {
homepage = "https://piqi.org";