mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 03:12:51 +00:00
ocamlPackages.findlib: don't wait configurePhase to set OCAMLFIND_DESTDIR
this fixes ocamlfind printconf destdir inside nix-shell
fixes #152028
the regression was introduced by
a3ab43d3a4
which was meant to fix building
ocamlPackages.ocamlbuild with strictDeps. This commit keeps ocamlbuild
building.
This commit is contained in:
parent
cb372c3b88
commit
79fb9f824e
@ -36,15 +36,21 @@ stdenv.mkDerivation rec {
|
||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/stublibs"
|
||||
fi
|
||||
}
|
||||
createOcamlDestDir () {
|
||||
exportOcamlDestDir () {
|
||||
export OCAMLFIND_DESTDIR="''$out/lib/ocaml/${ocaml.version}/site-lib/"
|
||||
}
|
||||
createOcamlDestDir () {
|
||||
if test -n "''${createFindlibDestdir-}"; then
|
||||
mkdir -p $OCAMLFIND_DESTDIR
|
||||
fi
|
||||
}
|
||||
|
||||
# run for every buildInput
|
||||
addEnvHooks "$targetOffset" addOCamlPath
|
||||
# run before configurePhase, even without buildInputs, and not in nix-shell
|
||||
preConfigureHooks+=(createOcamlDestDir)
|
||||
# run even in nix-shell, and even without buildInputs
|
||||
addEnvHooks "$hostOffset" exportOcamlDestDir
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
Loading…
Reference in New Issue
Block a user