diff --git a/pkgs/applications/science/logic/hol_light/default.nix b/pkgs/applications/science/logic/hol_light/default.nix index 932412daf75c..f923095f857e 100644 --- a/pkgs/applications/science/logic/hol_light/default.nix +++ b/pkgs/applications/science/logic/hol_light/default.nix @@ -1,4 +1,4 @@ -{stdenv, writeText, writeTextFile, ocaml, camlp5_transitional, hol_light_sources}: +{stdenv, writeText, writeTextFile, ocaml, findlib, camlp5_transitional, hol_light_sources}: let version = hol_light_sources.version; @@ -10,11 +10,11 @@ let pa_j_cmo = stdenv.mkDerivation { name = "pa_j.cmo"; inherit ocaml camlp5; - buildInputs = [ ocaml camlp5 ]; + buildInputs = [ ocaml camlp5 findlib ]; buildCommand = '' ocamlc -c \ -pp "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo" \ - -I "${camlp5}/lib/ocaml/camlp5" \ + -I "$(ocamlfind query camlp5)" \ -o $out \ "${hol_light_src_dir}/pa_j_`ocamlc -version | cut -c1-4`.ml" ''; @@ -22,7 +22,7 @@ let start_ml = writeText "start.ml" '' Topdirs.dir_directory "${hol_light_src_dir}";; - Topdirs.dir_directory "${camlp5}/lib/ocaml/camlp5";; + Topdirs.dir_directory ("${camlp5}/lib/ocaml/"^Sys.ocaml_version^"/site-lib/camlp5");; Topdirs.dir_load Format.std_formatter "camlp5o.cma";; Topdirs.dir_load Format.std_formatter "${pa_j_cmo}";; #use "${hol_light_src_dir}/make.ml";; diff --git a/pkgs/development/tools/ocaml/findlib/default.nix b/pkgs/development/tools/ocaml/findlib/default.nix index 9a5b9acbef9c..a8000d2cf0e1 100644 --- a/pkgs/development/tools/ocaml/findlib/default.nix +++ b/pkgs/development/tools/ocaml/findlib/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation { export OCAMLPATH="''${OCAMLPATH}''${OCAMLPATH:+:}''$1/lib/ocaml/${ocaml_version}/site-lib/" fi export OCAMLFIND_DESTDIR="''$out/lib/ocaml/${ocaml_version}/site-lib/" - if test -n $createFindlibDestdir; then + if test -n "$createFindlibDestdir"; then ensureDir $OCAMLFIND_DESTDIR fi } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2eda702e5c79..d4632cdfec8b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7035,7 +7035,7 @@ let hol = callPackage ../applications/science/logic/hol { }; hol_light = callPackage ../applications/science/logic/hol_light { - inherit (ocamlPackages) camlp5_transitional; + inherit (ocamlPackages) findlib camlp5_transitional; }; hol_light_sources = callPackage ../applications/science/logic/hol_light/sources.nix { };