* Update camlp5

svn path=/nixpkgs/trunk/; revision=25206
This commit is contained in:
Marco Maggesi 2010-12-20 10:32:22 +00:00
parent d3f00b9cf5
commit e7accaf8d3
4 changed files with 127 additions and 19 deletions

View File

@ -1,7 +1,7 @@
# TODO:
# - coqide compilation should be optional or (better) separate;
{stdenv, fetchurl, ocaml, camlp5, lablgtk, ncurses}:
{stdenv, fetchurl, ocaml, findlib, camlp5, lablgtk, ncurses}:
let
version = "8.3";
@ -15,15 +15,17 @@ stdenv.mkDerivation {
sha256 = "02iy4rxz1n1kc85fb3vs4xpxqfxjw87y2gvmi39fxrj8742qx0dx";
};
buildInputs = [ ocaml camlp5 ncurses lablgtk ];
buildInputs = [ ocaml findlib camlp5 ncurses lablgtk ];
prefixKey = "-prefix ";
configureFlags =
"-camldir ${ocaml}/bin " +
"-camlp5dir ${camlp5}/lib/ocaml/camlp5 " +
"-lablgtkdir ${lablgtk}/lib/ocaml/lablgtk2 " +
"-opt -coqide opt";
preConfigure = ''
configureFlagsArray=(
-camldir ${ocaml}/bin
-camlp5dir $(ocamlfind query camlp5)
-lablgtkdir ${lablgtk}/lib/ocaml/lablgtk2 -opt -coqide opt
)
'';
buildFlags = "world"; # Debug with "world VERBOSE=1";

View File

@ -0,0 +1,94 @@
# Specifications for the "camlp5" preprocessor:
requires = ""
version = "[distributed with Ocaml]"
description = "Base for camlp5 syntax extensions"
# For the toploop:
archive(byte,toploop,camlp5o) = "camlp5o.cma"
archive(byte,toploop,camlp5r) = "camlp5r.cma"
# Scheme-like syntax:
# Do #predicates "syntax,camlp5scheme", followed by #require "camlp5"
archive(byte,toploop,camlp5scheme) = "camlp5sch.cma"
# Standard ML-like syntax:
# Do #predicates "syntax,camlp5sml", followed by #require "camlp5"
archive(byte,toploop,camlp5sml) = "gramlib.cma camlp5_top.cma pa_sml.cmo"
# Lisp-like syntax:
# Do #predicates "syntax,camlp5lisp", followed by #require "camlp5"
archive(byte,toploop,camlp5lisp) = "gramlib.cma camlp5_top.cma pa_lisp.cmo"
# For the preprocessor itself:
archive(syntax,preprocessor,camlp5o) = "pa_o.cmo pa_op.cmo pr_dump.cmo"
archive(syntax,preprocessor,camlp5r) = "pa_r.cmo pa_rp.cmo pr_dump.cmo"
archive(syntax,preprocessor,camlp5sml) = "pa_sml.cmo pr_dump.cmo"
archive(syntax,preprocessor,camlp5scheme) = "pa_scheme.cmo pr_dump.cmo"
archive(syntax,preprocessor,camlp5lisp) = "pa_lisp.cmo pr_dump.cmo"
preprocessor = "camlp5 -nolib"
package "gramlib" (
requires(toploop) = "camlp5"
version = "[distributed with Ocaml]"
description = "Grammar library to create syntax extensions"
archive(byte) = "gramlib.cma"
archive(byte,toploop) = "" # already contained in camlp5*.cma
archive(native) = "gramlib.cmxa"
)
package "quotations" (
requires = "camlp5"
version = "[distributed with Ocaml]"
description = "Syntax extension: Quotations to create AST nodes"
archive(syntax,preprocessor) = "q_MLast.cmo"
archive(syntax,toploop) = "q_MLast.cmo"
)
package "phony_quotations" (
requires = "camlp5"
version = "[distributed with Ocaml]"
description = "Syntax extension: Phony quotations"
archive(syntax,preprocessor) = "q_phony.cmo"
archive(syntax,toploop) = "q_phony.cmo"
)
package "extend" (
requires = "camlp5"
version = "[distributed with Ocaml]"
description = "Syntax extension: EXTEND the camlp5 grammar"
archive(syntax,preprocessor) = "pa_extend.cmo"
archive(syntax,toploop) = "pa_extend.cmo"
)
package "extfun" (
requires = "camlp5"
version = "[distributed with Ocaml]"
description = "Syntax extension: Extensible functions"
archive(syntax,preprocessor) = "pa_extfun.cmo"
archive(syntax,toploop) = "pa_extfun.cmo"
)
package "fstream" (
requires = "camlp5"
version = "[distributed with Ocaml]"
description = "Syntax extension: Functional stream parsers"
archive(syntax,preprocessor) = "pa_fstream.cmo"
archive(syntax,toploop) = "pa_fstream.cmo"
)
package "macro" (
requires = "camlp5"
version = "[distributed with Ocaml]"
description = "Syntax extension: Conditional compilation"
archive(syntax,preprocessor) = "pa_macro.cmo"
archive(syntax,toploop) = "pa_macro.cmo"
)
package "unit_constraints" (
requires = "camlp5"
version = "[distributed with Ocaml]"
description = "Syntax extension: Type constraints of type unit (revised syntax only)"
archive(syntax,preprocessor,camlp5r) = "pa_ru.cmo"
archive(syntax,toploop,camlp5r) = "pa_ru.cmo"
error(syntax,-camlp5r) = "Not available"
)

