diff --git a/pkgs/applications/science/logic/hol_light/default.nix b/pkgs/applications/science/logic/hol_light/default.nix index a1779baf5f82..91be7dca1173 100644 --- a/pkgs/applications/science/logic/hol_light/default.nix +++ b/pkgs/applications/science/logic/hol_light/default.nix @@ -1,32 +1,37 @@ -{ stdenv, fetchFromGitHub, fetchpatch, ocaml, camlp5 }: +{ stdenv, fetchFromGitHub, ocaml, num, camlp5 }: let - start_script = '' - #!/bin/sh - cd "$out/lib/hol_light" - exec ${ocaml}/bin/ocaml -I \`${camlp5}/bin/camlp5 -where\` -init make.ml - ''; + load_num = + if num == null then "" else + '' + -I ${num}/lib/ocaml/${ocaml.version}/site-lib/num \ + -I ${num}/lib/ocaml/${ocaml.version}/site-lib/top-num \ + -I ${num}/lib/ocaml/${ocaml.version}/site-lib/stublibs \ + ''; + + start_script = + '' + #!/bin/sh + cd $out/lib/hol_light + exec ${ocaml}/bin/ocaml \ + -I \`${camlp5}/bin/camlp5 -where\` \ + ${load_num} \ + -init make.ml + ''; in stdenv.mkDerivation { - name = "hol_light-2017-07-06"; + name = "hol_light-2018-09-30"; src = fetchFromGitHub { owner = "jrh13"; repo = "hol-light"; - rev = "0ad8cbdb4de08a38dac600f352555e8454499faa"; - sha256 = "0px9hl1b0mkyqv84j0si1zdq4066ffdrhzp27p2iah9l8ynbvpaq"; + rev = "27e09dd27834de46e917057710e9d8ded51a4c9f"; + sha256 = "1p0rm08wnc2lsrh3xzhlq3zdhzqcv1lbqnkwx3aybrqhbg1ixc1d"; }; buildInputs = [ ocaml camlp5 ]; - - patches = [ (fetchpatch { - url = https://github.com/girving/hol-light/commit/f80524bad61fd6f6facaa42153b2e29d1eab4658.patch; - sha256 = "1563wp597vakhmsgg8940dpirzzfvvxqp75x3dnx20rvmi2n2xw0"; - }) - ]; - - postPatch = "cp pa_j_3.1x_{6,7}.xx.ml"; + propagatedBuildInputs = [ num ]; installPhase = '' mkdir -p "$out/lib/hol_light" "$out/bin" diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index fab79bd7b729..a6214abbc367 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1043,6 +1043,7 @@ let }; hol_light = callPackage ../applications/science/logic/hol_light { + inherit num; camlp5 = camlp5_strict; };