1 { lib, fetchFromGitHub, stdenv
2 , findlib, ocaml, ocamlbuild
5 lib.throwIf (lib.versionOlder ocaml.version "4.02")
6 "sosa is not available for OCaml ${ocaml.version}"
8 stdenv.mkDerivation rec {
9 pname = "ocaml${ocaml.version}-sosa";
12 src = fetchFromGitHub {
15 rev = "sosa.${version}";
16 sha256 = "053hdv6ww0q4mivajj4iyp7krfvgq8zajq9d8x4mia4lid7j0dyk";
19 postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "4.07") ''
20 for p in functors list_of of_mutable
22 substituteInPlace src/lib/$p.ml --replace Pervasives. Stdlib.
26 nativeBuildInputs = [ ocaml ocamlbuild findlib ];
30 buildPhase = "make build";
32 createFindlibDestdir = true;
37 homepage = "http://www.hammerlab.org/docs/sosa/master/index.html";
38 description = "Sane OCaml String API";
39 license = licenses.isc;
40 maintainers = [ maintainers.alexfmpe ];