ocamlPackages.camlp5: 7.06 -> 7.07

Keeping the legacy (7.06) version around, needed by hol_light
This commit is contained in:
Vincent Laporte 2018-11-14 07:25:54 +00:00 committed by Vincent Laporte
parent 4a38cfbeb6
commit e481df83b1
2 changed files with 19 additions and 9 deletions

View File

@ -1,21 +1,29 @@
{ stdenv, fetchzip, ocaml, transitional ? false }:
{ stdenv, fetchzip, ocaml, legacy ? false }:
let
let params =
if legacy then {
minor-version = "06";
sha256 = "02zg6qjkzx58zmp79364s5jyqhh56nclcz1jzhh53hk37g9f96qf";
} else {
minor-version = "07";
sha256 = "1c8v45553ccbqha2ypfranqlgw06rr5wjr2hlnrx5bf9jfq0h0dn";
};
metafile = ./META;
opt = stdenv.lib.optionalString legacy;
in
stdenv.mkDerivation {
name = "camlp5${if transitional then "_transitional" else ""}-7.06";
name = "camlp5-7.${params.minor-version}";
src = fetchzip {
url = https://github.com/camlp5/camlp5/archive/rel706.tar.gz;
sha256 = "02zg6qjkzx58zmp79364s5jyqhh56nclcz1jzhh53hk37g9f96qf";
url = "https://github.com/camlp5/camlp5/archive/rel7${params.minor-version}.tar.gz";
inherit (params) sha256;
};
buildInputs = [ ocaml ];
postPatch = ''
postPatch = opt ''
for p in compile/compile.sh config/Makefile.tpl test/Makefile test/check_ocaml_versions.sh
do
substituteInPlace $p --replace '/bin/rm' rm
@ -24,12 +32,12 @@ stdenv.mkDerivation {
prefixKey = "-prefix ";
preConfigure = "configureFlagsArray=(" + (if transitional then "--transitional" else "--strict") +
preConfigure = "configureFlagsArray=(--strict" +
" --libdir $out/lib/ocaml/${ocaml.version}/site-lib)";
buildFlags = "world.opt";
postInstall = "cp ${metafile} $out/lib/ocaml/${ocaml.version}/site-lib/camlp5/META";
postInstall = opt "cp ${metafile} $out/lib/ocaml/${ocaml.version}/site-lib/camlp5/META";
dontStrip = true;

View File

@ -1039,7 +1039,9 @@ let
enableX11 = config.unison.enableX11 or true;
};
hol_light = callPackage ../applications/science/logic/hol_light { };
hol_light = callPackage ../applications/science/logic/hol_light {
camlp5 = callPackage ../development/tools/ocaml/camlp5 { legacy = true; };
};
};
in (ocamlPackages.janeStreet // ocamlPackages);