ocamlPackages.findlib: create destdir even when there are no buildInputs

This commit is contained in:
Guillaume Girol 2021-08-14 12:00:00 +00:00
parent e98be5d5e0
commit a3ab43d3a4

View file

@ -33,6 +33,8 @@ stdenv.mkDerivation rec {
if test -d "''$1/lib/ocaml/${ocaml.version}/site-lib/stublibs"; then
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/stublibs"
fi
}
createOcamlDestDir () {
export OCAMLFIND_DESTDIR="''$out/lib/ocaml/${ocaml.version}/site-lib/"
if test -n "''${createFindlibDestdir-}"; then
mkdir -p $OCAMLFIND_DESTDIR
@ -40,6 +42,7 @@ stdenv.mkDerivation rec {
}
addEnvHooks "$targetOffset" addOCamlPath
preConfigureHooks+=(createOcamlDestDir)
'';
meta = {