git.iko.soy/typeable/nixpkgs
on master help sign in
ocp-indent: readd old version 1.5.2

Some packages (ocp-index, for instance) are not yet compatible with newer versions of ocp-indent. So version 1.5.2 is still needed.

commit7ba979cac370ebe4bbb4af565b198e116a4a6214 authorromildo <malaquias@gmail.com> dateThu 1 Jun 2017, 18:43 (10 years ago) parent98058ef
2 files changed+38
pkgs/development/tools/ocaml/ocp-indent/1.5.2.nix+37 pkgs/top-level/ocaml-packages.nix+1
pkgs/development/tools/ocaml/ocp-indent/1.5.2.nixnew file+37
@@ -0,0 +1,37 @@
1+{ stdenv, fetchzip, ocaml, findlib, ocpBuild, opam, cmdliner }:
2+
3+let inherit (stdenv.lib) getVersion versionAtLeast; in
4+
5+assert versionAtLeast (getVersion ocaml) "3.12.1";
6+assert versionAtLeast (getVersion ocpBuild) "1.99.6-beta";
7+assert versionAtLeast "0.9.8" (getVersion cmdliner);
8+
9+stdenv.mkDerivation {
10+
11+ name = "ocp-indent-1.5.2";
12+
13+ src = fetchzip {
14+ url = "https://github.com/OCamlPro/ocp-indent/archive/1.5.2.tar.gz";
15+ sha256 = "0ynv2yhm7akpvqp72pdabhddwr352s1k85q8m1khsvspgg1mkiqz";
16+ };
17+
18+ nativeBuildInputs = [ ocpBuild opam ];
19+
20+ buildInputs = [ ocaml findlib cmdliner ];
21+
22+ createFindlibDestdir = true;
23+
24+ preConfigure = "patchShebangs ./install.sh";
25+
26+ postInstall = ''
27+ mv $out/lib/{ocp-indent,ocaml/${getVersion ocaml}/site-lib/}
28+ '';
29+
30+ meta = with stdenv.lib; {
31+ homepage = "http://typerex.ocamlpro.com/ocp-indent.html";
32+ description = "A customizable tool to indent OCaml code";
33+ license = licenses.gpl3;
34+ platforms = ocaml.meta.platforms or [];
35+ maintainers = [ maintainers.jirkamarsik ];
36+ };
37+}
pkgs/top-level/ocaml-packages.nix+1
@@ -389,6 +389,7 @@ let
389389 ocpBuild = callPackage ../development/tools/ocaml/ocp-build { };
390390
391391 ocpIndent = callPackage ../development/tools/ocaml/ocp-indent { cmdliner = cmdliner_1_0; };
392+ ocpIndent_1_5_2 = callPackage ../development/tools/ocaml/ocp-indent/1.5.2.nix { };
392393
393394 ocp-index = callPackage ../development/tools/ocaml/ocp-index { };
394395