2016-10-08 08:44:25 +02:00
|
|
|
|
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
|
2014-09-12 09:45:38 +02:00
|
|
|
|
|
2014-09-21 12:02:55 +02:00
|
|
|
|
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12";
|
|
|
|
|
|
2017-10-05 23:32:47 +02:00
|
|
|
|
let param =
|
|
|
|
|
if stdenv.lib.versionAtLeast ocaml.version "4.02"
|
|
|
|
|
then {
|
|
|
|
|
version = "20171003";
|
|
|
|
|
sha256 = "06zwsskri8kaqjdszj9360nf36zvwh886xwf033aija8c9k4w6cx";
|
|
|
|
|
} else {
|
|
|
|
|
version = "20140424";
|
|
|
|
|
sha256 = "0sc9q89dnyarcg24czyhr6ams0ylqvia3745s6rfwd2nldpygsdk";
|
|
|
|
|
}; in
|
|
|
|
|
|
2014-09-12 09:45:38 +02:00
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
|
2017-10-05 23:32:47 +02:00
|
|
|
|
name = "ocaml${ocaml.version}-pprint-${param.version}";
|
2014-09-12 09:45:38 +02:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2017-10-05 23:32:47 +02:00
|
|
|
|
url = "http://gallium.inria.fr/~fpottier/pprint/pprint-${param.version}.tar.gz";
|
|
|
|
|
inherit (param) sha256;
|
2014-09-12 09:45:38 +02:00
|
|
|
|
};
|
|
|
|
|
|
2016-10-08 08:44:25 +02:00
|
|
|
|
buildInputs = [ ocaml findlib ocamlbuild ];
|
2014-09-12 09:45:38 +02:00
|
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
installFlags = "-C src";
|
|
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
|
homepage = http://gallium.inria.fr/~fpottier/pprint/;
|
|
|
|
|
description = "An OCaml adaptation of Wadler’s and Leijen’s prettier printer";
|
|
|
|
|
license = licenses.cecill-c;
|
2014-09-21 12:02:55 +02:00
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2015-12-24 18:49:07 +01:00
|
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-09-12 09:45:38 +02:00
|
|
|
|
};
|
|
|
|
|
}
|