diff --git a/pkgs/development/ocaml-modules/bap/default.nix b/pkgs/development/ocaml-modules/bap/default.nix index 6723ad0c1c81..f8e07fd1265c 100644 --- a/pkgs/development/ocaml-modules/bap/default.nix +++ b/pkgs/development/ocaml-modules/bap/default.nix @@ -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"; diff --git a/pkgs/development/ocaml-modules/piqi-ocaml/default.nix b/pkgs/development/ocaml-modules/piqi-ocaml/default.nix index 9899bfc4bdf9..590c001c4195 100644 --- a/pkgs/development/ocaml-modules/piqi-ocaml/default.nix +++ b/pkgs/development/ocaml-modules/piqi-ocaml/default.nix @@ -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"; diff --git a/pkgs/development/ocaml-modules/piqi/default.nix b/pkgs/development/ocaml-modules/piqi/default.nix index 84ccc469f6e5..faeb804d8aa8 100644 --- a/pkgs/development/ocaml-modules/piqi/default.nix +++ b/pkgs/development/ocaml-modules/piqi/default.nix @@ -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";