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

38 lines
1.1 KiB
Nix
Raw Normal View History

2015-10-14 19:26:38 +02:00
{ stdenv, fetchzip, ocaml, findlib, ocpBuild, opam, 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";
2015-10-14 19:26:38 +02:00
assert versionAtLeast (getVersion ocpBuild) "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
2017-05-28 22:39:21 +02:00
name = "ocp-indent-${version}";
version = "1.6.0";
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";
sha256 = "1h9y597s3ag8w1z32zzv4dfk3ppq557s55bnlfw5a5wqwvia911f";
2014-10-28 18:09:42 +01:00
};
2017-05-28 22:39:21 +02:00
nativeBuildInputs = [ ocpBuild opam ];
buildInputs = [ ocaml findlib cmdliner ];
2014-10-28 18:09:42 +01:00
createFindlibDestdir = true;
2015-10-14 19:26:38 +02:00
preConfigure = "patchShebangs ./install.sh";
2015-01-14 08:18:14 +01:00
postInstall = ''
mv $out/lib/{ocp-indent,ocaml/${getVersion ocaml}/site-lib/}
2014-10-28 18:09:42 +01:00
'';
meta = with stdenv.lib; {
homepage = "http://typerex.ocamlpro.com/ocp-indent.html";
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 ];
};
}