3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/ocaml/ocp-indent/default.nix

35 lines
961 B
Nix
Raw Normal View History

2015-10-14 18:26:38 +01:00
{ stdenv, fetchzip, ocaml, findlib, ocpBuild, opam, cmdliner }:
2014-10-28 17:09:42 +00:00
let inherit (stdenv.lib) getVersion versionAtLeast; in
assert versionAtLeast (getVersion ocaml) "3.12.1";
2015-10-14 18:26:38 +01:00
assert versionAtLeast (getVersion ocpBuild) "1.99.6-beta";
2014-10-28 17:09:42 +00:00
stdenv.mkDerivation {
2015-10-14 18:26:38 +01:00
name = "ocp-indent-1.5.2";
2014-10-28 17:09:42 +00:00
2015-10-14 18:26:38 +01:00
src = fetchzip {
url = "https://github.com/OCamlPro/ocp-indent/archive/1.5.2.tar.gz";
sha256 = "0ynv2yhm7akpvqp72pdabhddwr352s1k85q8m1khsvspgg1mkiqz";
2014-10-28 17:09:42 +00:00
};
buildInputs = [ ocaml findlib ocpBuild opam cmdliner ];
createFindlibDestdir = true;
2015-10-14 18:26:38 +01:00
preConfigure = "patchShebangs ./install.sh";
2015-01-14 07:18:14 +00:00
postInstall = ''
mv $out/lib/{ocp-indent,ocaml/${getVersion ocaml}/site-lib/}
2014-10-28 17:09:42 +00: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 17:09:42 +00:00
maintainers = [ maintainers.jirkamarsik ];
};
}