View File

@ -1,9 +1,11 @@
{stdenv, fetchurl, ocaml, transitional ? false}:
let
ocaml_version = (builtins.parseDrvName ocaml.name).version;
pname = "camlp5";
version = "5.12";
version = "5.15";
webpage = http://pauillac.inria.fr/~ddr/camlp5/;
metafile = ./META;
in
stdenv.mkDerivation {
@ -12,17 +14,20 @@ stdenv.mkDerivation {
src = fetchurl {
url = "${webpage}/distrib/src/${pname}-${version}.tgz";
sha256 = "985a5e373ea75f89667e71bc857c868c395769fce664cba88aa76f93b0ad8461";
sha256 = "1sx5wlfpydqskm97gp7887p3avbl3vanlmrwj35wx5mbzj6kn9nq";
};
buildInputs = [ ocaml ];
prefixKey = "-prefix ";
configureFlags = if transitional then "--transitional" else "--strict";
preConfigure = "configureFlagsArray=(" + (if transitional then "--transitional" else "--strict") +
" --libdir $out/lib/ocaml/${ocaml_version}/site-lib)";
buildFlags = "world.opt";
postInstall = "cp ${metafile} $out/lib/ocaml/${ocaml_version}/site-lib/camlp5/META";
meta = {
description = "Preprocessor-pretty-printer for OCaml";
longDescription = ''
@ -31,5 +36,9 @@ stdenv.mkDerivation {
'';
homepage = "${webpage}";
license = "BSD";
platforms = ocaml.meta.platforms;
maintainers = [
stdenv.lib.maintainers.z77z
];
};
}

View File

@ -1985,6 +1985,12 @@ let
mkOcamlPackages = ocaml: self: let callPackage = newScope self; in rec {
inherit ocaml;
camlp5_strict = callPackage ../development/tools/ocaml/camlp5 { };
camlp5_transitional = callPackage ../development/tools/ocaml/camlp5 {
transitional = true;
};
camlzip = callPackage ../development/ocaml-modules/camlzip { };
camomile = camomile_0_7_3;
@ -2404,12 +2410,6 @@ let
byacc = callPackage ../development/tools/parsing/byacc { };
camlp5_strict = callPackage ../development/tools/ocaml/camlp5 { };
camlp5_transitional = callPackage ../development/tools/ocaml/camlp5 {
transitional = true;
};
ccache = callPackage ../development/tools/misc/ccache { };
ctags = callPackage ../development/tools/misc/ctags { };
@ -7012,7 +7012,8 @@ let
### SCIENCE/LOGIC
coq = callPackage ../applications/science/logic/coq {
camlp5 = camlp5_transitional;
inherit (ocamlPackages) findlib;
camlp5 = ocamlPackages.camlp5_transitional;
};
cvc3 = callPackage ../applications/science/logic/cvc3 {};
@ -7027,7 +7028,9 @@ let
hol = callPackage ../applications/science/logic/hol { };
hol_light = callPackage ../applications/science/logic/hol_light { };
hol_light = callPackage ../applications/science/logic/hol_light {
inherit (ocamlPackages) camlp5_transitional;
};
hol_light_sources = callPackage ../applications/science/logic/hol_light/sources.nix { };
@ -7056,7 +7059,7 @@ let
spass = callPackage ../applications/science/logic/spass {};
ssreflect = callPackage ../applications/science/logic/ssreflect {
camlp5 = camlp5_transitional;
camlp5 = ocamlPackages.camlp5_transitional;
};
### SCIENCE / ELECTRONICS