nixpkgs/pkgs/development/tools/ocaml/camlp5/5.15.nix

47 lines
1.2 KiB
Nix
Raw Normal View History

{stdenv, fetchurl, ocaml, transitional ? false}:
let
pname = "camlp5";
webpage = http://pauillac.inria.fr/~ddr/camlp5/;
metafile = ./META;
in
2016-10-05 08:32:30 +01:00
assert !stdenv.lib.versionOlder "4.00" ocaml.version;
2016-10-05 08:32:30 +01:00
stdenv.mkDerivation rec {
name = "${pname}${if transitional then "_transitional" else ""}-${version}";
2016-10-05 08:32:30 +01:00
version = "5.15";
src = fetchurl {
url = "${webpage}/distrib/src/${pname}-${version}.tgz";
sha256 = "1sx5wlfpydqskm97gp7887p3avbl3vanlmrwj35wx5mbzj6kn9nq";
};
buildInputs = [ ocaml ];
prefixKey = "-prefix ";
preConfigure = "configureFlagsArray=(" + (if transitional then "--transitional" else "--strict") +
2016-10-05 08:32:30 +01:00
" --libdir $out/lib/ocaml/${ocaml.version}/site-lib)";
buildFlags = "world.opt";
2016-10-05 08:32:30 +01:00
postInstall = "cp ${metafile} $out/lib/ocaml/${ocaml.version}/site-lib/camlp5/META";
meta = {
description = "Preprocessor-pretty-printer for OCaml";
longDescription = ''
Camlp5 is a preprocessor and pretty-printer for OCaml programs.
It also provides parsing and printing tools.
'';
homepage = "${webpage}";
2014-11-06 19:40:20 +00:00
license = stdenv.lib.licenses.bsd3;
branch = "5";
platforms = ocaml.meta.platforms or [];
maintainers = [
stdenv.lib.maintainers.z77z
];
};
}