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