2018-06-26 06:19:44 +01:00
|
|
|
{ stdenv, fetchzip, ocaml, findlib, jbuilder, ocp-build, cmdliner }:
|
2014-10-28 17:09:42 +00:00
|
|
|
|
|
|
|
let inherit (stdenv.lib) getVersion versionAtLeast; in
|
|
|
|
|
|
|
|
assert versionAtLeast (getVersion ocaml) "3.12.1";
|
2017-05-28 21:39:21 +01:00
|
|
|
assert versionAtLeast (getVersion cmdliner) "1.0.0";
|
2018-06-26 06:19:44 +01:00
|
|
|
assert versionAtLeast (getVersion ocp-build) "1.99.6-beta";
|
2014-10-28 17:09:42 +00:00
|
|
|
|
2017-05-28 21:39:21 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-10-28 17:09:42 +00:00
|
|
|
|
2018-06-26 05:55:25 +01:00
|
|
|
name = "ocaml${ocaml.version}-ocp-indent-${version}";
|
2017-12-11 13:38:07 +00:00
|
|
|
version = "1.6.1";
|
2014-10-28 17:09:42 +00:00
|
|
|
|
2015-10-14 18:26:38 +01:00
|
|
|
src = fetchzip {
|
2017-05-28 21:39:21 +01:00
|
|
|
url = "https://github.com/OCamlPro/ocp-indent/archive/${version}.tar.gz";
|
2017-12-11 13:38:07 +00:00
|
|
|
sha256 = "0rcaa11mjqka032g94wgw9llqpflyk3ywr3lr6jyxbh1rjvnipnw";
|
2014-10-28 17:09:42 +00:00
|
|
|
};
|
|
|
|
|
2018-06-26 06:19:44 +01:00
|
|
|
nativeBuildInputs = [ ocp-build ];
|
2017-05-28 21:39:21 +01:00
|
|
|
buildInputs = [ ocaml findlib cmdliner ];
|
2014-10-28 17:09:42 +00:00
|
|
|
|
2018-06-26 05:55:25 +01:00
|
|
|
inherit (jbuilder) installPhase;
|
2014-10-28 17:09:42 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://typerex.ocamlpro.com/ocp-indent.html;
|
2014-10-28 17:09:42 +00:00
|
|
|
description = "A customizable tool to indent OCaml code";
|
|
|
|
license = licenses.gpl3;
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-10-28 17:09:42 +00:00
|
|
|
maintainers = [ maintainers.jirkamarsik ];
|
|
|
|
};
|
|
|
|
}
|