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

32 lines
955 B
Nix
Raw Normal View History

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