From a3ab43d3a45338f845a0f8a12ed34e84c8b79dae Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sat, 14 Aug 2021 12:00:00 +0000 Subject: [PATCH] ocamlPackages.findlib: create destdir even when there are no buildInputs --- pkgs/development/tools/ocaml/findlib/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/tools/ocaml/findlib/default.nix b/pkgs/development/tools/ocaml/findlib/default.nix index 3d4c919bd835..4b02231b471f 100644 --- a/pkgs/development/tools/ocaml/findlib/default.nix +++ b/pkgs/development/tools/ocaml/findlib/default.nix @@ -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 = {