Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, fetchFromGitHub, stdenv
2, findlib, ocaml, ocamlbuild
3}:
4
5if lib.versionOlder ocaml.version "4.02"
6then throw "sosa is not available for OCaml ${ocaml.version}"
7else
8
9stdenv.mkDerivation rec {
10 pname = "ocaml${ocaml.version}-sosa";
11 version = "0.3.0";
12
13 src = fetchFromGitHub {
14 owner = "hammerlab";
15 repo = "sosa";
16 rev = "sosa.${version}";
17 sha256 = "053hdv6ww0q4mivajj4iyp7krfvgq8zajq9d8x4mia4lid7j0dyk";
18 };
19
20 nativeBuildInputs = [ ocaml ocamlbuild findlib ];
21
22 strictDeps = true;
23
24 buildPhase = "make build";
25
26 createFindlibDestdir = true;
27
28 doCheck = true;
29
30 meta = with lib; {
31 homepage = "http://www.hammerlab.org/docs/sosa/master/index.html";
32 description = "Sane OCaml String API";
33 license = licenses.isc;
34 maintainers = [ maintainers.alexfmpe ];
35 };
36}