nixpkgs/pkgs/development/tools/ocaml/ocp-indent/default.nix

32 lines
963 B
Nix
Raw Normal View History

{ 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";
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
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
};
nativeBuildInputs = [ ocp-build ];
2017-05-28 21:39:21 +01:00
buildInputs = [ ocaml findlib cmdliner ];
2014-10-28 17:09:42 +00:00
inherit (jbuilder) installPhase;
2014-10-28 17:09:42 +00:00
meta = with stdenv.lib; {
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;
platforms = ocaml.meta.platforms or [];
2014-10-28 17:09:42 +00:00
maintainers = [ maintainers.jirkamarsik ];
};
}