1 { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, dune_2, benchmark }:
4 if lib.versionAtLeast ocaml.version "4.03"
7 url = "https://github.com/Chris00/ocaml-rope/releases/download/${version}/rope-${version}.tbz";
8 sha256 = "15cvfa0s1vjx7gjd07d3fkznilishqf4z4h2q5f20wm9ysjh2h2i";
9 nativeBuildInputs = [ dune_2 ];
11 buildPhase = "dune build -p rope";
13 dune install --prefix $out --libdir $OCAMLFIND_DESTDIR rope
18 url = "https://forge.ocamlcore.org/frs/download.php/1156/rope-0.5.tar.gz";
19 sha256 = "05fr2f5ch2rqhyaj06rv5218sbg99p1m9pq5sklk04hpslxig21f";
20 nativeBuildInputs = [ ocamlbuild ];
21 extra = { createFindlibDestdir = true; };
25 stdenv.mkDerivation ({
26 pname = "ocaml${ocaml.version}-rope";
27 inherit (param) version;
30 inherit (param) url sha256;
33 nativeBuildInputs = [ ocaml findlib ] ++ param.nativeBuildInputs;
34 buildInputs = [ benchmark ] ;
39 homepage = "http://rope.forge.ocamlcore.org/";
40 inherit (ocaml.meta) platforms;
41 description = ''Ropes ("heavyweight strings") in OCaml'';
42 license = lib.licenses.lgpl21;
43 maintainers = with lib.maintainers; [ ];