2009-11-02 11:47:24 +01:00
|
|
|
{stdenv, fetchurl, ocaml, transitional ? false}:
|
|
|
|
|
|
|
|
let
|
2010-12-20 11:32:22 +01:00
|
|
|
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
2009-11-02 11:47:24 +01:00
|
|
|
pname = "camlp5";
|
2010-12-20 11:32:22 +01:00
|
|
|
version = "5.15";
|
2009-11-02 11:47:24 +01:00
|
|
|
webpage = http://pauillac.inria.fr/~ddr/camlp5/;
|
2010-12-20 11:32:22 +01:00
|
|
|
metafile = ./META;
|
2009-11-02 11:47:24 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
|
|
|
name = "${pname}${if transitional then "_transitional" else ""}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${webpage}/distrib/src/${pname}-${version}.tgz";
|
2010-12-20 11:32:22 +01:00
|
|
|
sha256 = "1sx5wlfpydqskm97gp7887p3avbl3vanlmrwj35wx5mbzj6kn9nq";
|
2009-11-02 11:47:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml ];
|
|
|
|
|
|
|
|
prefixKey = "-prefix ";
|
|
|
|
|
2010-12-20 11:32:22 +01:00
|
|
|
preConfigure = "configureFlagsArray=(" + (if transitional then "--transitional" else "--strict") +
|
|
|
|
" --libdir $out/lib/ocaml/${ocaml_version}/site-lib)";
|
2009-11-02 11:47:24 +01:00
|
|
|
|
|
|
|
buildFlags = "world.opt";
|
|
|
|
|
2010-12-20 11:32:22 +01:00
|
|
|
postInstall = "cp ${metafile} $out/lib/ocaml/${ocaml_version}/site-lib/camlp5/META";
|
|
|
|
|
2009-11-02 11:47:24 +01:00
|
|
|
meta = {
|
2009-11-02 12:44:27 +01:00
|
|
|
description = "Preprocessor-pretty-printer for OCaml";
|
2009-11-02 11:47:24 +01:00
|
|
|
longDescription = ''
|
|
|
|
Camlp5 is a preprocessor and pretty-printer for OCaml programs.
|
|
|
|
It also provides parsing and printing tools.
|
|
|
|
'';
|
|
|
|
homepage = "${webpage}";
|
|
|
|
license = "BSD";
|
2010-12-20 11:32:22 +01:00
|
|
|
platforms = ocaml.meta.platforms;
|
|
|
|
maintainers = [
|
|
|
|
stdenv.lib.maintainers.z77z
|
|
|
|
];
|
2009-11-02 11:47:24 +01:00
|
|
|
};
|
|
|
|
}
|