1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/ocaml/ocp-indent/default.nix

38 lines
1.1 KiB
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";
2017-05-28 21:39:21 +01:00
assert versionAtLeast (getVersion cmdliner) "1.0.0";
2015-10-14 18:26:38 +01:00
assert versionAtLeast (getVersion ocpBuild) "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
2017-05-28 21:39:21 +01:00
name = "ocp-indent-${version}";
version = "1.6.0";
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";
sha256 = "1h9y597s3ag8w1z32zzv4dfk3ppq557s55bnlfw5a5wqwvia911f";
2014-10-28 17:09:42 +00:00
};
2017-05-28 21:39:21 +01:00
nativeBuildInputs = [ ocpBuild opam ];
buildInputs = [ ocaml findlib cmdliner ];
2014-10-28 17:09:42 +00:00
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 ];
};
}